// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/htscodecs/htscodecs/rANS_static32x16pr.c
// Function: rans_uncompress_O1_32x16
unsigned char *rans_uncompress_O1_32x16(unsigned char *in,
                                        unsigned int in_size,
                                        unsigned char *out,
                                        unsigned int out_sz) {
    if (in_size < NX*4) // 4-states at least
        return NULL;

    if (out_sz >= INT_MAX)
        return NULL; // protect against some overflow cases

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    if (out_sz > 100000)
        return NULL;
#endif

    /* Load in the static tables */
    unsigned char *cp = in, *cp_end = in+in_size, *out_free = NULL;
    unsigned char *c_freq = NULL;
    int i;

    /*
     * Somewhat complex memory layout.
     * With shift==12 (TF_SHIFT_O1) we fill out use both sfb and fb.
     * With shift==10 (...O1_FAST)  we fill out and use s3 only.
     *
     * sfb+fb is larger, therefore we allocate this much memory.
     */
    uint8_t *sfb_ = htscodecs_tls_alloc(256*
                                        ((TOTFREQ_O1+MAGIC2)*sizeof(*sfb_)
                                         +256 * sizeof(fb_t)));
    if (!sfb_)
        return NULL;

    // sfb and fb are consecutive
    uint8_t *sfb[257];
    if ((*cp >> 4) == TF_SHIFT_O1) {
        for (i = 0; i <= 256; i++)
            sfb[i]=  sfb_ + i*(TOTFREQ_O1+MAGIC2);
    } else {
        for (i = 0; i <= 256; i++)
            sfb[i]=  sfb_ + i*(TOTFREQ_O1_FAST+MAGIC2);
    }
    fb_t (*fb)[256] = (fb_t (*)[256]) sfb[256];

    // NOTE: s3 overlaps sfb/fb
    uint32_t (*s3)[TOTFREQ_O1_FAST] = (uint32_t (*)[TOTFREQ_O1_FAST])sfb_;

    if (!out)
        out_free = out = malloc(out_sz);

    if (!out)
        goto err;

    //fprintf(stderr, "out_sz=%d\n", out_sz);

    // compressed header? If so uncompress it
    unsigned char *tab_end = NULL;
    unsigned char *c_freq_end = cp_end;
    unsigned int shift = *cp >> 4;
    if (*cp++ & 1) {
        uint32_t u_freq_sz, c_freq_sz;
        cp += var_get_u32(cp, cp_end, &u_freq_sz);
        cp += var_get_u32(cp, cp_end, &c_freq_sz);
        if (c_freq_sz > cp_end - cp)
            goto err;
        tab_end = cp + c_freq_sz;
        if (!(c_freq = rans_uncompress_O0_4x16(cp, c_freq_sz, NULL,u_freq_sz)))
            goto err;
        cp = c_freq;
        c_freq_end = c_freq + u_freq_sz;
    }

    // Decode order-0 symbol list; avoids needing in order-1 tables
    cp += decode_freq1(cp, c_freq_end, shift, NULL, s3, sfb, fb);

    if (tab_end)
        cp = tab_end;
    free(c_freq);
    c_freq = NULL;

    if (cp_end - cp < NX * 4)
        goto err;

    RansState R[NX];
    uint8_t *ptr = cp, *ptr_end = in + in_size - 2*NX;
    int z;
    for (z = 0; z < NX; z++) {
        RansDecInit(&R[z], &ptr);
        if (R[z] < RANS_BYTE_L)
            goto err;
    }

    int isz4 = out_sz/NX;
    int i4[NX], l[NX] = {0};
    for (z = 0; z < NX; z++)
        i4[z] = z*isz4;

    const int low_ent = in_size < 0.2 * out_sz;

    // Around 15% faster to specialise for 10/12 than to have one
    // loop with shift as a variable.
    if (shift == TF_SHIFT_O1) {
        // TF_SHIFT_O1 = 12
        const uint32_t mask = ((1u << TF_SHIFT_O1)-1);
        for (; likely(i4[0] < isz4);) {
            for (z = 0; z < NX; z+=4) {
                uint16_t m[4], c[4];

                c[0] = sfb[l[z+0]][m[0] = R[z+0] & mask];
                c[1] = sfb[l[z+1]][m[1] = R[z+1] & mask];
                c[2] = sfb[l[z+2]][m[2] = R[z+2] & mask];
                c[3] = sfb[l[z+3]][m[3] = R[z+3] & mask];

                R[z+0] = fb[l[z+0]][c[0]].f * (R[z+0]>>TF_SHIFT_O1);
                R[z+0] += m[0] - fb[l[z+0]][c[0]].b;

                R[z+1] = fb[l[z+1]][c[1]].f * (R[z+1]>>TF_SHIFT_O1);
                R[z+1] += m[1] - fb[l[z+1]][c[1]].b;

                R[z+2] = fb[l[z+2]][c[2]].f * (R[z+2]>>TF_SHIFT_O1);
                R[z+2] += m[2] - fb[l[z+2]][c[2]].b;

                R[z+3] = fb[l[z+3]][c[3]].f * (R[z+3]>>TF_SHIFT_O1);
                R[z+3] += m[3] - fb[l[z+3]][c[3]].b;

                out[i4[z+0]++] = l[z+0] = c[0];
                out[i4[z+1]++] = l[z+1] = c[1];
                out[i4[z+2]++] = l[z+2] = c[2];
                out[i4[z+3]++] = l[z+3] = c[3];

                if (!low_ent && likely(ptr < ptr_end)) {
                    RansDecRenorm(&R[z+0], &ptr);
                    RansDecRenorm(&R[z+1], &ptr);
                    RansDecRenorm(&R[z+2], &ptr);
                    RansDecRenorm(&R[z+3], &ptr);
                } else {
                    RansDecRenormSafe(&R[z+0], &ptr, ptr_end+2*NX);
                    RansDecRenormSafe(&R[z+1], &ptr, ptr_end+2*NX);
                    RansDecRenormSafe(&R[z+2], &ptr, ptr_end+2*NX);
                    RansDecRenormSafe(&R[z+3], &ptr, ptr_end+2*NX);
                }
            }
        }

        // Remainder
        for (; i4[NX-1] < out_sz; i4[NX-1]++) {
            uint32_t m = R[NX-1] & ((1u<<TF_SHIFT_O1)-1);
            unsigned char c = sfb[l[NX-1]][m];
            out[i4[NX-1]] = c;
            R[NX-1] = fb[l[NX-1]][c].f * (R[NX-1]>>TF_SHIFT_O1) +
                m - fb[l[NX-1]][c].b;
            RansDecRenormSafe(&R[NX-1], &ptr, ptr_end + 2*NX);
            l[NX-1] = c;
        }
    } else {
        // TF_SHIFT_O1 = 10
        const uint32_t mask = ((1u << TF_SHIFT_O1_FAST)-1);
        for (; likely(i4[0] < isz4);) {
            for (z = 0; z < NX; z+=4) {
                // Merged sfb and fb into single s3 lookup.
                // The m[4] array completely vanishes in this method.
                uint32_t S[4] = {
                    s3[l[z+0]][R[z+0] & mask],
                    s3[l[z+1]][R[z+1] & mask],
                    s3[l[z+2]][R[z+2] & mask],
                    s3[l[z+3]][R[z+3] & mask],
                };

                l[z+0] = out[i4[z+0]++] = S[0];
                l[z+1] = out[i4[z+1]++] = S[1];
                l[z+2] = out[i4[z+2]++] = S[2];
                l[z+3] = out[i4[z+3]++] = S[3];

                uint32_t F[4] = {
                    S[0]>>(TF_SHIFT_O1_FAST+8),
                    S[1]>>(TF_SHIFT_O1_FAST+8),
                    S[2]>>(TF_SHIFT_O1_FAST+8),
                    S[3]>>(TF_SHIFT_O1_FAST+8),
                };
                uint32_t B[4] = {
                    (S[0]>>8) & mask,
                    (S[1]>>8) & mask,
                    (S[2]>>8) & mask,
                    (S[3]>>8) & mask,
                };

                R[z+0] = F[0] * (R[z+0]>>TF_SHIFT_O1_FAST) + B[0];
                R[z+1] = F[1] * (R[z+1]>>TF_SHIFT_O1_FAST) + B[1];
                R[z+2] = F[2] * (R[z+2]>>TF_SHIFT_O1_FAST) + B[2];
                R[z+3] = F[3] * (R[z+3]>>TF_SHIFT_O1_FAST) + B[3];

                if (!low_ent && (ptr < ptr_end)) {
                    // branchless & asm
                    RansDecRenorm(&R[z+0], &ptr);
                    RansDecRenorm(&R[z+1], &ptr);
                    RansDecRenorm(&R[z+2], &ptr);
                    RansDecRenorm(&R[z+3], &ptr);
                } else {
                    // branched, but better when predictable
                    RansDecRenormSafe(&R[z+0], &ptr, ptr_end+2*NX);
                    RansDecRenormSafe(&R[z+1], &ptr, ptr_end+2*NX);
                    RansDecRenormSafe(&R[z+2], &ptr, ptr_end+2*NX);
                    RansDecRenormSafe(&R[z+3], &ptr, ptr_end+2*NX);
                }
            }
        }

        // Remainder
        for (; i4[NX-1] < out_sz; i4[NX-1]++) {
            uint32_t S = s3[l[NX-1]][R[NX-1] & ((1u<<TF_SHIFT_O1_FAST)-1)];
            out[i4[NX-1]] = l[NX-1] = S&0xff;
            R[NX-1] = (S>>(TF_SHIFT_O1_FAST+8)) * (R[NX-1]>>TF_SHIFT_O1_FAST)
                + ((S>>8) & ((1u<<TF_SHIFT_O1_FAST)-1));
            RansDecRenormSafe(&R[NX-1], &ptr, ptr_end + 2*NX);
        }
    }
    //fprintf(stderr, "    1 Decoded %d bytes\n", (int)(ptr-in)); //c-size

    htscodecs_tls_free(sfb_);
    return out;

 err:
    htscodecs_tls_free(sfb_);
    free(out_free);
    free(c_freq);

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1208, %rsp           # imm = 0x1208
cmpl $0x80, %esi
setb %al
movl %ecx, 0x4(%rsp)
cmpl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
setae %cl
orb %al, %cl
jne 0x79a8f
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r13
movl $0x14b300, %edi         # imm = 0x14B300
callq 0x8060c
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x79a8f
movzbl (%r13), %r8d
movl %r8d, %eax
andb $-0x10, %al
cmpb $-0x40, %al
jne 0x794b5
xorl %eax, %eax
movq 0x20(%rsp), %rcx
movq %rcx, 0x5f0(%rsp,%rax,8)
incq %rax
addq $0x10b3, %rcx           # imm = 0x10B3
cmpq $0x101, %rax            # imm = 0x101
jne 0x79499
jmp 0x794d6
xorl %eax, %eax
movq 0x20(%rsp), %rcx
movq %rcx, 0x5f0(%rsp,%rax,8)
incq %rax
addq $0x4b3, %rcx            # imm = 0x4B3
cmpq $0x101, %rax            # imm = 0x101
jne 0x794bc
movq 0xdf0(%rsp), %rbx
testq %r15, %r15
je 0x794e7
xorl %eax, %eax
jmp 0x794f9
movl 0x4(%rsp), %edi
movl %r8d, %r14d
callq 0x4680
movl %r14d, %r8d
movq %rax, %r15
testq %r15, %r15
movq %rax, 0x50(%rsp)
je 0x79a70
movq %rbx, 0x40(%rsp)
movl %ebp, %ecx
leaq (%rcx,%r13), %rdi
leaq 0x1(%r13), %rbx
xorl %r12d, %r12d
testb $0x1, %r8b
movq %rdi, 0x8(%rsp)
movq %rcx, 0xe0(%rsp)
jne 0x79540
movq %rdi, %r14
movq $0x0, 0x28(%rsp)
xorl %r13d, %r13d
jmp 0x7965d
cmpl $0x7, %ebp
jb 0x79577
xorl %ebp, %ebp
movl $0x1, %ecx
movzbl (%r13,%rcx), %edx
movl %ebp, %eax
shll $0x7, %eax
movl %edx, %ebp
andl $0x7f, %ebp
orl %eax, %ebp
leaq 0x1(%rcx), %rax
testb %dl, %dl
jns 0x7956e
cmpl $0x6, %ecx
movq %rax, %rcx
jne 0x7954c
addq %r13, %rax
subl %ebx, %eax
cltq
jmp 0x79592
cmpl $0x2, %ebp
jb 0x7958e
movsbl (%rbx), %ebp
testl %ebp, %ebp
js 0x7a3ee
movl $0x1, %eax
jmp 0x79592
xorl %ebp, %ebp
xorl %eax, %eax
addq %rax, %rbx
movq %rdi, %rcx
subq %rbx, %rcx
cmpq $0x6, %rcx
jl 0x795d9
addq %rax, %r13
xorl %eax, %eax
movl $0x1, %ecx
movzbl (%r13,%rcx), %esi
movl %eax, %edx
shll $0x7, %edx
movl %esi, %eax
andl $0x7f, %eax
orl %edx, %eax
leaq 0x1(%rcx), %rdx
testb %sil, %sil
jns 0x795ce
cmpl $0x6, %ecx
movq %rdx, %rcx
jne 0x795ab
addq %rdx, %r13
subl %ebx, %r13d
movslq %r13d, %rcx
jmp 0x795f4
cmpq %rdi, %rbx
jae 0x795f0
movsbl (%rbx), %eax
testl %eax, %eax
js 0x7a417
movl $0x1, %ecx
jmp 0x795f4
xorl %eax, %eax
xorl %ecx, %ecx
addq %rcx, %rbx
movl %eax, %ecx
movq %rdi, %rax
subq %rbx, %rax
cmpq %rcx, %rax
jge 0x79617
movq $0x0, 0x28(%rsp)
movq %rdi, %r14
xorl %ecx, %ecx
xorl %r13d, %r13d
jmp 0x79655
movl %r8d, %r12d
movl %ecx, %esi
addq %rbx, %rcx
movq %rcx, 0x28(%rsp)
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x65385
testq %rax, %rax
je 0x79648
movl %ebp, %r14d
addq %rax, %r14
movb $0x1, %cl
movq %rax, %r13
movq %rax, %rbx
jmp 0x7964f
movq 0x8(%rsp), %r14
xorl %ecx, %ecx
movl %r12d, %r8d
xorl %r12d, %r12d
testb %cl, %cl
je 0x79a73
leaq 0x1f0(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
movl %r8d, %ebp
callq 0x4260
movl %ebp, %ecx
cmpq %r14, %rbx
je 0x7974e
leaq 0x1(%rbx), %rax
movzbl (%rbx), %r8d
leaq 0x3(%rbx), %rsi
xorl %edx, %edx
cmpq %r14, %rsi
jae 0x796e5
xorl %edx, %edx
movl %r8d, %esi
movl $0x1, 0x1f0(%rsp,%rsi,4)
testl %edx, %edx
je 0x796ba
cmpl $0xfe, %r8d
jg 0x7974b
decl %edx
incl %r8d
jmp 0x796d7
movl %r8d, %edx
incl %edx
movzbl (%rax), %r8d
cmpl %r8d, %edx
jne 0x796d2
movzbl 0x1(%rax), %edx
addq $0x2, %rax
jmp 0x796d7
incq %rax
xorl %edx, %edx
testl %r8d, %r8d
je 0x796e5
leaq 0x2(%rax), %rsi
cmpq %r14, %rsi
jb 0x79694
testl %r8d, %r8d
je 0x79744
movl %r8d, %esi
movl $0x1, 0x1f0(%rsp,%rsi,4)
xorl %r12d, %r12d
cmpq %r14, %rax
jae 0x7974e
testl %edx, %edx
je 0x79714
cmpl $0xfe, %r8d
jg 0x7974e
decl %edx
incl %r8d
jmp 0x7973a
movl %r8d, %edi
incl %edi
movzbl (%rax), %r8d
leaq 0x1(%rax), %rsi
xorl %edx, %edx
cmpl %r8d, %edi
jne 0x79737
cmpq %r14, %rsi
jae 0x7974b
movzbl 0x1(%rax), %edx
addq $0x2, %rax
jmp 0x7973a
movq %rsi, %rax
testl %r8d, %r8d
je 0x79744
cmpq %r14, %rax
jb 0x796ea
subl %ebx, %eax
movl %eax, %r12d
jmp 0x7974e
xorl %r12d, %r12d
shrl $0x4, %ecx
testl %r12d, %r12d
movl %ecx, 0x38(%rsp)
je 0x79a39
movslq %r12d, %rdx
addq %rbx, %rdx
movq %rdx, 0x10(%rsp)
cmpq %r14, %rdx
jae 0x79a39
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x79782
movw $0x0, 0x2(%rax)
movl $0x1, %r8d
shll %cl, %r8d
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
xorl %r10d, %r10d
movq %rax, 0x48(%rsp)
movq %r14, 0x30(%rsp)
movq %r13, 0x58(%rsp)
cmpl $0x0, 0x1f0(%rsp,%r10,4)
je 0x79a15
movq %r10, 0x18(%rsp)
movl %r8d, %r12d
xorl %ebp, %ebp
movl $0x400, %edx            # imm = 0x400
leaq 0xe00(%rsp), %rdi
xorl %esi, %esi
callq 0x4260
movl $0x0, %eax
cmpq %r14, 0x10(%rsp)
je 0x798ce
xorl %ebp, %ebp
movq 0x10(%rsp), %rcx
movq %rcx, %rax
cmpq %r14, %rcx
jae 0x798ca
xorl %ecx, %ecx
xorl %ebp, %ebp
xorl %esi, %esi
movq 0x10(%rsp), %rax
cmpl $0x0, 0x1f0(%rsp,%rcx,4)
je 0x79889
testl %esi, %esi
je 0x79817
decl %esi
xorl %edx, %edx
jmp 0x79876
movq %r14, %rdx
subq %rax, %rdx
cmpq $0x6, %rdx
jl 0x79854
xorl %edi, %edi
xorl %edx, %edx
movzbl (%rax,%rdi), %r8d
movl %edx, %esi
shll $0x7, %esi
movl %r8d, %edx
andl $0x7f, %edx
orl %esi, %edx
leaq 0x1(%rdi), %rsi
testb %r8b, %r8b
jns 0x7984a
cmpl $0x5, %edi
movq %rsi, %rdi
jne 0x79827
addq %rax, %rsi
subl %eax, %esi
movslq %esi, %rsi
jmp 0x79860
movsbl (%rax), %edx
testl %edx, %edx
js 0x798a0
movl $0x1, %esi
addq %rsi, %rax
xorl %esi, %esi
testl %edx, %edx
jne 0x79876
xorl %esi, %esi
cmpq %r14, %rax
jae 0x798c6
movzbl (%rax), %esi
incq %rax
movl %edx, 0xe00(%rsp,%rcx,4)
addl %edx, %ebp
movb $0x1, %dl
testb %dl, %dl
je 0x79a30
cmpq $0xfe, %rcx
ja 0x798ca
incq %rcx
cmpq %r14, %rax
jb 0x79803
jmp 0x798ca
xorl %edx, %edx
movq %rax, %rsi
movzbl (%rsi), %edi
incq %rsi
movl %edx, %r8d
shll $0x7, %r8d
movl %edi, %edx
andl $0x7f, %edx
orl %r8d, %edx
testb %dil, %dil
jns 0x7984d
cmpq %r14, %rsi
jb 0x798a5
jmp 0x7984d
xorl %edx, %edx
jmp 0x79881
subl 0x10(%rsp), %eax
movl $0x2, %ecx
testl %eax, %eax
movl %r12d, %r8d
je 0x799ef
cltq
addq %rax, 0x10(%rsp)
testl %ebp, %ebp
movl 0x38(%rsp), %r9d
movq 0x18(%rsp), %r10
je 0x799f6
cmpl %r8d, %ebp
je 0x79922
xorl %ecx, %ecx
cmpl %r8d, %ebp
jae 0x7990e
xorl %ecx, %ecx
addl %ebp, %ebp
incl %ecx
cmpl %r8d, %ebp
jb 0x79905
xorl %eax, %eax
shll %cl, 0xe00(%rsp,%rax,4)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x79910
xorl %ebp, %ebp
xorl %r14d, %r14d
movl 0xe00(%rsp,%rbp,4), %r13d
testq %r13, %r13
je 0x799c9
movl %r8d, %eax
subl %r14d, %eax
cmpl %eax, %r13d
ja 0x799fd
cmpl $0xa, %r9d
je 0x7998e
cmpl $0xc, %r9d
jne 0x799c3
movslq %r14d, %rdi
addq 0x5f0(%rsp,%r10,8), %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x4260
movq 0x18(%rsp), %r10
movl 0x38(%rsp), %r9d
movl %r12d, %r8d
movq %r10, %rax
shlq $0xa, %rax
addq 0x40(%rsp), %rax
movw %r13w, (%rax,%rbp,4)
movw %r14w, 0x2(%rax,%rbp,4)
jmp 0x799c3
movl %r13d, %ecx
shll $0x12, %ecx
movslq %r14d, %rdx
movl %ebp, %eax
orl %ecx, %eax
movq %r13, %rcx
shlq $0x8, %rcx
movq 0x48(%rsp), %rsi
leaq (%rsi,%rdx,4), %rdx
xorl %esi, %esi
movl %eax, %edi
orl %esi, %edi
movl %edi, (%rdx)
addq $0x100, %rsi            # imm = 0x100
addq $0x4, %rdx
cmpq %rsi, %rcx
jne 0x799ad
addl %r14d, %r13d
movl %r13d, %r14d
incq %rbp
cmpq $0x100, %rbp            # imm = 0x100
jne 0x79927
xorl %ecx, %ecx
cmpl %r8d, %r14d
setne %cl
addl %ecx, %ecx
movq 0x58(%rsp), %r13
movq 0x30(%rsp), %r14
jmp 0x79a0c
movq 0x18(%rsp), %r10
jmp 0x79a0c
movl $0x5, %ecx
jmp 0x79a0c
movq 0x58(%rsp), %r13
movq 0x30(%rsp), %r14
movl $0x2, %ecx
cmpl $0x5, %ecx
je 0x79a15
testl %ecx, %ecx
jne 0x79a39
incq %r10
addq $0x1000, 0x48(%rsp)     # imm = 0x1000
cmpq $0x100, %r10            # imm = 0x100
jne 0x797a8
jmp 0x79a3d
xorl %ebp, %ebp
xorl %eax, %eax
jmp 0x798ce
xorl %eax, %eax
jmp 0x79a46
movq 0x10(%rsp), %rax
subl %ebx, %eax
cltq
addq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
cmovneq %rax, %rbx
movq %r13, %rdi
callq 0x45c0
movq 0x8(%rsp), %r10
movq %r10, %rax
subq %rbx, %rax
cmpq $0x80, %rax
jge 0x79aa7
xorl %r13d, %r13d
movq 0x20(%rsp), %rdi
callq 0x80732
movq 0x50(%rsp), %rdi
callq 0x45c0
movq %r13, %rdi
callq 0x45c0
xorl %r15d, %r15d
movq %r15, %rax
addq $0x1208, %rsp           # imm = 0x1208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x40(%r10), %rax
movq %rax, 0x28(%rsp)
xorl %r13d, %r13d
xorl %eax, %eax
movl (%rbx,%rax), %ecx
movl %ecx, 0x60(%rsp,%rax)
cmpl $0x8000, %ecx           # imm = 0x8000
jb 0x79a73
addq $0x4, %rax
cmpq $0x80, %rax
jne 0x79ab5
movl 0x4(%rsp), %edx
shrl $0x5, %edx
xorps %xmm0, %xmm0
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
addq %rax, %rbx
xorl %eax, %eax
xorl %ecx, %ecx
movl %eax, 0x170(%rsp,%rcx,4)
incq %rcx
addl %edx, %eax
cmpq $0x20, %rcx
jne 0x79b21
xorps %xmm0, %xmm0
cvtsi2sdq 0xe0(%rsp), %xmm0
cvtsi2sdl 0x4(%rsp), %xmm1
mulsd 0x24012(%rip), %xmm1    # 0x9db60
movl 0x170(%rsp), %eax
cmpl $0xc, 0x38(%rsp)
movl %edx, 0x30(%rsp)
jne 0x79fe0
cmpl %edx, %eax
jge 0x79f2a
xorl %r8d, %r8d
movq %r15, 0xe8(%rsp)
movq %rbx, 0x18(%rsp)
movslq 0xf0(%rsp,%r8,4), %rax
movq 0x5f0(%rsp,%rax,8), %rdx
movl 0x60(%rsp,%r8,4), %r9d
movl 0x64(%rsp,%r8,4), %ecx
movq %r9, %rsi
movl $0xfff, %edi            # imm = 0xFFF
andq %rdi, %rsi
movl $0xfff, %r10d           # imm = 0xFFF
movq %rsi, 0x38(%rsp)
movzbl (%rdx,%rsi), %r14d
movslq 0xf4(%rsp,%r8,4), %r15
movq 0x5f0(%rsp,%r15,8), %rdx
movq %rcx, %rbx
andq %r10, %rbx
movzbl (%rdx,%rbx), %edx
movq %rdx, 0x50(%rsp)
movslq 0xf8(%rsp,%r8,4), %rdi
movq 0x5f0(%rsp,%rdi,8), %rdx
movl 0x68(%rsp,%r8,4), %esi
movq %rsi, %r13
andq %r10, %r13
movzbl (%rdx,%r13), %edx
movq %rdx, 0x48(%rsp)
movslq 0xfc(%rsp,%r8,4), %r12
movl 0x6c(%rsp,%r8,4), %r10d
shlq $0xa, %rax
movq 0x40(%rsp), %rdx
addq %rdx, %rax
movq %r14, 0x10(%rsp)
movzwl (%rax,%r14,4), %ebp
shrl $0xc, %r9d
imull %ebp, %r9d
movq %r10, %r11
movl $0xfff, %ebp            # imm = 0xFFF
andq %rbp, %r11
movq 0x5f0(%rsp,%r12,8), %rbp
movzbl (%rbp,%r11), %ebp
movl %r9d, 0x60(%rsp,%r8,4)
movzwl 0x2(%rax,%r14,4), %eax
movq 0x38(%rsp), %r14
subl %eax, %r14d
addl %r9d, %r14d
movl %r14d, 0x60(%rsp,%r8,4)
shlq $0xa, %r15
addq %rdx, %r15
movq 0x50(%rsp), %r9
movzwl (%r15,%r9,4), %eax
shrl $0xc, %ecx
imull %eax, %ecx
movl %ecx, 0x64(%rsp,%r8,4)
movzwl 0x2(%r15,%r9,4), %eax
movq 0xe8(%rsp), %r15
subl %eax, %ebx
addl %ecx, %ebx
movl %ebx, 0x64(%rsp,%r8,4)
shlq $0xa, %rdi
addq %rdx, %rdi
movq 0x48(%rsp), %rcx
movzwl (%rdi,%rcx,4), %eax
shrl $0xc, %esi
imull %eax, %esi
movl %esi, 0x68(%rsp,%r8,4)
movzwl 0x2(%rdi,%rcx,4), %eax
movq %rcx, %rdi
subl %eax, %r13d
addl %esi, %r13d
movl %r13d, 0x68(%rsp,%r8,4)
shlq $0xa, %r12
addq %rdx, %r12
movzwl (%r12,%rbp,4), %eax
shrl $0xc, %r10d
imull %eax, %r10d
movl %r10d, 0x6c(%rsp,%r8,4)
movzwl 0x2(%r12,%rbp,4), %eax
subl %eax, %r11d
addl %r10d, %r11d
movslq 0x170(%rsp,%r8,4), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x170(%rsp,%r8,4)
movl %r11d, 0x6c(%rsp,%r8,4)
movq 0x10(%rsp), %rcx
movl %ecx, 0xf0(%rsp,%r8,4)
movb %cl, (%r15,%rax)
movslq 0x174(%rsp,%r8,4), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x174(%rsp,%r8,4)
movl %r9d, 0xf4(%rsp,%r8,4)
movb %r9b, (%r15,%rax)
movslq 0x178(%rsp,%r8,4), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x178(%rsp,%r8,4)
movl %edi, 0xf8(%rsp,%r8,4)
movb %dil, (%r15,%rax)
movslq 0x17c(%rsp,%r8,4), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x17c(%rsp,%r8,4)
movq %r8, %rcx
orq $0x1, %rcx
movl %ebp, 0xfc(%rsp,%r8,4)
movb %bpl, (%r15,%rax)
movq %r8, %rdi
orq $0x2, %rdi
movq %r8, %rbp
orq $0x3, %rbp
ucomisd %xmm0, %xmm1
ja 0x79e2f
movq 0x28(%rsp), %rax
cmpq %rax, 0x18(%rsp)
jae 0x79e2f
movq 0x18(%rsp), %r9
movzwl (%r9), %eax
movl %r14d, %edx
shll $0x10, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8000, %r14d          # imm = 0x8000
cmovbl %edx, %r14d
leaq 0x2(%r9), %rax
cmovbq %rax, %r9
movl %r14d, 0x60(%rsp,%r8,4)
movzwl (%r9), %eax
movl %ebx, %edx
shll $0x10, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8000, %ebx           # imm = 0x8000
cmovbl %edx, %ebx
leaq 0x2(%r9), %rax
cmovbq %rax, %r9
movl %ebx, 0x60(%rsp,%rcx,4)
movzwl (%r9), %eax
movl %r13d, %edx
shll $0x10, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8000, %r13d          # imm = 0x8000
cmovbl %edx, %r13d
leaq 0x2(%r9), %rax
cmovbq %rax, %r9
movl %r13d, 0x60(%rsp,%rdi,4)
movq %r9, %rbx
movzwl (%rbx), %eax
movl %r11d, %edx
shll $0x10, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8000, %r11d          # imm = 0x8000
cmovbl %edx, %r11d
leaq 0x2(%rbx), %rax
cmovbq %rax, %rbx
movq 0x8(%rsp), %r10
jmp 0x79efd
cmpl $0x7fff, %r14d          # imm = 0x7FFF
jbe 0x79e44
movq 0x8(%rsp), %r10
movq 0x18(%rsp), %rbx
jmp 0x79e74
movq 0x18(%rsp), %rbx
leaq 0x1(%rbx), %rax
movq 0x8(%rsp), %r10
cmpq %r10, %rax
jae 0x79e74
movzbl (%rbx), %eax
movzbl 0x1(%rbx), %edx
shll $0x8, %edx
shll $0x10, %r14d
orl %eax, %r14d
orl %edx, %r14d
addq $0x2, %rbx
movl %r14d, 0x60(%rsp,%r8,4)
movl 0x60(%rsp,%rcx,4), %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
ja 0x79ea1
leaq 0x1(%rbx), %rdx
cmpq %r10, %rdx
jae 0x79ea1
movzbl (%rbx), %edx
movzbl 0x1(%rbx), %esi
shll $0x8, %esi
shll $0x10, %eax
orl %edx, %eax
orl %esi, %eax
addq $0x2, %rbx
movl %eax, 0x60(%rsp,%rcx,4)
movl 0x60(%rsp,%rdi,4), %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
ja 0x79ece
leaq 0x1(%rbx), %rcx
cmpq %r10, %rcx
jae 0x79ece
movzbl (%rbx), %ecx
movzbl 0x1(%rbx), %edx
shll $0x8, %edx
shll $0x10, %eax
orl %ecx, %eax
orl %edx, %eax
addq $0x2, %rbx
movl %eax, 0x60(%rsp,%rdi,4)
movl 0x60(%rsp,%rbp,4), %r11d
cmpl $0x7fff, %r11d          # imm = 0x7FFF
ja 0x79f02
leaq 0x1(%rbx), %rax
cmpq %r10, %rax
jae 0x79f02
movzbl (%rbx), %eax
movzbl 0x1(%rbx), %ecx
shll $0x8, %ecx
shll $0x10, %r11d
orl %eax, %r11d
orl %ecx, %r11d
addq $0x2, %rbx
movl %r11d, 0x60(%rsp,%rbp,4)
leaq 0x4(%r8), %rax
cmpq $0x1c, %r8
movq %rax, %r8
jb 0x79b77
movl $0x0, %r8d
movl 0x30(%rsp), %eax
cmpl %eax, 0x170(%rsp)
jl 0x79b77
movl 0x1ec(%rsp), %eax
cmpl 0x4(%rsp), %eax
movq 0x40(%rsp), %r11
jae 0x7a3df
movl 0xdc(%rsp), %ecx
movl 0x16c(%rsp), %esi
movl 0x4(%rsp), %edx
movl %ecx, %edi
andl $0xfff, %edi            # imm = 0xFFF
movslq %esi, %r8
movq 0x5f0(%rsp,%r8,8), %rsi
movzbl (%rsi,%rdi), %esi
movb %sil, (%r15,%rax)
shlq $0xa, %r8
addq %r11, %r8
movzwl (%r8,%rsi,4), %r9d
shrl $0xc, %ecx
imull %r9d, %ecx
addl %edi, %ecx
movzwl 0x2(%r8,%rsi,4), %edi
subl %edi, %ecx
movl %ecx, 0xdc(%rsp)
cmpl $0x7fff, %ecx           # imm = 0x7FFF
ja 0x79fc1
leaq 0x1(%rbx), %rdi
cmpq %r10, %rdi
jae 0x79fc1
movzbl (%rbx), %edi
movzbl 0x1(%rbx), %r8d
shll $0x8, %r8d
shll $0x10, %ecx
orl %edi, %ecx
orl %r8d, %ecx
addq $0x2, %rbx
movl %ecx, 0xdc(%rsp)
movl %esi, 0x16c(%rsp)
incq %rax
movl %eax, 0x1ec(%rsp)
cmpq %rax, %rdx
jne 0x79f52
jmp 0x7a3df
cmpl %edx, %eax
jge 0x7a31f
xorl %r9d, %r9d
movl $0x3ff, %edi            # imm = 0x3FF
movl $0xff, %r8d
movslq 0xf0(%rsp,%r9,4), %rax
movl 0x60(%rsp,%r9,4), %r10d
movl 0x64(%rsp,%r9,4), %ebp
movl %r10d, %ecx
andl %edi, %ecx
shlq $0xc, %rax
movq 0x20(%rsp), %r14
addq %r14, %rax
movl (%rax,%rcx,4), %edx
movslq 0xf4(%rsp,%r9,4), %rax
movl %ebp, %ecx
andl %edi, %ecx
shlq $0xc, %rax
addq %r14, %rax
movl (%rax,%rcx,4), %esi
movslq 0xf8(%rsp,%r9,4), %rax
movl 0x68(%rsp,%r9,4), %r12d
movl %r12d, %ecx
andl %edi, %ecx
shlq $0xc, %rax
addq %r14, %rax
movl (%rax,%rcx,4), %r13d
movslq 0xfc(%rsp,%r9,4), %rax
movl 0x6c(%rsp,%r9,4), %r11d
movl %r11d, %ecx
andl %edi, %ecx
shlq $0xc, %rax
addq %r14, %rax
movl (%rax,%rcx,4), %eax
movslq 0x170(%rsp,%r9,4), %rcx
movq %rbx, %r14
leal 0x1(%rcx), %ebx
movl %ebx, 0x170(%rsp,%r9,4)
movb %dl, (%r15,%rcx)
movl %edx, %ecx
andl %r8d, %ecx
movl %ecx, 0xf0(%rsp,%r9,4)
movslq 0x174(%rsp,%r9,4), %rcx
leal 0x1(%rcx), %ebx
movl %ebx, 0x174(%rsp,%r9,4)
movb %sil, (%r15,%rcx)
movl %esi, %ecx
andl %r8d, %ecx
movl %ecx, 0xf4(%rsp,%r9,4)
movslq 0x178(%rsp,%r9,4), %rcx
leal 0x1(%rcx), %ebx
movl %ebx, 0x178(%rsp,%r9,4)
movq %r14, %rbx
movb %r13b, (%r15,%rcx)
movl %edx, %ecx
shrl $0x12, %ecx
shrl $0xa, %r10d
imull %ecx, %r10d
shrl $0x8, %edx
andl %edi, %edx
addl %edx, %r10d
movl %esi, %ecx
shrl $0x12, %ecx
shrl $0xa, %ebp
imull %ecx, %ebp
shrl $0x8, %esi
andl %edi, %esi
addl %esi, %ebp
movl %r13d, %ecx
shrl $0x12, %ecx
shrl $0xa, %r12d
imull %ecx, %r12d
movl %r13d, %ecx
andl %r8d, %ecx
shrl $0x8, %r13d
andl %edi, %r13d
addl %r13d, %r12d
movl %eax, %edx
shrl $0x12, %edx
shrl $0xa, %r11d
imull %edx, %r11d
movl %eax, %edx
shrl $0x8, %edx
andl %edi, %edx
addl %edx, %r11d
movslq 0x17c(%rsp,%r9,4), %rdx
movl %ecx, 0xf8(%rsp,%r9,4)
leal 0x1(%rdx), %ecx
movl %ecx, 0x17c(%rsp,%r9,4)
movq %r9, %rcx
orq $0x1, %rcx
movb %al, (%r15,%rdx)
movq %r9, %rsi
orq $0x2, %rsi
andl %r8d, %eax
movl %eax, 0xfc(%rsp,%r9,4)
movq %r9, %r13
orq $0x3, %r13
ucomisd %xmm0, %xmm1
movl %r10d, 0x60(%rsp,%r9,4)
movl %ebp, 0x64(%rsp,%r9,4)
movl %r12d, 0x68(%rsp,%r9,4)
movl %r11d, 0x6c(%rsp,%r9,4)
ja 0x7a229
cmpq 0x28(%rsp), %rbx
jae 0x7a229
movzwl (%rbx), %eax
movl %r10d, %edx
shll $0x10, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8000, %r10d          # imm = 0x8000
cmovbl %edx, %r10d
leaq 0x2(%rbx), %rax
cmovbq %rax, %rbx
movl %r10d, 0x60(%rsp,%r9,4)
movzwl (%rbx), %eax
movl %ebp, %edx
shll $0x10, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8000, %ebp           # imm = 0x8000
cmovbl %edx, %ebp
leaq 0x2(%rbx), %rax
cmovbq %rax, %rbx
movl %ebp, 0x60(%rsp,%rcx,4)
movzwl (%rbx), %eax
movl %r12d, %edx
shll $0x10, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8000, %r12d          # imm = 0x8000
cmovbl %edx, %r12d
leaq 0x2(%rbx), %rax
cmovbq %rax, %rbx
movl %r12d, 0x60(%rsp,%rsi,4)
movzwl (%rbx), %eax
movl %r11d, %edx
shll $0x10, %edx
orl %eax, %edx
xorl %eax, %eax
cmpl $0x8000, %r11d          # imm = 0x8000
cmovbl %edx, %r11d
leaq 0x2(%rbx), %rax
cmovbq %rax, %rbx
movl %r11d, 0x60(%rsp,%r13,4)
jmp 0x7a2f7
cmpl $0x7fff, %r10d          # imm = 0x7FFF
jbe 0x7a239
movq 0x8(%rsp), %r11
jmp 0x7a264
leaq 0x1(%rbx), %rax
movq 0x8(%rsp), %r11
cmpq %r11, %rax
jae 0x7a264
movzbl (%rbx), %eax
movzbl 0x1(%rbx), %edx
shll $0x8, %edx
shll $0x10, %r10d
orl %eax, %r10d
orl %edx, %r10d
addq $0x2, %rbx
movl %r10d, 0x60(%rsp,%r9,4)
movl 0x60(%rsp,%rcx,4), %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
ja 0x7a294
leaq 0x1(%rbx), %rdx
cmpq %r11, %rdx
jae 0x7a294
movzbl (%rbx), %edx
movzbl 0x1(%rbx), %r10d
shll $0x8, %r10d
shll $0x10, %eax
orl %edx, %eax
orl %r10d, %eax
addq $0x2, %rbx
movl %eax, 0x60(%rsp,%rcx,4)
movl 0x60(%rsp,%rsi,4), %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
ja 0x7a2c1
leaq 0x1(%rbx), %rcx
cmpq %r11, %rcx
jae 0x7a2c1
movzbl (%rbx), %ecx
movzbl 0x1(%rbx), %edx
shll $0x8, %edx
shll $0x10, %eax
orl %ecx, %eax
orl %edx, %eax
addq $0x2, %rbx
movl %eax, 0x60(%rsp,%rsi,4)
movl 0x60(%rsp,%r13,4), %r11d
cmpl $0x7fff, %r11d          # imm = 0x7FFF
ja 0x7a2f7
leaq 0x1(%rbx), %rax
cmpq 0x8(%rsp), %rax
jae 0x7a2f7
movzbl (%rbx), %eax
movzbl 0x1(%rbx), %ecx
shll $0x8, %ecx
shll $0x10, %r11d
orl %eax, %r11d
orl %ecx, %r11d
addq $0x2, %rbx
jmp 0x7a21f
leaq 0x4(%r9), %rax
cmpq $0x1c, %r9
movq %rax, %r9
jb 0x79ff6
movl $0x0, %r9d
movl 0x30(%rsp), %eax
cmpl %eax, 0x170(%rsp)
jl 0x79ff6
movl 0x1ec(%rsp), %eax
cmpl 0x4(%rsp), %eax
movq 0x8(%rsp), %r11
jae 0x7a3df
movslq %eax, %rcx
movl 0x16c(%rsp), %edi
movl 0xdc(%rsp), %esi
addq %r15, %rcx
movl $0x3ff, %edx            # imm = 0x3FF
movslq %edi, %rdi
movl %esi, %r8d
andl %edx, %r8d
shlq $0xc, %rdi
addq 0x20(%rsp), %rdi
movl (%rdi,%r8,4), %r8d
movzbl %r8b, %edi
movl %edi, 0x16c(%rsp)
movb %r8b, (%rcx)
movl %r8d, %r9d
shrl $0x12, %r9d
shrl $0xa, %esi
movl %esi, %r10d
imull %r9d, %r10d
shrl $0x8, %r8d
andl %edx, %r8d
movl %r8d, %esi
addl %r10d, %esi
movl %esi, 0xdc(%rsp)
cmpl $0x7fff, %esi           # imm = 0x7FFF
ja 0x7a3c9
leaq 0x1(%rbx), %r8
cmpq %r11, %r8
jae 0x7a3c9
movzbl (%rbx), %r8d
movzbl 0x1(%rbx), %r9d
shll $0x8, %r9d
shll $0x10, %esi
orl %r8d, %esi
orl %r9d, %esi
addq $0x2, %rbx
movl %esi, 0xdc(%rsp)
incl %eax
movl %eax, 0x1ec(%rsp)
incq %rcx
cmpl 0x4(%rsp), %eax
jb 0x7a34e
movq 0x20(%rsp), %rdi
callq 0x80732
jmp 0x79a92
xorl %ebp, %ebp
movq %rbx, %rax
movzbl (%rax), %ecx
incq %rax
movl %ebp, %edx
shll $0x7, %edx
movl %ecx, %ebp
andl $0x7f, %ebp
orl %edx, %ebp
testb %cl, %cl
jns 0x79571
cmpq %rdi, %rax
jb 0x7a3f3
jmp 0x79571
xorl %eax, %eax
movq %rbx, %r13
movzbl (%r13), %ecx
incq %r13
movl %eax, %edx
shll $0x7, %edx
movl %ecx, %eax
andl $0x7f, %eax
orl %edx, %eax
testb %cl, %cl
jns 0x795d1
cmpq %rdi, %r13
jb 0x7a41c
jmp 0x795d1
nop