// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/htscodecs/htscodecs/rANS_static32x16pr.c
// Function: rans_compress_O0_32x16
unsigned char *rans_compress_O0_32x16(unsigned char *in,
                                      unsigned int in_size,
                                      unsigned char *out,
                                      unsigned int *out_size) {
    unsigned char *cp, *out_end, *out_free = NULL;
    RansEncSymbol syms[256];
    RansState ransN[NX];
    uint8_t* ptr;
    uint32_t F[256+MAGIC] = {0};
    int i, j, tab_size = 0, x, z;
    // -20 for order/size/meta
    unsigned int bound = rans_compress_bound_4x16(in_size,0)-20;

    if (!out) {
        *out_size = bound;
        out = out_free = malloc(*out_size);
    }
    if (!out || bound > *out_size)
        return NULL;

    // If "out" isn't word aligned, tweak out_end/ptr to ensure it is.
    // We already added more round in bound to allow for this.
    if (((size_t)out)&1)
        bound--;
    ptr = out_end = out + bound;

    if (in_size == 0)
        goto empty;

    // Compute statistics
    double e = hist8e(in, in_size, F);
    int low_ent = e < 2;

    // Normalise so frequences sum to power of 2
    uint32_t fsum = in_size;
    uint32_t max_val = round2(fsum);
    if (max_val > TOTFREQ)
        max_val = TOTFREQ;

    if (normalise_freq(F, fsum, max_val) < 0) {
        free(out_free);
        return NULL;
    }
    fsum=max_val;

    cp = out;
    cp += encode_freq(cp, F);
    tab_size = cp-out;
    //write(2, out+4, cp-(out+4));

    if (normalise_freq(F, fsum, TOTFREQ) < 0) {
        free(out_free);
        return NULL;
    }

    // Encode statistics.
    for (x = j = 0; j < 256; j++) {
        if (F[j]) {
            RansEncSymbolInit(&syms[j], x, F[j], TF_SHIFT);
            x += F[j];
        }
    }

    for (z = 0; z < NX; z++)
      RansEncInit(&ransN[z]);

    z = i = in_size&(NX-1);
    while (z-- > 0)
      RansEncPutSymbol(&ransN[z], &ptr, &syms[in[in_size-(i-z)]]);

    if (low_ent) {
        // orig
        // gcc   446
        // clang 427
        for (i=(in_size &~(NX-1)); likely(i>0); i-=NX) {
            for (z = NX-1; z >= 0; z-=4) {
                RansEncSymbol *s0 = &syms[in[i-(NX-z+0)]];
                RansEncSymbol *s1 = &syms[in[i-(NX-z+1)]];
                RansEncSymbol *s2 = &syms[in[i-(NX-z+2)]];
                RansEncSymbol *s3 = &syms[in[i-(NX-z+3)]];
                RansEncPutSymbol_branched(&ransN[z-0], &ptr, s0);
                RansEncPutSymbol_branched(&ransN[z-1], &ptr, s1);
                RansEncPutSymbol_branched(&ransN[z-2], &ptr, s2);
                RansEncPutSymbol_branched(&ransN[z-3], &ptr, s3);
                if (NX%8 == 0) {
                    z -= 4;
                    RansEncSymbol *s0 = &syms[in[i-(NX-z+0)]];
                    RansEncSymbol *s1 = &syms[in[i-(NX-z+1)]];
                    RansEncSymbol *s2 = &syms[in[i-(NX-z+2)]];
                    RansEncSymbol *s3 = &syms[in[i-(NX-z+3)]];
                    RansEncPutSymbol_branched(&ransN[z-0], &ptr, s0);
                    RansEncPutSymbol_branched(&ransN[z-1], &ptr, s1);
                    RansEncPutSymbol_branched(&ransN[z-2], &ptr, s2);
                    RansEncPutSymbol_branched(&ransN[z-3], &ptr, s3);
                }
            }
            if (z < -1) abort();
        }
    } else {
        // Branchless version optimises poorly with gcc unless we have
        // AVX2 capability, so have a custom rewrite of it.
        uint16_t* ptr16 = (uint16_t *)ptr;
        for (i=(in_size &~(NX-1)); likely(i>0); i-=NX) {
            // Unrolled copy of below, because gcc doesn't optimise this
            // well in the original form.
            //
            // Gcc11:   328 MB/s (this) vs 208 MB/s (orig)
            // Clang10: 352 MB/s (this) vs 340 MB/s (orig)
            //
            // for (z = NX-1; z >= 0; z-=4) {
            //  RansEncSymbol *s0 = &syms[in[i-(NX-z+0)]];
            //  RansEncSymbol *s1 = &syms[in[i-(NX-z+1)]];
            //  RansEncSymbol *s2 = &syms[in[i-(NX-z+2)]];
            //  RansEncSymbol *s3 = &syms[in[i-(NX-z+3)]];
            //  RansEncPutSymbol(&ransN[z-0], &ptr, s0);
            //  RansEncPutSymbol(&ransN[z-1], &ptr, s1);
            //  RansEncPutSymbol(&ransN[z-2], &ptr, s2);
            //  RansEncPutSymbol(&ransN[z-3], &ptr, s3);
            // }

            for (z = NX-1; z >= 0; z-=4) {
                // RansEncPutSymbol added in-situ
                RansState *rp = &ransN[z]-3;
                RansEncSymbol *sy[4];
                uint8_t *C = &in[i-(NX-z)]-3;

                sy[0] = &syms[C[3]];
                sy[1] = &syms[C[2]];

                int c0  = rp[3-0] > sy[0]->x_max;
                int c1  = rp[3-1] > sy[1]->x_max;

#ifdef HTSCODECS_LITTLE_ENDIAN
                ptr16[-1] = rp[3-0]; ptr16 -= c0;
                ptr16[-1] = rp[3-1]; ptr16 -= c1;
#else
                ((uint8_t *)&ptr16[-1])[0] = rp[3-0];
                ((uint8_t *)&ptr16[-1])[1] = rp[3-0]>>8;
                ptr16 -= c0;
                ((uint8_t *)&ptr16[-1])[0] = rp[3-1];
                ((uint8_t *)&ptr16[-1])[1] = rp[3-1]>>8;
                ptr16 -= c1;
#endif

                rp[3-0] = c0 ? rp[3-0]>>16 : rp[3-0];
                rp[3-1] = c1 ? rp[3-1]>>16 : rp[3-1];

                sy[2] = &syms[C[1]];
                sy[3] = &syms[C[0]];

                int c2  = rp[3-2] > sy[2]->x_max;
                int c3  = rp[3-3] > sy[3]->x_max;
#ifdef HTSCODECS_LITTLE_ENDIAN
                ptr16[-1] = rp[3-2]; ptr16 -= c2;
                ptr16[-1] = rp[3-3]; ptr16 -= c3;
#else
                ((uint8_t *)&ptr16[-1])[0] = rp[3-2];
                ((uint8_t *)&ptr16[-1])[1] = rp[3-2]>>8;
                ptr16 -= c2;
                ((uint8_t *)&ptr16[-1])[0] = rp[3-3];
                ((uint8_t *)&ptr16[-1])[1] = rp[3-3]>>8;
                ptr16 -= c3;
#endif
                rp[3-2] = c2 ? rp[3-2]>>16 : rp[3-2];
                rp[3-3] = c3 ? rp[3-3]>>16 : rp[3-3];

                int k;
                for (k = 0; k < 4; k++) {
                    uint64_t r64 = (uint64_t)rp[3-k];
                    uint32_t q = (r64 * sy[k]->rcp_freq) >> sy[k]->rcp_shift;
                    rp[3-k] += sy[k]->bias + q*sy[k]->cmpl_freq;
                }
            }
            if (z < -1) abort();
        }
        ptr = (uint8_t *)ptr16;
    }
    for (z = NX-1; z >= 0; z--)
        RansEncFlush(&ransN[z], &ptr);

 empty:
    // Finalise block size and return it
    *out_size = (out_end - ptr) + tab_size;

    memmove(out + tab_size, ptr, out_end-ptr);

    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x15d0, %rsp           # imm = 0x15D0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x14f0(%rbp), %rdi
xorl %esi, %esi
movl $0x420, %edx            # imm = 0x420
callq 0x4250
movl $0x0, -0x14fc(%rbp)
movl -0x14(%rbp), %edi
xorl %esi, %esi
callq 0x8e2d0
subl $0x14, %eax
movl %eax, -0x1508(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xbe5ba
movl -0x1508(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
callq 0x4650
movq %rax, -0x40(%rbp)
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xbe5cf
movl -0x1508(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jbe 0xbe5dc
movq $0x0, -0x8(%rbp)
jmp 0xbf152
movq -0x20(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xbe5f9
movl -0x1508(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1508(%rbp)
movq -0x20(%rbp), %rax
movl -0x1508(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq %rax, -0x10c8(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0xbe61c
jmp 0xbf102
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x14f0(%rbp), %rdx
callq 0xbf160
movsd %xmm0, -0x1510(%rbp)
movsd 0x36f11(%rip), %xmm0    # 0xf5550
ucomisd -0x1510(%rbp), %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1514(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1518(%rbp)
movl -0x1518(%rbp), %edi
callq 0xbf520
movl %eax, -0x151c(%rbp)
cmpl $0x1000, -0x151c(%rbp)  # imm = 0x1000
jbe 0xbe685
movl $0x1000, -0x151c(%rbp)  # imm = 0x1000
leaq -0x14f0(%rbp), %rdi
movl -0x1518(%rbp), %esi
movl -0x151c(%rbp), %edx
callq 0xbf580
cmpl $0x0, %eax
jge 0xbe6b8
movq -0x40(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0xbf152
movl -0x151c(%rbp), %eax
movl %eax, -0x1518(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x14f0(%rbp), %rsi
callq 0xbf800
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x14fc(%rbp)
leaq -0x14f0(%rbp), %rdi
movl -0x1518(%rbp), %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0xbf580
cmpl $0x0, %eax
jge 0xbe72f
movq -0x40(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0xbf152
movl $0x0, -0x14f8(%rbp)
movl $0x0, -0x1500(%rbp)
cmpl $0x100, -0x14f8(%rbp)   # imm = 0x100
jge 0xbe7c0
movslq -0x14f8(%rbp), %rax
cmpl $0x0, -0x14f0(%rbp,%rax,4)
je 0xbe7ad
movslq -0x14f8(%rbp), %rax
leaq -0x1040(%rbp), %rdi
shlq $0x4, %rax
addq %rax, %rdi
movl -0x1500(%rbp), %esi
movslq -0x14f8(%rbp), %rax
movl -0x14f0(%rbp,%rax,4), %edx
movl $0xc, %ecx
callq 0xbf8a0
movslq -0x14f8(%rbp), %rax
movl -0x14f0(%rbp,%rax,4), %eax
addl -0x1500(%rbp), %eax
movl %eax, -0x1500(%rbp)
jmp 0xbe7af
movl -0x14f8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14f8(%rbp)
jmp 0xbe743
movl $0x0, -0x1504(%rbp)
cmpl $0x20, -0x1504(%rbp)
jge 0xbe7fe
movslq -0x1504(%rbp), %rax
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
callq 0xbfa40
movl -0x1504(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1504(%rbp)
jmp 0xbe7ca
movl -0x14(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0x14f4(%rbp)
movl %eax, -0x1504(%rbp)
movl -0x1504(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x1504(%rbp)
cmpl $0x0, %eax
jle 0xbe872
movslq -0x1504(%rbp), %rax
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movl -0x14f4(%rbp), %edx
subl -0x1504(%rbp), %edx
subl %edx, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
leaq -0x1040(%rbp), %rdx
shlq $0x4, %rax
addq %rax, %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfa60
jmp 0xbe810
cmpl $0x0, -0x1514(%rbp)
je 0xbec29
movl -0x14(%rbp), %eax
andl $-0x20, %eax
movl %eax, -0x14f4(%rbp)
cmpl $0x0, -0x14f4(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xbec24
movl $0x1f, -0x1504(%rbp)
cmpl $0x0, -0x1504(%rbp)
jl 0xbec00
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
addl $0x0, %edx
subl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1528(%rbp)
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
addl $0x1, %edx
subl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1530(%rbp)
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
addl $0x2, %edx
subl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1538(%rbp)
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
addl $0x3, %edx
subl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1540(%rbp)
movl -0x1504(%rbp), %eax
subl $0x0, %eax
cltq
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1528(%rbp), %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfb20
movl -0x1504(%rbp), %eax
subl $0x1, %eax
cltq
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1530(%rbp), %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfb20
movl -0x1504(%rbp), %eax
subl $0x2, %eax
cltq
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1538(%rbp), %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfb20
movl -0x1504(%rbp), %eax
subl $0x3, %eax
cltq
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1540(%rbp), %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfb20
movl -0x1504(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x1504(%rbp)
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
addl $0x0, %edx
subl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1548(%rbp)
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
addl $0x1, %edx
subl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1550(%rbp)
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
addl $0x2, %edx
subl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1558(%rbp)
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
addl $0x3, %edx
subl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1560(%rbp)
movl -0x1504(%rbp), %eax
subl $0x0, %eax
cltq
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1548(%rbp), %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfb20
movl -0x1504(%rbp), %eax
subl $0x1, %eax
cltq
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1550(%rbp), %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfb20
movl -0x1504(%rbp), %eax
subl $0x2, %eax
cltq
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1558(%rbp), %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfb20
movl -0x1504(%rbp), %eax
subl $0x3, %eax
cltq
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1560(%rbp), %rdx
leaq -0x10c8(%rbp), %rsi
callq 0xbfb20
movl -0x1504(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x1504(%rbp)
jmp 0xbe8b0
cmpl $-0x1, -0x1504(%rbp)
jge 0xbec0e
callq 0x4260
jmp 0xbec10
movl -0x14f4(%rbp), %eax
subl $0x20, %eax
movl %eax, -0x14f4(%rbp)
jmp 0xbe88b
jmp 0xbf0bb
movq -0x10c8(%rbp), %rax
movq %rax, -0x1568(%rbp)
movl -0x14(%rbp), %eax
andl $-0x20, %eax
movl %eax, -0x14f4(%rbp)
cmpl $0x0, -0x14f4(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xbf0ad
movl $0x1f, -0x1504(%rbp)
cmpl $0x0, -0x1504(%rbp)
jl 0xbf089
movslq -0x1504(%rbp), %rcx
leaq -0x10c0(%rbp), %rax
shlq $0x2, %rcx
addq %rcx, %rax
addq $-0xc, %rax
movq %rax, -0x1570(%rbp)
movq -0x10(%rbp), %rax
movl -0x14f4(%rbp), %ecx
movl $0x20, %edx
subl -0x1504(%rbp), %edx
subl %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
addq $-0x3, %rax
movq %rax, -0x1598(%rbp)
movq -0x1598(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1590(%rbp)
movq -0x1598(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1588(%rbp)
movq -0x1570(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x1590(%rbp), %rcx
cmpl (%rcx), %eax
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x159c(%rbp)
movq -0x1570(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x1588(%rbp), %rcx
cmpl (%rcx), %eax
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x15a0(%rbp)
movq -0x1570(%rbp), %rax
movl 0xc(%rax), %eax
movw %ax, %cx
movq -0x1568(%rbp), %rax
movw %cx, -0x2(%rax)
movl -0x159c(%rbp), %ecx
movq -0x1568(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x1568(%rbp)
movq -0x1570(%rbp), %rax
movl 0x8(%rax), %eax
movw %ax, %cx
movq -0x1568(%rbp), %rax
movw %cx, -0x2(%rax)
movl -0x15a0(%rbp), %ecx
movq -0x1568(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x1568(%rbp)
cmpl $0x0, -0x159c(%rbp)
je 0xbedd5
movq -0x1570(%rbp), %rax
movl 0xc(%rax), %eax
shrl $0x10, %eax
movl %eax, -0x15c0(%rbp)
jmp 0xbede5
movq -0x1570(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x15c0(%rbp)
movl -0x15c0(%rbp), %ecx
movq -0x1570(%rbp), %rax
movl %ecx, 0xc(%rax)
cmpl $0x0, -0x15a0(%rbp)
je 0xbee13
movq -0x1570(%rbp), %rax
movl 0x8(%rax), %eax
shrl $0x10, %eax
movl %eax, -0x15c4(%rbp)
jmp 0xbee23
movq -0x1570(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x15c4(%rbp)
movl -0x15c4(%rbp), %ecx
movq -0x1570(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x1598(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1580(%rbp)
movq -0x1598(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq -0x1040(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1578(%rbp)
movq -0x1570(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x1580(%rbp), %rcx
cmpl (%rcx), %eax
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x15a4(%rbp)
movq -0x1570(%rbp), %rax
movl (%rax), %eax
movq -0x1578(%rbp), %rcx
cmpl (%rcx), %eax
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x15a8(%rbp)
movq -0x1570(%rbp), %rax
movl 0x4(%rax), %eax
movw %ax, %cx
movq -0x1568(%rbp), %rax
movw %cx, -0x2(%rax)
movl -0x15a4(%rbp), %ecx
movq -0x1568(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x1568(%rbp)
movq -0x1570(%rbp), %rax
movl (%rax), %eax
movw %ax, %cx
movq -0x1568(%rbp), %rax
movw %cx, -0x2(%rax)
movl -0x15a8(%rbp), %ecx
movq -0x1568(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x1568(%rbp)
cmpl $0x0, -0x15a4(%rbp)
je 0xbef48
movq -0x1570(%rbp), %rax
movl 0x4(%rax), %eax
shrl $0x10, %eax
movl %eax, -0x15c8(%rbp)
jmp 0xbef58
movq -0x1570(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x15c8(%rbp)
movl -0x15c8(%rbp), %ecx
movq -0x1570(%rbp), %rax
movl %ecx, 0x4(%rax)
cmpl $0x0, -0x15a8(%rbp)
je 0xbef85
movq -0x1570(%rbp), %rax
movl (%rax), %eax
shrl $0x10, %eax
movl %eax, -0x15cc(%rbp)
jmp 0xbef94
movq -0x1570(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x15cc(%rbp)
movl -0x15cc(%rbp), %ecx
movq -0x1570(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x15ac(%rbp)
cmpl $0x4, -0x15ac(%rbp)
jge 0xbf073
movq -0x1570(%rbp), %rax
movl $0x3, %ecx
subl -0x15ac(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, -0x15b8(%rbp)
movq -0x15b8(%rbp), %rax
movslq -0x15ac(%rbp), %rcx
movq -0x1590(%rbp,%rcx,8), %rcx
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movslq -0x15ac(%rbp), %rcx
movq -0x1590(%rbp,%rcx,8), %rcx
movzwl 0xe(%rcx), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movl %eax, -0x15bc(%rbp)
movslq -0x15ac(%rbp), %rax
movq -0x1590(%rbp,%rax,8), %rax
movl 0x8(%rax), %edx
movl -0x15bc(%rbp), %eax
movslq -0x15ac(%rbp), %rcx
movq -0x1590(%rbp,%rcx,8), %rcx
movzwl 0xc(%rcx), %ecx
imull %ecx, %eax
addl %eax, %edx
movq -0x1570(%rbp), %rax
movl $0x3, %ecx
subl -0x15ac(%rbp), %ecx
movslq %ecx, %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x15ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x15ac(%rbp)
jmp 0xbefad
jmp 0xbf075
movl -0x1504(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x1504(%rbp)
jmp 0xbec68
cmpl $-0x1, -0x1504(%rbp)
jge 0xbf097
callq 0x4260
jmp 0xbf099
movl -0x14f4(%rbp), %eax
subl $0x20, %eax
movl %eax, -0x14f4(%rbp)
jmp 0xbec43
movq -0x1568(%rbp), %rax
movq %rax, -0x10c8(%rbp)
movl $0x1f, -0x1504(%rbp)
cmpl $0x0, -0x1504(%rbp)
jl 0xbf100
movslq -0x1504(%rbp), %rax
leaq -0x10c0(%rbp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
leaq -0x10c8(%rbp), %rsi
callq 0xbfbb0
movl -0x1504(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1504(%rbp)
jmp 0xbf0c5
jmp 0xbf102
movq -0x38(%rbp), %rax
movq -0x10c8(%rbp), %rcx
subq %rcx, %rax
movslq -0x14fc(%rbp), %rcx
addq %rcx, %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
movslq -0x14fc(%rbp), %rax
addq %rax, %rdi
movq -0x10c8(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x10c8(%rbp), %rax
subq %rax, %rdx
callq 0x4810
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x15d0, %rsp           # imm = 0x15D0
popq %rbp
retq
nop