// File: /workspace/github_c_makefile_star2_O1/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 $0x948, %rsp            # imm = 0x948
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r13
movl %esi, %edi
movl $0x1, %esi
callq 0x64798
cmpl $0x20, %ebx
jb 0x790d0
movl %eax, %ecx
movq %rbx, 0x10(%rsp)
leal -0x14(%rcx), %ebx
testq %r14, %r14
je 0x785f0
xorl %eax, %eax
jmp 0x78603
movl %ebx, (%r15)
movl %ebx, %edi
movq %rcx, %r14
callq 0x4680
movq %r14, %rcx
movq %rax, %r14
testq %r14, %r14
je 0x790d0
cmpl (%r15), %ebx
ja 0x790d0
movq %rax, 0x48(%rsp)
movq %r15, 0x50(%rsp)
addl $-0x15, %ecx
movq %r14, (%rsp)
testb $0x1, %r14b
cmovel %ebx, %ecx
movq %rcx, 0x38(%rsp)
movl $0x100000, %edi         # imm = 0x100000
callq 0x8060c
testq %rax, %rax
je 0x7875a
movq %rax, %r12
movl $0x100, %edi            # imm = 0x100
movl $0x400, %esi            # imm = 0x400
callq 0x8070d
testq %rax, %rax
je 0x78769
movq %rax, %r14
leaq 0x120(%rsp), %rdi
movl $0x420, %edx            # imm = 0x420
xorl %esi, %esi
callq 0x4260
movq 0x10(%rsp), %rax
movl %eax, %ebx
addq %r13, %rbx
cmpl $0x7a120, %eax          # imm = 0x7A120
movq %r14, 0x18(%rsp)
jbe 0x7877e
movl $0x100, %edi            # imm = 0x100
movl $0x40c, %esi            # imm = 0x40C
callq 0x8070d
testq %rax, %rax
je 0x78eb0
leaq -0x8(%rbx), %rsi
xorl %edx, %edx
movq %r13, %rcx
cmpq %r13, %rsi
jbe 0x7887c
movq 0x18(%rsp), %r14
movzbl (%rcx), %r8d
movzbl 0x1(%rcx), %r9d
movzbl 0x2(%rcx), %r10d
movzbl 0x3(%rcx), %edi
movzbl %dl, %edx
shll $0xa, %edx
addq %r14, %rdx
incl (%rdx,%r8,4)
imulq $0x40c, %r8, %rdx       # imm = 0x40C
addq %rax, %rdx
incl (%rdx,%r9,4)
shll $0xa, %r9d
addq %r14, %r9
incl (%r9,%r10,4)
imulq $0x40c, %r10, %rdx      # imm = 0x40C
addq %rax, %rdx
incl (%rdx,%rdi,4)
movzbl 0x4(%rcx), %r8d
movzbl 0x5(%rcx), %r9d
movzbl 0x6(%rcx), %r10d
movzbl 0x7(%rcx), %edx
shll $0xa, %edi
addq %r14, %rdi
incl (%rdi,%r8,4)
imulq $0x40c, %r8, %rdi       # imm = 0x40C
addq %rax, %rdi
incl (%rdi,%r9,4)
shll $0xa, %r9d
addq %r14, %r9
incl (%r9,%r10,4)
addq $0x8, %rcx
imulq $0x40c, %r10, %rdi      # imm = 0x40C
addq %rax, %rdi
incl (%rdi,%rdx,4)
cmpq %rsi, %rcx
jb 0x786c0
jmp 0x78881
movq 0x48(%rsp), %rdi
callq 0x45c0
jmp 0x790d0
movb $0x1, %cl
movq (%rsp), %r15
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rbx
jmp 0x790ba
leaq -0x8(%rbx), %rcx
xorl %edx, %edx
movq %r13, %rax
cmpq %r13, %rcx
jbe 0x78815
movzbl (%rax), %edi
movzbl 0x1(%rax), %r8d
movzbl 0x2(%rax), %r9d
movzbl 0x3(%rax), %esi
movzbl %dl, %edx
shll $0xa, %edx
addq %r14, %rdx
incl (%rdx,%rdi,4)
shll $0xa, %edi
addq %r14, %rdi
incl (%rdi,%r8,4)
shll $0xa, %r8d
addq %r14, %r8
incl (%r8,%r9,4)
shll $0xa, %r9d
addq %r14, %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 %r14, %rsi
incl (%rsi,%r8,4)
shll $0xa, %r8d
addq %r14, %r8
incl (%r8,%r9,4)
shll $0xa, %r9d
addq %r14, %r9
incl (%r9,%rdi,4)
addq $0x8, %rax
shll $0xa, %edi
addq %r14, %rdi
incl (%rdi,%rdx,4)
cmpq %rcx, %rax
jb 0x78790
cmpq %rbx, %rax
jae 0x78835
movzbl (%rax), %ecx
movzbl %dl, %edx
shll $0xa, %edx
addq %r14, %rdx
incl (%rdx,%rcx,4)
incq %rax
movl %ecx, %edx
cmpq %rbx, %rax
jb 0x7881a
jmp 0x78837
movl %edx, %ecx
movzbl %cl, %eax
incl 0x120(%rsp,%rax,4)
xorl %eax, %eax
movq %r14, %rcx
movq 0x10(%rsp), %rbx
xorl %esi, %esi
xorl %edx, %edx
addl (%rcx,%rsi,4), %edx
incq %rsi
cmpq $0x100, %rsi            # imm = 0x100
jne 0x7884f
addl %edx, 0x120(%rsp,%rax,4)
incq %rax
addq $0x400, %rcx            # imm = 0x400
cmpq $0x100, %rax            # imm = 0x100
jne 0x7884b
jmp 0x78904
movq 0x18(%rsp), %r14
cmpq %rbx, %rcx
jae 0x788a1
movzbl (%rcx), %esi
movzbl %dl, %edx
shll $0xa, %edx
addq %r14, %rdx
incl (%rdx,%rsi,4)
incq %rcx
movl %esi, %edx
cmpq %rbx, %rcx
jb 0x78886
jmp 0x788a3
movl %edx, %esi
movzbl %sil, %ecx
incl 0x120(%rsp,%rcx,4)
xorl %ecx, %ecx
movq %rax, %rdx
movq %r14, %rsi
movq 0x10(%rsp), %rbx
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 0x788c0
addl %edi, 0x120(%rsp,%rcx,4)
incq %rcx
addq $0x400, %rsi            # imm = 0x400
addq $0x40c, %rdx            # imm = 0x40C
cmpq $0x100, %rcx            # imm = 0x100
jne 0x788bb
movq %rax, %rdi
callq 0x80732
movl %ebx, %eax
shrl $0x5, %eax
movl %eax, %eax
leaq (%rax,%r13), %rcx
movl $0x1f, %edx
movzbl (%rcx), %esi
incl (%r14,%rsi,4)
addq %rax, %rcx
decq %rdx
jne 0x78914
movl 0x120(%rsp), %eax
movl $0x1, 0x120(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %r9
movb $0x0, (%rcx)
xorl %ecx, %ecx
movl $0x1, %edx
xorl %esi, %esi
movq %r9, %r8
movq %r8, %rdi
cmpl $0x0, 0x120(%rsp,%rcx,4)
je 0x7895f
testl %esi, %esi
je 0x78973
decl %esi
movq %rdi, %r8
incq %rcx
incq %rdx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x7894c
jmp 0x789c5
leaq 0x1(%rdi), %r8
movb %cl, (%rdi)
xorl %esi, %esi
testq %rcx, %rcx
je 0x78962
cmpl $0x0, 0x11c(%rsp,%rcx,4)
je 0x78962
leal 0x1(%rcx), %r8d
movl %r8d, %esi
cmpq $0xfe, %rcx
ja 0x789b8
movq %rdx, %rsi
cmpl $0x0, 0x120(%rsp,%rsi,4)
je 0x789b8
incq %rsi
cmpq $0x100, %rsi            # imm = 0x100
jne 0x7899d
movl $0x100, %esi            # imm = 0x100
subl %r8d, %esi
movb %sil, 0x1(%rdi)
addq $0x2, %rdi
jmp 0x7895f
addl $0x1f, %eax
movb $0x0, (%r8)
subl %r9d, %r8d
incl %r8d
movslq %r8d, %rcx
movq %r9, 0x30(%rsp)
addq %r9, %rcx
movq %rcx, 0x20(%rsp)
leaq 0x120(%rsp), %rbx
movl %eax, (%rbx)
leaq 0x540(%rsp), %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x4260
movq %rbx, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x658ea
xorl %edx, %edx
movl %eax, %ecx
movl $0x1, %edi
movl $0x1, %r8d
shll %cl, %r8d
movl $0x8000, %eax           # imm = 0x8000
movl %ecx, 0xc(%rsp)
shrl %cl, %eax
shll $0x10, %eax
movl %eax, 0x44(%rsp)
leal -0x1(%r8), %eax
movq %rax, 0x58(%rsp)
movl 0x120(%rsp,%rdx,4), %eax
testl %eax, %eax
je 0x78e07
movl 0x540(%rsp,%rdx,4), %ecx
movl $0x400, %esi            # imm = 0x400
cmpl %esi, %ecx
movl $0x400, %r11d           # imm = 0x400
cmovbl %ecx, %r11d
cmpl $0xa, 0xc(%rsp)
cmovnel %ecx, %r11d
movq %rdx, 0x28(%rsp)
movq %rdx, %rbx
shlq $0xa, %rbx
addq 0x18(%rsp), %rbx
movq %r11, %rcx
shlq $0x1f, %rcx
movb $0x1, %r15b
movslq %eax, %r9
xorl %r10d, %r10d
movq %rcx, %rax
xorl %edx, %edx
divq %r9
movq %rax, %rsi
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
idivl %r9d
movslq %eax, %rdx
addq %rsi, %rdx
xorl %eax, %eax
xorl %esi, %esi
xorl %r9d, %r9d
movl (%r14,%r10,4), %ebp
testq %rbp, %rbp
je 0x78adc
cmpl %ebp, %esi
cmovbl %r10d, %r9d
cmovbel %ebp, %esi
imulq %rdx, %rbp
shrq $0x1f, %rbp
cmpl $0x2, %ebp
cmovbl %edi, %ebp
movl %ebp, (%r14,%r10,4)
addl %eax, %ebp
movl %ebp, %eax
incq %r10
cmpq $0x100, %r10            # imm = 0x100
jne 0x78ab4
movl %r11d, %esi
subl %eax, %esi
movslq %r9d, %rdx
testl %esi, %esi
jg 0x78b78
jns 0x78b8b
movl (%rbx,%rdx,4), %r9d
movl %esi, %r10d
negl %r10d
cmpl %r10d, %r9d
jbe 0x78b1e
movl %r9d, %ebp
shrl %ebp
cmpl %r10d, %ebp
setb %r10b
testb %r10b, %r15b
je 0x78b81
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x78a8c
addl %r9d, %esi
movl $0x1, (%rbx,%rdx,4)
decl %esi
je 0x78b8b
xorl %eax, %eax
movl (%r14,%rax,4), %ecx
cmpl $0x2, %ecx
jb 0x78b67
movl %esi, %r9d
negl %r9d
movl $0x1, %r10d
subl %ecx, %r10d
cmpl %r9d, %ecx
cmoval %esi, %r10d
addl %r10d, %ecx
movl %ecx, (%r14,%rax,4)
subl %r10d, %esi
cmpq $0xfe, %rax
ja 0x78b8b
incq %rax
testl %esi, %esi
jne 0x78b3e
jmp 0x78b8b
leaq (%rbx,%rdx,4), %rax
movl (%rax), %r9d
jmp 0x78b85
leaq (%rbx,%rdx,4), %rax
addl %esi, %r9d
movl %r9d, (%rax)
cmpl $0x0, (%rbx,%rdx,4)
je 0x78e0b
movq 0x28(%rsp), %rax
movl %r11d, 0x120(%rsp,%rax,4)
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x20(%rsp), %rax
cmpl $0x0, 0x120(%rsp,%rcx,4)
je 0x78cbd
cmpl $0x0, (%r14,%rcx,4)
je 0x78be6
testl %edx, %edx
je 0x78bd1
decl %edx
movslq %edx, %rdx
subq %rdx, %rax
movb %dl, (%rax)
incq %rax
movl (%r14,%rcx,4), %edx
cmpl $0x7f, %edx
ja 0x78bf3
movb %dl, (%rax)
movl $0x1, %edx
jmp 0x78cb8
incl %edx
movb $0x0, (%rax)
incq %rax
jmp 0x78cbd
movl %edx, %esi
cmpl $0x3fff, %edx           # imm = 0x3FFF
ja 0x78c17
shrl $0x7, %esi
orb $-0x80, %sil
movb %sil, (%rax)
andb $0x7f, %dl
movb %dl, 0x1(%rax)
movl $0x2, %edx
jmp 0x78cb8
cmpl $0x1fffff, %edx         # imm = 0x1FFFFF
ja 0x78c43
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 0x78cb8
cmpl $0xfffffff, %edx        # imm = 0xFFFFFFF
ja 0x78c7c
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 0x78cb8
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
xorl %edx, %edx
incq %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x78bab
testl %edx, %edx
je 0x78cde
decl %edx
movslq %edx, %rcx
subq %rcx, %rax
movb %cl, (%rax)
incq %rax
movq 0x28(%rsp), %rcx
movl 0x120(%rsp,%rcx,4), %edx
movl %r8d, %ecx
notl %ecx
testl %ecx, %edx
je 0x78d17
xorl %ecx, %ecx
cmpl %r8d, %edx
jae 0x78d05
xorl %ecx, %ecx
addl %edx, %edx
incl %ecx
cmpl %r8d, %edx
jb 0x78cfc
xorl %edx, %edx
shll %cl, (%r14,%rdx,4)
incq %rdx
cmpq $0x100, %rdx            # imm = 0x100
jne 0x78d07
movq 0x28(%rsp), %rdx
movl %r8d, 0x120(%rsp,%rdx,4)
cmpl $0x10, 0xc(%rsp)
ja 0x79416
movq 0x20(%rsp), %rcx
subl %ecx, %eax
cltq
addq %rax, %rcx
movq %rcx, 0x20(%rsp)
xorl %r10d, %r10d
xorl %r15d, %r15d
movl %r8d, %eax
subl %r15d, %eax
jb 0x793d8
movl (%rbx,%r10,4), %r9d
cmpl %r9d, %eax
jb 0x793f7
movq %rdx, %rax
shlq $0xc, %rax
addq %r12, %rax
movq %r10, %r11
shlq $0x4, %r11
addq %rax, %r11
movl 0x44(%rsp), %eax
imull %r9d, %eax
decl %eax
movl %eax, (%r11)
movl %r8d, %eax
subl %r9d, %eax
movw %ax, 0xc(%r11)
cmpl $0x2, %r9d
jae 0x78daa
movl $0xffffffff, 0x4(%r11)  # imm = 0xFFFFFFFF
movw $0x0, 0xe(%r11)
movq 0x58(%rsp), %rax
addl %r15d, %eax
jmp 0x78de9
movl $0x1e, %esi
leal -0x1e(%rsi), %ecx
movl $0x1, %eax
shll %cl, %eax
incl %esi
cmpl %r9d, %eax
jb 0x78daf
movl $0x1, %eax
movl %esi, %ecx
shlq %cl, %rax
addq %r9, %rax
decq %rax
xorl %edx, %edx
divq %r9
movl %eax, 0x4(%r11)
addl $-0x20, %esi
movw %si, 0xe(%r11)
movl %r15d, %eax
movq 0x28(%rsp), %rdx
movl %eax, 0x8(%r11)
addw $0x20, 0xe(%r11)
addl (%rbx,%r10,4), %r15d
incq %r10
cmpq $0x100, %r10            # imm = 0x100
jne 0x78d46
xorl %eax, %eax
jmp 0x78e12
movb $0x1, %al
movq 0x28(%rsp), %rdx
testb %al, %al
jne 0x78eb0
incq %rdx
addq $0x400, %r14            # imm = 0x400
cmpq $0x100, %rdx            # imm = 0x100
jne 0x78a41
movl 0xc(%rsp), %eax
shlb $0x4, %al
movq (%rsp), %rcx
movb %al, (%rcx)
movq 0x20(%rsp), %r15
movq %r15, %rbx
subq %rcx, %rbx
cmpq $0x3e9, %rbx            # imm = 0x3E9
jl 0x78eca
movq 0x30(%rsp), %rdi
subq %rdi, %r15
leaq 0xa0(%rsp), %rcx
movl %r15d, %esi
xorl %edx, %edx
callq 0x64845
movq %rax, %rdx
testq %rax, %rax
movq 0x18(%rsp), %r14
je 0x78ed9
movl 0xa0(%rsp), %ebp
leal 0x6(%rbp), %eax
cmpq %rax, %rbx
movq 0x10(%rsp), %rbx
jle 0x79099
movq (%rsp), %rax
orb $0x1, (%rax)
cmpl $0x7f, %r15d
ja 0x78ee3
movq 0x30(%rsp), %rdi
movb %r15b, (%rdi)
movl $0x1, %eax
jmp 0x78fb5
movq 0x18(%rsp), %rdi
callq 0x80732
movb $0x1, %cl
movq (%rsp), %r15
movq 0x10(%rsp), %rbx
jmp 0x790b5
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
jmp 0x790a1
movq 0x10(%rsp), %rbx
jmp 0x79099
cmpl $0x3fff, %r15d          # imm = 0x3FFF
movq 0x30(%rsp), %rdi
movl %r15d, %eax
ja 0x78f12
shrl $0x7, %eax
orb $-0x80, %al
movq (%rsp), %rcx
movb %al, 0x1(%rcx)
andb $0x7f, %r15b
movb %r15b, 0x2(%rcx)
movl $0x2, %eax
jmp 0x78fb5
cmpl $0x1fffff, %r15d        # imm = 0x1FFFFF
ja 0x78f41
shrl $0xe, %eax
orb $-0x80, %al
movq (%rsp), %rcx
movb %al, 0x1(%rcx)
movl %r15d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x2(%rcx)
andb $0x7f, %r15b
movb %r15b, 0x3(%rcx)
movl $0x3, %eax
jmp 0x78fb5
cmpl $0xfffffff, %r15d       # imm = 0xFFFFFFF
ja 0x78f7b
shrl $0x15, %eax
orb $-0x80, %al
movq (%rsp), %rcx
movb %al, 0x1(%rcx)
movl %r15d, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x2(%rcx)
movl %r15d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x3(%rcx)
andb $0x7f, %r15b
movb %r15b, 0x4(%rcx)
movl $0x4, %eax
jmp 0x78fb5
shrl $0x1c, %eax
orb $-0x80, %al
movq (%rsp), %rcx
movb %al, 0x1(%rcx)
movl %r15d, %eax
shrl $0x15, %eax
orb $-0x80, %al
movb %al, 0x2(%rcx)
movl %r15d, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x3(%rcx)
movl %r15d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x4(%rcx)
andb $0x7f, %r15b
movb %r15b, 0x5(%rcx)
movl $0x5, %eax
addq %rax, %rdi
cmpl $0x7f, %ebp
ja 0x78fca
movb %bpl, (%rdi)
movl $0x1, %eax
jmp 0x79075
movl %ebp, %eax
cmpl $0x3fff, %ebp           # imm = 0x3FFF
ja 0x78fec
shrl $0x7, %eax
orb $-0x80, %al
movb %al, (%rdi)
movl %ebp, %eax
andb $0x7f, %al
movb %al, 0x1(%rdi)
movl $0x2, %eax
jmp 0x79075
cmpl $0x1fffff, %ebp         # imm = 0x1FFFFF
ja 0x79013
shrl $0xe, %eax
orb $-0x80, %al
movb %al, (%rdi)
movl %ebp, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x1(%rdi)
movl %ebp, %eax
andb $0x7f, %al
movb %al, 0x2(%rdi)
movl $0x3, %eax
jmp 0x79075
cmpl $0xfffffff, %ebp        # imm = 0xFFFFFFF
ja 0x79044
shrl $0x15, %eax
orb $-0x80, %al
movb %al, (%rdi)
movl %ebp, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x1(%rdi)
movl %ebp, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x2(%rdi)
movl %ebp, %eax
andb $0x7f, %al
movb %al, 0x3(%rdi)
movl $0x4, %eax
jmp 0x79075
shrl $0x1c, %eax
orb $-0x80, %al
movb %al, (%rdi)
movl %ebp, %eax
shrl $0x15, %eax
orb $-0x80, %al
movb %al, 0x1(%rdi)
movl %ebp, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x2(%rdi)
movl %ebp, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x3(%rdi)
movl %ebp, %eax
andb $0x7f, %al
movb %al, 0x4(%rdi)
movl $0x5, %eax
addq %rax, %rdi
movq %rdx, %r14
movq %rdx, %rsi
movq %rbp, %rdx
movq %rdi, %r15
callq 0x43c0
movq %r14, %rdx
addq %rbp, %r15
movq %r15, 0x20(%rsp)
movq 0x18(%rsp), %r14
movq %rdx, %rdi
callq 0x45c0
movq %r14, %rdi
callq 0x80732
movl 0xc(%rsp), %ecx
shrl $0x1f, %ecx
movq 0x20(%rsp), %r15
movq 0x38(%rsp), %rax
testb %cl, %cl
je 0x790e7
movq 0x48(%rsp), %rdi
callq 0x45c0
movq %r12, %rdi
callq 0x80732
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x948, %rsp            # imm = 0x948
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %eax, %rdx
movq (%rsp), %rax
addq %rdx, %rax
xorl %ecx, %ecx
movl $0x8000, 0x540(%rsp,%rcx,4) # imm = 0x8000
incq %rcx
cmpq $0x20, %rcx
jne 0x790f3
movl %ebx, %ecx
shrl $0x5, %ecx
leal -0x2(%rcx), %esi
xorl %edi, %edi
movl %esi, 0xa0(%rsp,%rdi,4)
incq %rdi
addl %ecx, %esi
cmpq $0x20, %rdi
jne 0x79111
xorl %ecx, %ecx
movslq 0xa0(%rsp,%rcx,4), %rsi
movb 0x1(%r13,%rsi), %sil
movb %sil, 0x60(%rsp,%rcx)
incq %rcx
cmpq $0x20, %rcx
jne 0x79125
leal -0x1(%rbx), %ecx
movb (%r13,%rcx), %cl
movb %cl, 0x7f(%rsp)
leal -0x2(%rbx), %ecx
andl $-0x20, %ebx
addl $-0x2, %ebx
movl %ecx, 0x11c(%rsp)
cmpl %ebx, %ecx
jle 0x791da
movl %ecx, %ecx
movzbl (%r13,%rcx), %esi
movzbl 0x7f(%rsp), %edi
movl %esi, %r8d
shll $0xc, %r8d
addq %r12, %r8
shll $0x4, %edi
movl 0x5bc(%rsp), %r9d
xorl %ecx, %ecx
cmpl (%rdi,%r8), %r9d
seta %cl
leal (%rcx,%rcx), %r10d
movw %r9w, -0x2(%rax)
shll $0x4, %ecx
shrl %cl, %r9d
movl 0x4(%rdi,%r8), %r11d
imulq %r9, %r11
movb 0xe(%rdi,%r8), %cl
shrq %cl, %r11
subq %r10, %rax
addl 0x8(%rdi,%r8), %r9d
movzwl 0xc(%rdi,%r8), %ecx
imull %r11d, %ecx
addl %r9d, %ecx
movl %ecx, 0x5bc(%rsp)
movb %sil, 0x7f(%rsp)
movl 0x11c(%rsp), %ecx
decl %ecx
jmp 0x79155
movq %r15, %rdi
subq (%rsp), %rdi
xorl %ecx, %ecx
movslq 0xa0(%rsp,%rcx,4), %rsi
addq %r13, %rsi
movq %rsi, 0x120(%rsp,%rcx,8)
incq %rcx
cmpq $0x20, %rcx
jne 0x791e3
cmpq %r13, 0x120(%rsp)
jb 0x79309
movl $0x1f, %esi
movq %rsi, %rcx
xorl %r8d, %r8d
movq 0x120(%rsp,%rcx,8), %r9
movzbl (%r9), %r10d
movzbl 0x60(%rsp,%rcx), %r11d
movb %r10b, 0x60(%rsp,%rcx)
shll $0xc, %r10d
shll $0x4, %r11d
addq %r12, %r11
addq %r10, %r11
movq %r11, 0x80(%rsp,%r8,8)
decq %r9
movq %r9, 0x120(%rsp,%rcx,8)
incq %r8
decq %rcx
cmpq $0x4, %r8
jne 0x79218
leaq (%rsp,%rsi,4), %r8
addq $0x540, %r8             # imm = 0x540
movq %r8, %rcx
xorl %r9d, %r9d
movl (%rcx), %r10d
movq 0x80(%rsp,%r9,8), %r11
movl %r10d, %ebx
shrl $0x10, %ebx
xorl %r14d, %r14d
cmpl (%r11), %r10d
seta %r14b
cmovbel %r10d, %ebx
movw %r10w, -0x2(%rax)
addl %r14d, %r14d
subq %r14, %rax
movl %ebx, (%rcx)
incq %r9
addq $-0x4, %rcx
cmpq $0x4, %r9
jne 0x7926d
xorl %r9d, %r9d
movl (%r8), %r10d
movq 0x80(%rsp,%r9,8), %r11
movl 0x4(%r11), %ebx
imulq %r10, %rbx
movb 0xe(%r11), %cl
shrq %cl, %rbx
movzwl 0xc(%r11), %ecx
imull %ebx, %ecx
movl 0x8(%r11), %r11d
addl %r10d, %r11d
addl %ecx, %r11d
movl %r11d, (%r8)
incq %r9
addq $-0x4, %r8
cmpq $0x4, %r9
jne 0x792a9
leaq -0x4(%rsi), %rcx
cmpq $0x3, %rsi
movq %rcx, %rsi
ja 0x79212
movl $0x1f, %esi
cmpq %r13, 0x120(%rsp)
jae 0x79212
movl $0x1f, %r8d
movzbl 0x60(%rsp,%r8), %r10d
shll $0x4, %r10d
movl 0x540(%rsp,%r8,4), %r11d
xorl %ecx, %ecx
cmpl (%r12,%r10), %r11d
seta %cl
movq %rax, %rsi
leal (%rcx,%rcx), %r9d
movw %r11w, -0x2(%rax)
shll $0x4, %ecx
shrl %cl, %r11d
movl 0x4(%r12,%r10), %ebx
imulq %r11, %rbx
movb 0xe(%r12,%r10), %cl
shrq %cl, %rbx
subq %r9, %rax
addl 0x8(%r12,%r10), %r11d
movzwl 0xc(%r12,%r10), %ecx
imull %ebx, %ecx
addl %r11d, %ecx
movl %ecx, 0x540(%rsp,%r8,4)
addq $-0x1, %r8
jb 0x7930f
movl %r9d, %eax
movq %rsi, %r8
subq %rax, %r8
movq 0x38(%rsp), %r10
addl %r15d, %r10d
addl %r9d, %r10d
subl %esi, %r10d
xorl %ecx, %ecx
movl 0x5bc(%rsp,%rcx), %r9d
movl %r9d, -0x4(%r8,%rcx)
addq $-0x4, %rcx
addl $0x4, %r10d
cmpq $-0x80, %rcx
jne 0x79388
movq (%rsp), %rbx
addq %rbx, %rdx
addq %rax, %rdx
subq %rsi, %rdx
subq %rcx, %rdx
movl %edi, %edi
movq 0x50(%rsp), %r8
movl %r10d, (%r8)
addq %rbx, %rdi
subq %rax, %rsi
addq %rcx, %rsi
callq 0x4830
movq %r12, %rdi
callq 0x80732
jmp 0x790d2
leaq 0x25837(%rip), %rdi     # 0x9ec16
leaq 0x257ca(%rip), %rsi     # 0x9ebb0
leaq 0x257e3(%rip), %rcx     # 0x9ebd0
movl $0xcc, %edx
callq 0x42f0
leaq 0x25834(%rip), %rdi     # 0x9ec32
leaq 0x257ab(%rip), %rsi     # 0x9ebb0
leaq 0x257c4(%rip), %rcx     # 0x9ebd0
movl $0xcd, %edx
callq 0x42f0
leaq 0x298a3(%rip), %rdi     # 0xa2cc0
leaq 0x2578c(%rip), %rsi     # 0x9ebb0
leaq 0x257a5(%rip), %rcx     # 0x9ebd0
movl $0xcb, %edx
callq 0x42f0