// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/htscodecs/htscodecs/rANS_static32x16pr.c
// Function: rans_compress_O1_32x16
unsigned char *rans_compress_O1_32x16(unsigned char *in,
                                      unsigned int in_size,
                                      unsigned char *out,
                                      unsigned int *out_size) {
    unsigned char *cp, *out_end, *out_free = NULL;
    unsigned int tab_size;
    int bound = rans_compress_bound_4x16(in_size,1)-20, z;
    RansState ransN[NX];

    if (in_size < NX) // force O0 instead
        return NULL;

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

    if (((size_t)out)&1)
        bound--;
    out_end = out + bound;

    RansEncSymbol (*syms)[256] = htscodecs_tls_alloc(256 * (sizeof(*syms)));
    if (!syms) {
        free(out_free);
        return NULL;
    }

    cp = out;
    int shift = encode_freq1(in, in_size, 32, syms, &cp); 
    if (shift < 0) {
        free(out_free);
        htscodecs_tls_free(syms);
        return NULL;
    }
    tab_size = cp - out;

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

    uint8_t* ptr = out_end;

    int iN[NX], isz4 = in_size/NX, i;
    for (z = 0; z < NX; z++)
        iN[z] = (z+1)*isz4-2;

    unsigned char lN[NX];
    for (z = 0; z < NX; z++)
        lN[z] = in[iN[z]+1];

    // Deal with the remainder
    z = NX-1;
    lN[z] = in[in_size-1];
    for (iN[z] = in_size-2; iN[z] > NX*isz4-2; iN[z]--) {
        unsigned char c = in[iN[z]];
        RansEncPutSymbol(&ransN[z], &ptr, &syms[c][lN[z]]);
        lN[z] = c;
    }

    unsigned char *i32[NX];
    for (i = 0; i < NX; i++)
        i32[i] = &in[iN[i]];

    for (; likely(i32[0] >= in); ) {
        uint16_t *ptr16 = (uint16_t *)ptr;
        for (z = NX-1; z >= 0; z-=4) {
            RansEncSymbol *sy[4];
            int k;

            for (k = 0; k < 4; k++) {
                sy[k] = &syms[*i32[z-k]][lN[z-k]];
                lN[z-k] = *i32[z-k]--;
            }

            // RansEncPutSymbol added in-situ
            for (k = 0; k < 4; k++) {
                int c = ransN[z-k] > sy[k]->x_max;
#ifdef HTSCODECS_LITTLE_ENDIAN
                ptr16[-1] = ransN[z-k];
#else
                ((uint8_t *)&ptr16[-1])[0] = ransN[z-k];
                ((uint8_t *)&ptr16[-1])[1] = ransN[z-k]>>8;
#endif
                ptr16 -= c;
                //ransN[z-k] >>= c<<4;
                ransN[z-k] = c ? ransN[z-k]>>16 : ransN[z-k];
            }

            for (k = 0; k < 4; k++) {
                uint64_t r64 = ransN[z-k];
                uint32_t q = (r64 * sy[k]->rcp_freq) >> sy[k]->rcp_shift;
                ransN[z-k] += sy[k]->bias + q*sy[k]->cmpl_freq;
            }
        }
        ptr = (uint8_t *)ptr16;
    }

    for (z = NX-1; z>=0; z--)
        RansEncPutSymbol(&ransN[z], &ptr, &syms[0][lN[z]]);

    for (z = NX-1; z>=0; z--)
        RansEncFlush(&ransN[z], &ptr);

    *out_size = (out_end - ptr) + tab_size;

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

    htscodecs_tls_free(syms);
    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x958, %rsp            # imm = 0x958
movq %rcx, %r15
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, 0x20(%rsp)
movl %esi, %edi
movl $0x1, %esi
callq 0x61e28
cmpl $0x20, %ebp
jb 0x77392
movl %eax, %r14d
leal -0x14(%r14), %ebx
testq %r13, %r13
je 0x76518
xorl %eax, %eax
cmpl (%r15), %ebx
jbe 0x7652e
jmp 0x77394
movl %ebx, (%r15)
movl %ebx, %edi
callq 0x4680
movq %rax, %r13
testq %rax, %rax
je 0x77392
movq %rax, 0x48(%rsp)
addl $-0x15, %r14d
testb $0x1, %r13b
cmovel %ebx, %r14d
movl $0x100000, %edi         # imm = 0x100000
callq 0x7e144
testq %rax, %rax
je 0x766f1
movq %rax, %r12
movl $0x100, %edi            # imm = 0x100
movl $0x400, %esi            # imm = 0x400
callq 0x7e245
testq %rax, %rax
je 0x77380
movq %rax, (%rsp)
leaq 0x130(%rsp), %rdi
movl $0x420, %edx            # imm = 0x420
xorl %esi, %esi
callq 0x4260
movl %ebp, %ebx
movq 0x20(%rsp), %rax
addq %rax, %rbx
cmpl $0x7a120, %ebp          # imm = 0x7A120
movq %rbp, 0x40(%rsp)
jbe 0x76700
movq %r14, %rbp
movq %r13, %r14
movl $0x100, %edi            # imm = 0x100
movl $0x40c, %esi            # imm = 0x40C
callq 0x7e245
testq %rax, %rax
movq (%rsp), %r13
je 0x76e03
leaq -0x8(%rbx), %rsi
xorl %edx, %edx
movq 0x20(%rsp), %rcx
movzbl (%rcx), %r8d
movzbl 0x1(%rcx), %r9d
movzbl 0x2(%rcx), %r10d
movzbl 0x3(%rcx), %r11d
movzbl %dl, %edx
shll $0xa, %edx
addq %r13, %rdx
incl (%rdx,%r8,4)
imulq $0x40c, %r8, %rdx       # imm = 0x40C
addq %rax, %rdx
incl (%rdx,%r9,4)
shll $0xa, %r9d
addq %r13, %r9
incl (%r9,%r10,4)
imulq $0x40c, %r10, %rdx      # imm = 0x40C
addq %rax, %rdx
incl (%rdx,%r11,4)
movzbl 0x4(%rcx), %r8d
movzbl 0x5(%rcx), %r9d
movzbl 0x6(%rcx), %r10d
movzbl 0x7(%rcx), %edx
shll $0xa, %r11d
addq %r13, %r11
incl (%r11,%r8,4)
imulq $0x40c, %r8, %r8        # imm = 0x40C
addq %rax, %r8
incl (%r8,%r9,4)
shll $0xa, %r9d
addq %r13, %r9
incl (%r9,%r10,4)
addq $0x8, %rcx
imulq $0x40c, %r10, %r8       # imm = 0x40C
addq %rax, %r8
incl (%r8,%rdx,4)
cmpq %rsi, %rcx
jb 0x765cd
cmpq %rbx, %rcx
movq %r14, %rdi
movq %rbp, %r14
jae 0x7668d
movl %edx, %esi
movzbl (%rcx), %edx
movzbl %sil, %esi
shll $0xa, %esi
addq %r13, %rsi
incl (%rsi,%rdx,4)
incq %rcx
movl %edx, %esi
cmpq %rbx, %rcx
jb 0x76673
incl 0x130(%rsp,%rdx,4)
xorl %ecx, %ecx
movq %rax, %rdx
movq %r13, %rsi
movq %rdi, %r13
xorl %r8d, %r8d
xorl %edi, %edi
movl (%rsi,%r8,4), %r9d
addl (%rdx,%r8,4), %r9d
movl %r9d, (%rsi,%r8,4)
addl %r9d, %edi
incq %r8
cmpq $0x100, %r8             # imm = 0x100
jne 0x766a4
addl %edi, 0x130(%rsp,%rcx,4)
incq %rcx
addq $0x400, %rsi            # imm = 0x400
addq $0x40c, %rdx            # imm = 0x40C
cmpq $0x100, %rcx            # imm = 0x100
jne 0x7669f
movq %rax, %rdi
callq 0x7e26a
movq (%rsp), %r10
jmp 0x76806
movq 0x48(%rsp), %rdi
callq 0x45c0
jmp 0x77392
leaq -0x8(%rbx), %rcx
xorl %edx, %edx
movq (%rsp), %r10
movzbl (%rax), %edi
movzbl 0x1(%rax), %r8d
movzbl 0x2(%rax), %r9d
movzbl 0x3(%rax), %esi
movzbl %dl, %edx
shll $0xa, %edx
addq %r10, %rdx
incl (%rdx,%rdi,4)
shll $0xa, %edi
addq %r10, %rdi
incl (%rdi,%r8,4)
shll $0xa, %r8d
addq %r10, %r8
incl (%r8,%r9,4)
shll $0xa, %r9d
addq %r10, %r9
incl (%r9,%rsi,4)
movzbl 0x4(%rax), %r8d
movzbl 0x5(%rax), %r9d
movzbl 0x6(%rax), %edi
movzbl 0x7(%rax), %edx
shll $0xa, %esi
addq %r10, %rsi
incl (%rsi,%r8,4)
shll $0xa, %r8d
addq %r10, %r8
incl (%r8,%r9,4)
shll $0xa, %r9d
addq %r10, %r9
incl (%r9,%rdi,4)
addq $0x8, %rax
shll $0xa, %edi
addq %r10, %rdi
incl (%rdi,%rdx,4)
cmpq %rcx, %rax
jb 0x7670a
cmpq %rbx, %rax
jae 0x767af
movl %edx, %ecx
movzbl (%rax), %edx
movzbl %cl, %ecx
shll $0xa, %ecx
addq %r10, %rcx
incl (%rcx,%rdx,4)
incq %rax
movl %edx, %ecx
cmpq %rbx, %rax
jb 0x76796
incl 0x130(%rsp,%rdx,4)
xorl %eax, %eax
movq %r10, %rcx
pxor %xmm0, %xmm0
xorl %edx, %edx
movdqu (%rcx,%rdx,4), %xmm1
paddd %xmm1, %xmm0
addq $0x4, %rdx
cmpq $0x100, %rdx            # imm = 0x100
jne 0x767c1
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
paddd %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
paddd %xmm1, %xmm0
movd %xmm0, %edx
addl %edx, 0x130(%rsp,%rax,4)
incq %rax
addq $0x400, %rcx            # imm = 0x400
cmpq $0x100, %rax            # imm = 0x100
jne 0x767bb
movq %r15, 0x60(%rsp)
movq %r14, 0x58(%rsp)
movslq %r14d, %rax
movq %rax, 0x50(%rsp)
leaq (%rax,%r13), %rbp
movq 0x40(%rsp), %rax
shrl $0x5, %eax
movl %eax, 0x38(%rsp)
movl %eax, %eax
movq 0x20(%rsp), %rcx
addq %rax, %rcx
movl $0x1f, %edx
movzbl (%rcx), %esi
incl (%r10,%rsi,4)
addq %rax, %rcx
decq %rdx
jne 0x76837
movl 0x130(%rsp), %eax
movl $0x1, 0x130(%rsp)
leaq 0x1(%r13), %r9
movb $0x0, (%r13)
xorl %ecx, %ecx
movl $0x1, %edx
xorl %esi, %esi
movq %r9, %r8
movq %r8, %rdi
cmpl $0x0, 0x130(%rsp,%rcx,4)
je 0x76880
testl %esi, %esi
je 0x76894
decl %esi
movq %rdi, %r8
incq %rcx
incq %rdx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x7686d
jmp 0x768e6
leaq 0x1(%rdi), %r8
movb %cl, (%rdi)
xorl %esi, %esi
testq %rcx, %rcx
je 0x76883
cmpl $0x0, 0x12c(%rsp,%rcx,4)
je 0x76883
leal 0x1(%rcx), %r8d
movl %r8d, %esi
cmpq $0xfe, %rcx
ja 0x768d9
movq %rdx, %rsi
cmpl $0x0, 0x130(%rsp,%rsi,4)
je 0x768d9
incq %rsi
cmpq $0x100, %rsi            # imm = 0x100
jne 0x768be
movl $0x100, %esi            # imm = 0x100
subl %r8d, %esi
movb %sil, 0x1(%rdi)
addq $0x2, %rdi
jmp 0x76880
movq %r13, 0x10(%rsp)
addl $0x1f, %eax
movb $0x0, (%r8)
subl %r9d, %r8d
incl %r8d
movslq %r8d, %rcx
movq %r9, 0x30(%rsp)
addq %r9, %rcx
movq %rcx, 0x18(%rsp)
leaq 0x130(%rsp), %r14
movl %eax, (%r14)
leaq 0x550(%rsp), %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x4260
movq %r14, %rdi
movq (%rsp), %rbx
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x62f73
movq %rbx, %rsi
movl %eax, %ecx
movl $0x1, %r15d
movl $0x1, %r8d
shll %cl, %r8d
movl $0x8000, %eax           # imm = 0x8000
movl %ecx, 0xc(%rsp)
shrl %cl, %eax
xorl %ecx, %ecx
shll $0x10, %eax
movl %eax, 0x3c(%rsp)
leal -0x1(%r8), %eax
movq %rax, 0x68(%rsp)
movq %rbx, %r14
movl 0x130(%rsp,%rcx,4), %edx
testl %edx, %edx
je 0x76d66
movl 0x550(%rsp,%rcx,4), %eax
movl $0x400, %r9d            # imm = 0x400
cmpl %r9d, %eax
movl $0x400, %r9d            # imm = 0x400
cmovbl %eax, %r9d
cmpl $0xa, 0xc(%rsp)
cmovnel %eax, %r9d
movq %rcx, 0x28(%rsp)
movq %rcx, %rbx
shlq $0xa, %rbx
addq %rsi, %rbx
movq %r9, %rdi
movq %r9, %rcx
shlq $0x1f, %rcx
movb $0x1, %r10b
movslq %edx, %r9
xorl %r13d, %r13d
movq %rcx, %rax
xorl %edx, %edx
divq %r9
movq %rax, %rsi
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
idivl %r9d
movslq %eax, %r9
addq %rsi, %r9
xorl %edx, %edx
xorl %esi, %esi
xorl %eax, %eax
movl (%r14,%r13,4), %r11d
testq %r11, %r11
je 0x76a16
cmpl %r11d, %esi
cmovbl %r13d, %eax
cmovbel %r11d, %esi
imulq %r9, %r11
shrq $0x1f, %r11
cmpl $0x2, %r11d
cmovbl %r15d, %r11d
movl %r11d, (%r14,%r13,4)
addl %edx, %r11d
movl %r11d, %edx
incq %r13
cmpq $0x100, %r13            # imm = 0x100
jne 0x769e8
movl %edi, %esi
subl %edx, %esi
cltq
testl %esi, %esi
jg 0x76ab6
jns 0x76ac9
movl (%rbx,%rax,4), %r9d
movl %esi, %r11d
negl %r11d
cmpl %r11d, %r9d
jbe 0x76a57
movl %r9d, %r13d
shrl %r13d
cmpl %r11d, %r13d
setb %r11b
testb %r11b, %r10b
je 0x76abf
testb $0x1, %r10b
movl $0x0, %r10d
jne 0x769c1
addl %r9d, %esi
movl $0x1, (%rbx,%rax,4)
decl %esi
je 0x76ac9
xorl %ecx, %ecx
movq (%rsp), %r13
movl (%r14,%rcx,4), %edx
cmpl $0x2, %edx
jb 0x76aa4
movl %esi, %r9d
negl %r9d
movl $0x1, %r10d
subl %edx, %r10d
cmpl %r9d, %edx
cmoval %esi, %r10d
addl %r10d, %edx
movl %edx, (%r14,%rcx,4)
subl %r10d, %esi
cmpq $0xfe, %rcx
ja 0x76acd
incq %rcx
testl %esi, %esi
jne 0x76a7b
jmp 0x76acd
leaq (%rbx,%rax,4), %rcx
movl (%rcx), %r9d
jmp 0x76ac3
leaq (%rbx,%rax,4), %rcx
addl %esi, %r9d
movl %r9d, (%rcx)
movq (%rsp), %r13
cmpl $0x0, (%rbx,%rax,4)
movq 0x28(%rsp), %rax
je 0x76e03
movl %edi, 0x130(%rsp,%rax,4)
xorl %ecx, %ecx
xorl %esi, %esi
movq 0x18(%rsp), %r9
movq %r9, %rax
cmpl $0x0, 0x130(%rsp,%rcx,4)
je 0x76b2d
movl (%rbx,%rcx,4), %edx
testl %edx, %edx
je 0x76b25
testl %esi, %esi
je 0x76b14
decl %esi
movslq %esi, %rdx
subq %rdx, %rax
movb %dl, (%rax)
incq %rax
movl (%rbx,%rcx,4), %edx
cmpl $0x7f, %edx
ja 0x76b3e
movb %dl, (%rax)
movl $0x1, %edx
jmp 0x76c03
incl %esi
movb $0x0, (%rax)
incq %rax
incq %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x76aef
jmp 0x76c1d
movl %edx, %esi
cmpl $0x3fff, %edx           # imm = 0x3FFF
ja 0x76b62
shrl $0x7, %esi
orb $-0x80, %sil
movb %sil, (%rax)
andb $0x7f, %dl
movb %dl, 0x1(%rax)
movl $0x2, %edx
jmp 0x76c03
cmpl $0x1fffff, %edx         # imm = 0x1FFFFF
ja 0x76b8e
shrl $0xe, %esi
orb $-0x80, %sil
movb %sil, (%rax)
movl %edx, %esi
shrl $0x7, %esi
orb $-0x80, %sil
movb %sil, 0x1(%rax)
andb $0x7f, %dl
movb %dl, 0x2(%rax)
movl $0x3, %edx
jmp 0x76c03
cmpl $0xfffffff, %edx        # imm = 0xFFFFFFF
ja 0x76bc7
shrl $0x15, %esi
orb $-0x80, %sil
movb %sil, (%rax)
movl %edx, %esi
shrl $0xe, %esi
orb $-0x80, %sil
movb %sil, 0x1(%rax)
movl %edx, %esi
shrl $0x7, %esi
orb $-0x80, %sil
movb %sil, 0x2(%rax)
andb $0x7f, %dl
movb %dl, 0x3(%rax)
movl $0x4, %edx
jmp 0x76c03
shrl $0x1c, %esi
orb $-0x80, %sil
movb %sil, (%rax)
movl %edx, %esi
shrl $0x15, %esi
orb $-0x80, %sil
movb %sil, 0x1(%rax)
movl %edx, %esi
shrl $0xe, %esi
orb $-0x80, %sil
movb %sil, 0x2(%rax)
movl %edx, %esi
shrl $0x7, %esi
orb $-0x80, %sil
movb %sil, 0x3(%rax)
andb $0x7f, %dl
movb %dl, 0x4(%rax)
movl $0x5, %edx
addq %rdx, %rax
incq %rcx
movl $0x0, %esi
cmpq $0x100, %rcx            # imm = 0x100
jne 0x76aef
jmp 0x76c2e
testl %esi, %esi
je 0x76c2e
decl %esi
movslq %esi, %rcx
subq %rcx, %rax
movb %cl, (%rax)
incq %rax
movq 0x28(%rsp), %rcx
movl 0x130(%rsp,%rcx,4), %ecx
movl %r8d, %edx
notl %edx
testl %edx, %ecx
je 0x76c80
xorl %edx, %edx
cmpl %r8d, %ecx
jae 0x76c55
xorl %edx, %edx
addl %ecx, %ecx
incl %edx
cmpl %r8d, %ecx
jb 0x76c4c
movd %edx, %xmm1
pxor %xmm0, %xmm0
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
xorl %ecx, %ecx
movdqu (%r14,%rcx,4), %xmm1
pslld %xmm0, %xmm1
movdqu %xmm1, (%r14,%rcx,4)
addq $0x4, %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x76c63
movq 0x28(%rsp), %rcx
movl %r8d, 0x130(%rsp,%rcx,4)
cmpl $0x10, 0xc(%rsp)
ja 0x773e4
subl %r9d, %eax
cltq
addq %rax, %r9
movq %r9, 0x18(%rsp)
xorl %r10d, %r10d
xorl %r11d, %r11d
movl %r8d, %eax
subl %r11d, %eax
jb 0x773c5
movl (%rbx,%r10,4), %r9d
cmpl %r9d, %eax
jb 0x773a6
movq %rcx, %rax
shlq $0xc, %rax
addq %r12, %rax
movq %r10, %r13
shlq $0x4, %r13
addq %rax, %r13
movl 0x3c(%rsp), %eax
imull %r9d, %eax
decl %eax
movl %eax, (%r13)
movl %r8d, %eax
subl %r9d, %eax
movw %ax, 0xc(%r13)
cmpl $0x2, %r9d
jae 0x76d11
movl $0xffffffff, 0x4(%r13)  # imm = 0xFFFFFFFF
movq 0x68(%rsp), %rax
addl %r11d, %eax
movl %eax, 0x8(%r13)
movw $0x20, %si
jmp 0x76d49
movl $0x1e, %esi
leal -0x1e(%rsi), %ecx
movl $0x1, %eax
shll %cl, %eax
incl %esi
cmpl %r9d, %eax
jb 0x76d16
movl $0x1, %eax
movl %esi, %ecx
shlq %cl, %rax
addq %r9, %rax
decq %rax
xorl %edx, %edx
divq %r9
movl %eax, 0x4(%r13)
movl %r11d, 0x8(%r13)
movq 0x28(%rsp), %rcx
movw %si, 0xe(%r13)
addl (%rbx,%r10,4), %r11d
incq %r10
cmpq $0x100, %r10            # imm = 0x100
jne 0x76cab
movq (%rsp), %rsi
incq %rcx
addq $0x400, %r14            # imm = 0x400
cmpq $0x100, %rcx            # imm = 0x100
jne 0x76973
movl 0xc(%rsp), %eax
shlb $0x4, %al
movq 0x10(%rsp), %r13
movb %al, (%r13)
movq 0x18(%rsp), %rax
movq %rax, %rbx
subq %r13, %rbx
cmpq $0x3e9, %rbx            # imm = 0x3E9
jl 0x76e10
movq %rax, %rsi
movq 0x30(%rsp), %rdi
subq %rdi, %rsi
leaq 0xb0(%rsp), %rcx
movq %rsi, %r14
xorl %edx, %edx
callq 0x61ed5
movq %rax, %rcx
testq %rax, %rax
movq 0x20(%rsp), %r15
je 0x76fea
movl 0xb0(%rsp), %r8d
leal 0x6(%r8), %eax
cmpq %rax, %rbx
jbe 0x76fea
orb $0x1, (%r13)
movq %r14, %rsi
cmpl $0x7f, %esi
ja 0x76e1a
movq 0x30(%rsp), %r14
movb %sil, (%r14)
movl $0x1, %eax
jmp 0x76ee6
movq %r13, %rdi
callq 0x7e26a
jmp 0x77380
movq 0x20(%rsp), %r15
jmp 0x76ff6
cmpl $0x3fff, %esi           # imm = 0x3FFF
movq 0x30(%rsp), %r14
movl %esi, %eax
ja 0x76e48
shrl $0x7, %eax
orb $-0x80, %al
movq 0x10(%rsp), %rdx
movb %al, 0x1(%rdx)
andb $0x7f, %sil
movb %sil, 0x2(%rdx)
movl $0x2, %eax
jmp 0x76ee6
cmpl $0x1fffff, %esi         # imm = 0x1FFFFF
ja 0x76e76
shrl $0xe, %eax
orb $-0x80, %al
movq 0x10(%rsp), %rdx
movb %al, 0x1(%rdx)
movl %esi, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x2(%rdx)
andb $0x7f, %sil
movb %sil, 0x3(%rdx)
movl $0x3, %eax
jmp 0x76ee6
cmpl $0xfffffff, %esi        # imm = 0xFFFFFFF
ja 0x76eae
shrl $0x15, %eax
orb $-0x80, %al
movq 0x10(%rsp), %rdx
movb %al, 0x1(%rdx)
movl %esi, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x2(%rdx)
movl %esi, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x3(%rdx)
andb $0x7f, %sil
movb %sil, 0x4(%rdx)
movl $0x4, %eax
jmp 0x76ee6
shrl $0x1c, %eax
orb $-0x80, %al
movq 0x10(%rsp), %rdx
movb %al, 0x1(%rdx)
movl %esi, %eax
shrl $0x15, %eax
orb $-0x80, %al
movb %al, 0x2(%rdx)
movl %esi, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x3(%rdx)
movl %esi, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x4(%rdx)
andb $0x7f, %sil
movb %sil, 0x5(%rdx)
movl $0x5, %eax
addq %rax, %r14
cmpl $0x7f, %r8d
ja 0x76efc
movb %r8b, (%r14)
movl $0x1, %eax
jmp 0x76fc3
movl %r8d, %eax
cmpl $0x3fff, %r8d           # imm = 0x3FFF
ja 0x76f23
shrl $0x7, %eax
orb $-0x80, %al
movb %al, (%r14)
movl %r8d, %eax
andb $0x7f, %al
movb %al, 0x1(%r14)
movl $0x2, %eax
jmp 0x76fc3
cmpl $0x1fffff, %r8d         # imm = 0x1FFFFF
ja 0x76f50
shrl $0xe, %eax
orb $-0x80, %al
movb %al, (%r14)
movl %r8d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x1(%r14)
movl %r8d, %eax
andb $0x7f, %al
movb %al, 0x2(%r14)
movl $0x3, %eax
jmp 0x76fc3
cmpl $0xfffffff, %r8d        # imm = 0xFFFFFFF
ja 0x76f89
shrl $0x15, %eax
orb $-0x80, %al
movb %al, (%r14)
movl %r8d, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x1(%r14)
movl %r8d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x2(%r14)
movl %r8d, %eax
andb $0x7f, %al
movb %al, 0x3(%r14)
movl $0x4, %eax
jmp 0x76fc3
shrl $0x1c, %eax
orb $-0x80, %al
movb %al, (%r14)
movl %r8d, %eax
shrl $0x15, %eax
orb $-0x80, %al
movb %al, 0x1(%r14)
movl %r8d, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x2(%r14)
movl %r8d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x3(%r14)
movl %r8d, %eax
andb $0x7f, %al
movb %al, 0x4(%r14)
movl $0x5, %eax
addq %rax, %r14
movq %r14, %rdi
movq %rcx, %rbx
movq %rcx, %rsi
movq %r8, %r13
movq %r8, %rdx
callq 0x43c0
movq %rbx, %rcx
addq %r13, %r14
movq %r14, 0x18(%rsp)
movq 0x10(%rsp), %r13
movq %rcx, %rdi
callq 0x45c0
movq (%rsp), %rsi
movq %rsi, %rdi
callq 0x7e26a
cmpl $0x0, 0xc(%rsp)
js 0x77380
xorl %eax, %eax
movaps 0x295de(%rip), %xmm0    # 0xa05f0
movaps %xmm0, 0x550(%rsp,%rax,4)
addq $0x4, %rax
cmpq $0x20, %rax
jne 0x77012
movd 0x38(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movaps 0x1d83a(%rip), %xmm1    # 0x94870
movaps 0x1d843(%rip), %xmm2    # 0x94880
xorl %eax, %eax
pcmpeqd %xmm3, %xmm3
pshufd $0xf5, %xmm0, %xmm4     # xmm4 = xmm0[1,1,3,3]
movdqa 0x295b0(%rip), %xmm5    # 0xa0600
movdqa 0x1d848(%rip), %xmm6    # 0x948a0
movaps %xmm2, %xmm7
shufps $0x88, %xmm1, %xmm7     # xmm7 = xmm7[0,2],xmm1[0,2]
psubd %xmm3, %xmm7
movdqa %xmm0, %xmm8
pmuludq %xmm7, %xmm8
pshufd $0xe8, %xmm8, %xmm8     # xmm8 = xmm8[0,2,2,3]
pshufd $0xf5, %xmm7, %xmm7     # xmm7 = xmm7[1,1,3,3]
pmuludq %xmm4, %xmm7
pshufd $0xe8, %xmm7, %xmm7     # xmm7 = xmm7[0,2,2,3]
punpckldq %xmm7, %xmm8    # xmm8 = xmm8[0],xmm7[0],xmm8[1],xmm7[1]
paddd %xmm5, %xmm8
movdqa %xmm8, 0xb0(%rsp,%rax,4)
addq $0x4, %rax
paddq %xmm6, %xmm2
paddq %xmm6, %xmm1
cmpq $0x20, %rax
jne 0x77058
xorl %eax, %eax
movslq 0xb0(%rsp,%rax,4), %rcx
movb 0x1(%r15,%rcx), %cl
movb %cl, 0x70(%rsp,%rax)
incq %rax
cmpq $0x20, %rax
jne 0x770a9
movq 0x40(%rsp), %rdx
leal -0x1(%rdx), %eax
movb (%r15,%rax), %cl
movb %cl, 0x8f(%rsp)
leal -0x2(%rdx), %esi
andl $-0x20, %edx
addl $-0x2, %edx
movl %esi, 0x12c(%rsp)
cmpl %edx, %esi
jle 0x77167
movq %rdx, %r10
movl 0x5cc(%rsp), %eax
movl %esi, %edx
movzbl %cl, %esi
movzbl (%r15,%rdx), %edx
movl %edx, %edi
shll $0xc, %edi
addq %r12, %rdi
shll $0x4, %esi
xorl %ecx, %ecx
cmpl (%rsi,%rdi), %eax
seta %cl
leal (%rcx,%rcx), %r8d
movw %ax, -0x2(%rbp)
shll $0x4, %ecx
shrl %cl, %eax
movl 0x4(%rsi,%rdi), %r9d
imulq %rax, %r9
movb 0xe(%rsi,%rdi), %cl
shrq %cl, %r9
addl 0x8(%rsi,%rdi), %eax
subq %r8, %rbp
movzwl 0xc(%rsi,%rdi), %ecx
imull %r9d, %ecx
addl %eax, %ecx
movl %ecx, 0x5cc(%rsp)
movb %dl, 0x8f(%rsp)
movl 0x12c(%rsp), %esi
decl %esi
movl %esi, 0x12c(%rsp)
movl %ecx, %eax
movl %edx, %ecx
cmpl %r10d, %esi
jg 0x770f4
movq 0x18(%rsp), %rax
subq %r13, %rax
xorl %ecx, %ecx
movq %r15, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movq 0xb0(%rsp,%rcx,4), %xmm1
xorps %xmm2, %xmm2
pcmpgtd %xmm1, %xmm2
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
paddq %xmm0, %xmm1
movdqa %xmm1, 0x130(%rsp,%rcx,8)
addq $0x2, %rcx
cmpq $0x20, %rcx
jne 0x7717b
cmpq %r15, 0x130(%rsp)
jb 0x772b0
movl $0x1f, %edx
movq %rdx, %rcx
xorl %esi, %esi
movq 0x130(%rsp,%rcx,8), %rdi
movzbl (%rdi), %r8d
movzbl 0x70(%rsp,%rcx), %r9d
movb %r8b, 0x70(%rsp,%rcx)
shll $0xc, %r8d
shll $0x4, %r9d
addq %r12, %r9
addq %r8, %r9
movq %r9, 0x90(%rsp,%rsi,8)
decq %rdi
movq %rdi, 0x130(%rsp,%rcx,8)
incq %rsi
decq %rcx
cmpq $0x4, %rsi
jne 0x771be
leaq (%rsp,%rdx,4), %rsi
addq $0x550, %rsi            # imm = 0x550
movq %rsi, %rcx
xorl %edi, %edi
movl (%rcx), %r8d
movq 0x90(%rsp,%rdi,8), %r9
movl %r8d, %r10d
shrl $0x10, %r10d
xorl %r11d, %r11d
cmpl (%r9), %r8d
seta %r11b
cmovbel %r8d, %r10d
movw %r8w, -0x2(%rbp)
addl %r11d, %r11d
subq %r11, %rbp
movl %r10d, (%rcx)
incq %rdi
addq $-0x4, %rcx
cmpq $0x4, %rdi
jne 0x77212
xorl %edi, %edi
movl (%rsi), %r8d
movq 0x90(%rsp,%rdi,8), %r9
movl 0x4(%r9), %r10d
imulq %r8, %r10
movb 0xe(%r9), %cl
shrq %cl, %r10
movzwl 0xc(%r9), %ecx
imull %r10d, %ecx
movl 0x8(%r9), %r9d
addl %r8d, %r9d
addl %ecx, %r9d
movl %r9d, (%rsi)
incq %rdi
addq $-0x4, %rsi
cmpq $0x4, %rdi
jne 0x7724f
leaq -0x4(%rdx), %rcx
cmpq $0x3, %rdx
movq %rcx, %rdx
ja 0x771b9
movl $0x1f, %edx
cmpq %r15, 0x130(%rsp)
jae 0x771b9
movl $0x1f, %edx
movzbl 0x70(%rsp,%rdx), %r8d
shll $0x4, %r8d
movl 0x550(%rsp,%rdx,4), %r9d
xorl %ecx, %ecx
cmpl (%r12,%r8), %r9d
seta %cl
movq %rbp, %rsi
leal (%rcx,%rcx), %edi
movw %r9w, -0x2(%rbp)
shll $0x4, %ecx
shrl %cl, %r9d
movl 0x4(%r12,%r8), %r10d
imulq %r9, %r10
movb 0xe(%r12,%r8), %cl
shrq %cl, %r10
subq %rdi, %rbp
addl 0x8(%r12,%r8), %r9d
movzwl 0xc(%r12,%r8), %ecx
imull %r10d, %ecx
addl %r9d, %ecx
movl %ecx, 0x550(%rsp,%rdx,4)
addq $-0x1, %rdx
jb 0x772b5
movl %edi, %ecx
movq %rsi, %r8
subq %rcx, %r8
movq 0x58(%rsp), %r9
addl 0x18(%rsp), %r9d
addl %edi, %r9d
subl %esi, %r9d
xorl %r10d, %r10d
movl 0x5cc(%rsp,%r10), %edi
movl %edi, -0x4(%r8,%r10)
addq $-0x4, %r10
addl $0x4, %r9d
cmpq $-0x80, %r10
jne 0x7732f
movq 0x50(%rsp), %rdx
addq %r13, %rdx
addq %rcx, %rdx
subq %rsi, %rdx
subq %r10, %rdx
movl %eax, %edi
movq 0x60(%rsp), %rax
movl %r9d, (%rax)
addq %r13, %rdi
subq %rcx, %rsi
addq %r10, %rsi
callq 0x4830
movq %r12, %rdi
callq 0x7e26a
movq %r13, %rax
jmp 0x77394
movq 0x48(%rsp), %rdi
callq 0x45c0
movq %r12, %rdi
callq 0x7e26a
xorl %eax, %eax
addq $0x958, %rsp            # imm = 0x958
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24b25(%rip), %rdi     # 0x9bed2
leaq 0x24a9c(%rip), %rsi     # 0x9be50
leaq 0x24ab5(%rip), %rcx     # 0x9be70
movl $0xcd, %edx
callq 0x42f0
leaq 0x24aea(%rip), %rdi     # 0x9beb6
leaq 0x24a7d(%rip), %rsi     # 0x9be50
leaq 0x24a96(%rip), %rcx     # 0x9be70
movl $0xcc, %edx
callq 0x42f0
leaq 0x28c75(%rip), %rdi     # 0xa0060
leaq 0x24a5e(%rip), %rsi     # 0x9be50
leaq 0x24a77(%rip), %rcx     # 0x9be70
movl $0xcb, %edx
callq 0x42f0