// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/htscodecs/htscodecs/rANS_static4x16pr.c
// Function: rans_compress_O0_4x16
unsigned char *rans_compress_O0_4x16(unsigned char *in, unsigned int in_size,
                                     unsigned char *out, unsigned int *out_size) {
    unsigned char *cp, *out_end;
    RansEncSymbol syms[256];
    RansState rans0;
    RansState rans2;
    RansState rans1;
    RansState rans3;
    uint8_t* ptr;
    uint32_t F[256+MAGIC] = {0};
    int i, j, tab_size = 0, rle, x;
    // -20 for order/size/meta
    uint32_t bound = rans_compress_bound_4x16(in_size,0)-20;

    if (!out) {
        *out_size = bound;
        out = 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
    if (hist8(in, in_size, F) < 0)
        return NULL;

    // 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)
        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)
        return NULL;

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

    RansEncInit(&rans0);
    RansEncInit(&rans1);
    RansEncInit(&rans2);
    RansEncInit(&rans3);

    switch (i=(in_size&3)) {
    case 3: RansEncPutSymbol(&rans2, &ptr, &syms[in[in_size-(i-2)]]);
        // fall-through
    case 2: RansEncPutSymbol(&rans1, &ptr, &syms[in[in_size-(i-1)]]);
        // fall-through
    case 1: RansEncPutSymbol(&rans0, &ptr, &syms[in[in_size-(i-0)]]);
        // fall-through
    case 0:
        break;
    }
    for (i=(in_size &~3); i>0; i-=4) {
        RansEncSymbol *s3 = &syms[in[i-1]];
        RansEncSymbol *s2 = &syms[in[i-2]];
        RansEncSymbol *s1 = &syms[in[i-3]];
        RansEncSymbol *s0 = &syms[in[i-4]];

#if 1
        RansEncPutSymbol(&rans3, &ptr, s3);
        RansEncPutSymbol(&rans2, &ptr, s2);
        RansEncPutSymbol(&rans1, &ptr, s1);
        RansEncPutSymbol(&rans0, &ptr, s0);
#else
        // Slightly beter on gcc, much better on clang
        uint16_t *ptr16 = (uint16_t *)ptr;

        if (rans3 >= s3->x_max) *--ptr16 = (uint16_t)rans3, rans3 >>= 16;
        if (rans2 >= s2->x_max) *--ptr16 = (uint16_t)rans2, rans2 >>= 16;
        uint32_t q3 = (uint32_t) (((uint64_t)rans3 * s3->rcp_freq) >> s3->rcp_shift);
        uint32_t q2 = (uint32_t) (((uint64_t)rans2 * s2->rcp_freq) >> s2->rcp_shift);
        rans3 += s3->bias + q3 * s3->cmpl_freq;
        rans2 += s2->bias + q2 * s2->cmpl_freq;

        if (rans1 >= s1->x_max) *--ptr16 = (uint16_t)rans1, rans1 >>= 16;
        if (rans0 >= s0->x_max) *--ptr16 = (uint16_t)rans0, rans0 >>= 16;
        uint32_t q1 = (uint32_t) (((uint64_t)rans1 * s1->rcp_freq) >> s1->rcp_shift);
        uint32_t q0 = (uint32_t) (((uint64_t)rans0 * s0->rcp_freq) >> s0->rcp_shift);
        rans1 += s1->bias + q1 * s1->cmpl_freq;
        rans0 += s0->bias + q0 * s0->cmpl_freq;

        ptr = (uint8_t *)ptr16;
#endif
    }

    RansEncFlush(&rans3, &ptr);
    RansEncFlush(&rans2, &ptr);
    RansEncFlush(&rans1, &ptr);
    RansEncFlush(&rans0, &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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c88, %rsp           # imm = 0x1C88
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r12
leaq 0x20(%rsp), %rdi
movl $0x420, %edx            # imm = 0x420
xorl %esi, %esi
callq 0x4260
movq %rbx, %rcx
movl %ecx, %ebp
cvtsi2sd %rbp, %xmm0
mulsd 0x3932a(%rip), %xmm0    # 0x9dbb0
addsd 0x39f8a(%rip), %xmm0    # 0x9e818
addsd 0x392e2(%rip), %xmm0    # 0x9db78
addsd 0x3a2c2(%rip), %xmm0    # 0x9eb60
cvttsd2si %xmm0, %r13
movl %r13d, %r15d
andl $0x1, %r15d
leal (%r15,%r13), %ebx
addl $-0x12, %ebx
testq %r14, %r14
jne 0x648cd
movq 0x8(%rsp), %rax
movl %ebx, (%rax)
movl %ebx, %edi
movq %rcx, %r14
callq 0x4680
movq %r14, %rcx
movq %rax, %r14
testq %r14, %r14
je 0x648db
movq 0x8(%rsp), %rax
cmpl (%rax), %ebx
jbe 0x648f3
xorl %r14d, %r14d
movq %r14, %rax
addq $0x1c88, %rsp           # imm = 0x1C88
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl %r15d, %r13d
addl $0x2, %r13d
addl $-0x15, %r13d
testb $0x1, %r14b
cmovel %ebx, %r13d
addq %r14, %r13
testl %ecx, %ecx
je 0x64a07
cmpl $0x7a121, %ecx          # imm = 0x7A121
movq %rcx, %r15
jb 0x64a11
movq %r15, %rbx
movl $0x3006f, %edi          # imm = 0x3006F
movl $0x4, %esi
callq 0x8070d
xorl %ecx, %ecx
testq %rax, %rax
je 0x648db
movq %rbx, %r10
movl %r10d, %edx
andl $-0x10, %edx
je 0x649b0
movl %edx, %edx
xorl %ecx, %ecx
movzwl (%r12,%rcx), %esi
movzwl 0x2(%r12,%rcx), %edi
movzwl 0x4(%r12,%rcx), %r8d
movzwl 0x6(%r12,%rcx), %r9d
incl (%rax,%rsi,4)
incl 0x40094(%rax,%rdi,4)
incl 0x80128(%rax,%r8,4)
incl (%rax,%r9,4)
movzwl 0x8(%r12,%rcx), %esi
movzwl 0xa(%r12,%rcx), %edi
movzwl 0xc(%r12,%rcx), %r8d
movzwl 0xe(%r12,%rcx), %r9d
incl 0x40094(%rax,%rsi,4)
incl (%rax,%rdi,4)
incl 0x40094(%rax,%r8,4)
incl 0x80128(%rax,%r9,4)
addq $0x10, %rcx
cmpq %rdx, %rcx
jb 0x64948
cmpl %r10d, %ecx
jae 0x649c8
movl %ecx, %ecx
movzbl (%r12,%rcx), %edx
incq %rcx
incl 0x20(%rsp,%rdx,4)
cmpq %rcx, %rbp
jne 0x649b7
xorl %ecx, %ecx
movl 0x40094(%rax,%rcx,4), %edx
addl (%rax,%rcx,4), %edx
addl 0x80128(%rax,%rcx,4), %edx
movzbl %cl, %esi
addl %edx, 0x20(%rsp,%rsi,4)
movl %ecx, %esi
shrl $0x8, %esi
addl %edx, 0x20(%rsp,%rsi,4)
incq %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
jne 0x649ca
movq %rax, %rdi
callq 0x80732
movq %rbx, %rdx
jmp 0x64b07
xorl %edi, %edi
movq %r13, %rsi
jmp 0x65329
leaq 0x440(%rsp), %rdi
xorl %ebx, %ebx
movl $0x420, %edx            # imm = 0x420
xorl %esi, %esi
callq 0x4260
leaq 0x1860(%rsp), %rdi
movl $0x420, %edx            # imm = 0x420
xorl %esi, %esi
callq 0x4260
leaq 0x1440(%rsp), %rdi
movl $0x420, %edx            # imm = 0x420
xorl %esi, %esi
callq 0x4260
movl %r15d, %eax
andl $0x7fff8, %eax          # imm = 0x7FFF8
movq %r15, %rdx
je 0x64aca
movl %eax, %eax
xorl %ebx, %ebx
movzbl (%r12,%rbx), %ecx
incl 0x20(%rsp,%rcx,4)
movzbl 0x1(%r12,%rbx), %ecx
incl 0x440(%rsp,%rcx,4)
movzbl 0x2(%r12,%rbx), %ecx
incl 0x1860(%rsp,%rcx,4)
movzbl 0x3(%r12,%rbx), %ecx
incl 0x1440(%rsp,%rcx,4)
movzbl 0x4(%r12,%rbx), %ecx
incl 0x20(%rsp,%rcx,4)
movzbl 0x5(%r12,%rbx), %ecx
incl 0x440(%rsp,%rcx,4)
movzbl 0x6(%r12,%rbx), %ecx
incl 0x1860(%rsp,%rcx,4)
movzbl 0x7(%r12,%rbx), %ecx
incl 0x1440(%rsp,%rcx,4)
addq $0x8, %rbx
cmpq %rax, %rbx
jb 0x64a60
cmpl %edx, %ebx
jae 0x64ae1
movl %ebx, %eax
movzbl (%r12,%rax), %ecx
incq %rax
incl 0x20(%rsp,%rcx,4)
cmpq %rax, %rbp
jne 0x64ad0
xorl %eax, %eax
movl 0x1860(%rsp,%rax,4), %ecx
addl 0x440(%rsp,%rax,4), %ecx
addl 0x1440(%rsp,%rax,4), %ecx
addl %ecx, 0x20(%rsp,%rax,4)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x64ae3
leal -0x1(%rdx), %r8d
movl %r8d, %eax
shrl %eax
orl %r8d, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %r10d
shrl $0x10, %r10d
orl %ecx, %r10d
incl %r10d
movl $0x1000, %r9d           # imm = 0x1000
cmpl %r9d, %r10d
cmovbl %r10d, %r9d
movq %r9, %rcx
shlq $0x1f, %rcx
movb $0x1, %dil
movl $0x1, %r11d
movq %rdx, 0x18(%rsp)
movl %edx, %esi
movslq %esi, %r15
xorl %ebx, %ebx
movq %rcx, %rax
xorl %edx, %edx
divq %r15
movq %rax, %rsi
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
idivl %r15d
cltq
addq %rsi, %rax
xorl %esi, %esi
xorl %edx, %edx
xorl %ebp, %ebp
movl 0x20(%rsp,%rbx,4), %r15d
testq %r15, %r15
je 0x64bad
cmpl %r15d, %edx
cmovbl %ebx, %ebp
cmovbel %r15d, %edx
imulq %rax, %r15
shrq $0x1f, %r15
cmpl $0x2, %r15d
cmovbl %r11d, %r15d
movl %r15d, 0x20(%rsp,%rbx,4)
addl %esi, %r15d
movl %r15d, %esi
incq %rbx
cmpq $0x100, %rbx            # imm = 0x100
jne 0x64b7e
movl %r9d, %edx
subl %esi, %edx
movslq %ebp, %rax
testl %edx, %edx
jg 0x64c40
jns 0x64c58
movl 0x20(%rsp,%rax,4), %ebx
movl %edx, %ebp
negl %ebp
cmpl %ebp, %ebx
jbe 0x64be9
movl %ebx, %r15d
shrl %r15d
cmpl %ebp, %r15d
setb %bpl
testb %bpl, %dil
je 0x64c4c
testb $0x1, %dil
movl $0x0, %edi
jne 0x64b59
addl %ebx, %edx
movl $0x1, 0x20(%rsp,%rax,4)
decl %edx
je 0x64c58
xorl %ecx, %ecx
movl 0x20(%rsp,%rcx,4), %esi
cmpl $0x2, %esi
jb 0x64c2e
movl %edx, %edi
negl %edi
movl $0x1, %r11d
subl %esi, %r11d
cmpl %edi, %esi
cmoval %edx, %r11d
addl %r11d, %esi
movl %esi, 0x20(%rsp,%rcx,4)
subl %r11d, %edx
cmpq $0xfe, %rcx
ja 0x64c58
incq %rcx
testl %edx, %edx
jne 0x64c08
jmp 0x64c58
leaq (%rsp,%rax,4), %rcx
addq $0x20, %rcx
movl (%rcx), %ebx
jmp 0x64c54
leaq (%rsp,%rax,4), %rcx
addq $0x20, %rcx
addl %edx, %ebx
movl %ebx, (%rcx)
xorl %edx, %edx
cmpl $0x0, 0x20(%rsp,%rax,4)
je 0x648db
movl $0x1, %eax
xorl %ecx, %ecx
movq %r14, %rdi
movq %rdi, %rsi
cmpl $0x0, 0x20(%rsp,%rcx,4)
je 0x64c7f
testl %edx, %edx
je 0x64c93
decl %edx
movq %rsi, %rdi
incq %rcx
incq %rax
cmpq $0x100, %rcx            # imm = 0x100
jne 0x64c6f
jmp 0x64cdb
leaq 0x1(%rsi), %rdi
movb %cl, (%rsi)
xorl %edx, %edx
testq %rcx, %rcx
je 0x64c82
cmpl $0x0, 0x1c(%rsp,%rcx,4)
je 0x64c82
leal 0x1(%rcx), %edi
movl %edi, %edx
cmpq $0xfe, %rcx
ja 0x64cd0
movq %rax, %rdx
cmpl $0x0, 0x20(%rsp,%rdx,4)
je 0x64cd0
incq %rdx
cmpq $0x100, %rdx            # imm = 0x100
jne 0x64cb8
movl $0x100, %edx            # imm = 0x100
subl %edi, %edx
movb %dl, 0x1(%rsi)
addq $0x2, %rsi
jmp 0x64c7f
movb $0x0, (%rdi)
subl %r14d, %edi
incl %edi
movslq %edi, %rdi
addq %r14, %rdi
xorl %eax, %eax
movl 0x20(%rsp,%rax,4), %ecx
testl %ecx, %ecx
je 0x64dbc
cmpl $0x7f, %ecx
ja 0x64d08
movb %cl, (%rdi)
movl $0x1, %ecx
jmp 0x64db9
movl %ecx, %edx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
ja 0x64d2a
shrl $0x7, %edx
orb $-0x80, %dl
movb %dl, (%rdi)
andb $0x7f, %cl
movb %cl, 0x1(%rdi)
movl $0x2, %ecx
jmp 0x64db9
cmpl $0x1fffff, %ecx         # imm = 0x1FFFFF
ja 0x64d52
shrl $0xe, %edx
orb $-0x80, %dl
movb %dl, (%rdi)
movl %ecx, %edx
shrl $0x7, %edx
orb $-0x80, %dl
movb %dl, 0x1(%rdi)
andb $0x7f, %cl
movb %cl, 0x2(%rdi)
movl $0x3, %ecx
jmp 0x64db9
cmpl $0xfffffff, %ecx        # imm = 0xFFFFFFF
ja 0x64d85
shrl $0x15, %edx
orb $-0x80, %dl
movb %dl, (%rdi)
movl %ecx, %edx
shrl $0xe, %edx
orb $-0x80, %dl
movb %dl, 0x1(%rdi)
movl %ecx, %edx
shrl $0x7, %edx
orb $-0x80, %dl
movb %dl, 0x2(%rdi)
andb $0x7f, %cl
movb %cl, 0x3(%rdi)
movl $0x4, %ecx
jmp 0x64db9
shrl $0x1c, %edx
orb $-0x80, %dl
movb %dl, (%rdi)
movl %ecx, %edx
shrl $0x15, %edx
orb $-0x80, %dl
movb %dl, 0x1(%rdi)
movl %ecx, %edx
shrl $0xe, %edx
orb $-0x80, %dl
movb %dl, 0x2(%rdi)
movl %ecx, %edx
shrl $0x7, %edx
orb $-0x80, %dl
movb %dl, 0x3(%rdi)
andb $0x7f, %cl
movb %cl, 0x4(%rdi)
movl $0x5, %ecx
addq %rcx, %rdi
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x64ceb
testl %r10d, %r10d
je 0x64efd
movb $0x1, %r10b
movabsq $0x80000000000, %rcx    # imm = 0x80000000000
movl $0x1, %r11d
movslq %r9d, %r9
xorl %ebx, %ebx
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 %r9d, %r9d
xorl %esi, %esi
xorl %eax, %eax
movl 0x20(%rsp,%rbx,4), %r15d
testq %r15, %r15
je 0x64e3d
cmpl %r15d, %esi
cmovbl %ebx, %eax
cmovbel %r15d, %esi
imulq %rdx, %r15
shrq $0x1f, %r15
cmpl $0x2, %r15d
cmovbl %r11d, %r15d
movl %r15d, 0x20(%rsp,%rbx,4)
addl %r9d, %r15d
movl %r15d, %r9d
incq %rbx
cmpq $0x100, %rbx            # imm = 0x100
jne 0x64e0e
leal -0x1000(%r9), %ebx
movl $0x1000, %esi           # imm = 0x1000
subl %r9d, %esi
cltq
testl %esi, %esi
jg 0x64eda
jns 0x64ef2
movl 0x20(%rsp,%rax,4), %edx
cmpl %ebx, %edx
jbe 0x64e7a
movl %edx, %ebp
shrl %ebp
cmpl %ebx, %ebp
setb %bl
testb %bl, %r10b
je 0x64ee6
testb $0x1, %r10b
movl $0x0, %r10d
jne 0x64de7
subl %r9d, %edx
movl $0x1, 0x20(%rsp,%rax,4)
addl $0xfff, %edx            # imm = 0xFFF
je 0x64ef2
xorl %ecx, %ecx
movl 0x20(%rsp,%rcx,4), %esi
cmpl $0x2, %esi
jb 0x64ec8
movl %edx, %r9d
negl %r9d
movl $0x1, %r10d
subl %esi, %r10d
cmpl %r9d, %esi
cmoval %edx, %r10d
addl %r10d, %esi
movl %esi, 0x20(%rsp,%rcx,4)
subl %r10d, %edx
cmpq $0xfe, %rcx
ja 0x64ef2
incq %rcx
testl %edx, %edx
jne 0x64e9f
jmp 0x64ef2
leaq (%rsp,%rax,4), %rcx
addq $0x20, %rcx
movl (%rcx), %edx
jmp 0x64eee
leaq (%rsp,%rax,4), %rcx
addq $0x20, %rcx
addl %esi, %edx
movl %edx, (%rcx)
cmpl $0x0, 0x20(%rsp,%rax,4)
je 0x648db
subq %r14, %rdi
xorl %r9d, %r9d
xorl %r10d, %r10d
movl 0x20(%rsp,%r9,4), %r11d
testq %r11, %r11
je 0x64fbc
cmpl $0x1001, %r10d          # imm = 0x1001
jae 0x65347
movl $0x1000, %eax           # imm = 0x1000
subl %r10d, %eax
cmpl %r11d, %eax
jb 0x65366
movq %r9, %rax
shlq $0x4, %rax
leaq (%rsp,%rax), %rbx
addq $0x440, %rbx            # imm = 0x440
movl $0x1000, %eax           # imm = 0x1000
subl %r11d, %eax
movl %r11d, %ecx
shll $0x13, %ecx
decl %ecx
movl %ecx, (%rbx)
movw %ax, 0xc(%rbx)
cmpq $0x1, %r11
jne 0x64f76
movl $0xffffffff, 0x4(%rbx)  # imm = 0xFFFFFFFF
movw $0x0, 0xe(%rbx)
leal 0xfff(%r10), %eax
jmp 0x64fae
movl $0x1e, %esi
leal -0x1e(%rsi), %ecx
movl $0x1, %eax
shll %cl, %eax
incl %esi
cmpl %r11d, %eax
jb 0x64f7b
movl $0x1, %eax
movl %esi, %ecx
shlq %cl, %rax
addq %r11, %rax
decq %rax
xorl %edx, %edx
divq %r11
movl %eax, 0x4(%rbx)
addl $-0x20, %esi
movw %si, 0xe(%rbx)
movl %r10d, %eax
movl %eax, 0x8(%rbx)
addw $0x20, 0xe(%rbx)
addl %r10d, %r11d
movl %r11d, %r10d
incq %r9
cmpq $0x100, %r9             # imm = 0x100
jne 0x64f06
movq 0x18(%rsp), %r15
movl %r15d, %edx
andl $0x3, %edx
movl $0x8000, %ebp           # imm = 0x8000
leaq 0x39ba5(%rip), %rax     # 0x9eb88
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
movl $0x8000, %r10d          # imm = 0x8000
movq %r13, %rax
movl $0x8000, (%rsp)         # imm = 0x8000
movl $0x8000, %ebx           # imm = 0x8000
movl $0x8000, %esi           # imm = 0x8000
movl $0x8000, %r11d          # imm = 0x8000
movl $0x8000, %r9d           # imm = 0x8000
jmpq *%rcx
movl %r8d, %eax
movzbl (%r12,%rax), %esi
shll $0x4, %esi
movl $0x8000, %r8d           # imm = 0x8000
xorl %ecx, %ecx
cmpl %r8d, 0x440(%rsp,%rsi)
setb %cl
leal (%rcx,%rcx), %r9d
shll $0x4, %ecx
shrl %cl, %r8d
movw $0x8000, -0x2(%r13)     # imm = 0x8000
movl 0x444(%rsp,%rsi), %r11d
imulq %r8, %r11
movb 0x44e(%rsp,%rsi), %cl
shrq %cl, %r11
movq %r13, %rax
addl 0x448(%rsp,%rsi), %r8d
subq %r9, %rax
movzwl 0x44c(%rsp,%rsi), %r10d
imull %r11d, %r10d
addl %r8d, %r10d
movl %r15d, %ecx
subl %edx, %ecx
incl %ecx
movzbl (%r12,%rcx), %edx
shll $0x4, %edx
xorl %ecx, %ecx
cmpl %ebp, 0x440(%rsp,%rdx)
setb %cl
leal (%rcx,%rcx), %esi
shll $0x4, %ecx
movl $0x8000, %r8d           # imm = 0x8000
shrl %cl, %r8d
movw $0x8000, -0x2(%rax)     # imm = 0x8000
movl 0x444(%rsp,%rdx), %r9d
imulq %r8, %r9
movb 0x44e(%rsp,%rdx), %cl
shrq %cl, %r9
subq %rsi, %rax
addl 0x448(%rsp,%rdx), %r8d
movzwl 0x44c(%rsp,%rdx), %ebx
imull %r9d, %ebx
addl %r8d, %ebx
movl %r10d, (%rsp)
movl %r15d, %ecx
andl $-0x4, %ecx
movzbl (%r12,%rcx), %edx
shll $0x4, %edx
xorl %ecx, %ecx
cmpl %ebp, 0x440(%rsp,%rdx)
setb %cl
leal (%rcx,%rcx), %esi
shll $0x4, %ecx
movl $0x8000, %r8d           # imm = 0x8000
shrl %cl, %r8d
movw $0x8000, -0x2(%rax)     # imm = 0x8000
movl 0x444(%rsp,%rdx), %r9d
imulq %r8, %r9
movb 0x44e(%rsp,%rdx), %cl
shrq %cl, %r9
subq %rsi, %rax
addl 0x448(%rsp,%rdx), %r8d
movzwl 0x44c(%rsp,%rdx), %esi
imull %r9d, %esi
addl %r8d, %esi
movl (%rsp), %ecx
movl %ecx, %r11d
movl %ebx, %r9d
movq %r13, 0x10(%rsp)
movq %r14, (%rsp)
andl $-0x4, %r15d
jle 0x652d0
movl %r15d, %r8d
addq $0x4, %r8
movl $0x8000, %r15d          # imm = 0x8000
movzbl -0x5(%r12,%r8), %ebx
shll $0x4, %ebx
movzbl -0x6(%r12,%r8), %edx
shll $0x4, %edx
movzbl -0x7(%r12,%r8), %r13d
shll $0x4, %r13d
movzbl -0x8(%r12,%r8), %r10d
shll $0x4, %r10d
xorl %ecx, %ecx
cmpl 0x440(%rsp,%rbx), %r15d
seta %cl
leal (%rcx,%rcx), %ebp
movw %r15w, -0x2(%rax)
shll $0x4, %ecx
shrl %cl, %r15d
movl 0x444(%rsp,%rbx), %r14d
imulq %r15, %r14
movb 0x44e(%rsp,%rbx), %cl
shrq %cl, %r14
subq %rbp, %rax
addl 0x448(%rsp,%rbx), %r15d
movzwl 0x44c(%rsp,%rbx), %ebp
imull %r14d, %ebp
addl %r15d, %ebp
xorl %ecx, %ecx
cmpl 0x440(%rsp,%rdx), %r11d
seta %cl
leal (%rcx,%rcx), %ebx
movw %r11w, -0x2(%rax)
shll $0x4, %ecx
shrl %cl, %r11d
movl 0x444(%rsp,%rdx), %r14d
imulq %r11, %r14
movb 0x44e(%rsp,%rdx), %cl
shrq %cl, %r14
subq %rbx, %rax
addl 0x448(%rsp,%rdx), %r11d
movzwl 0x44c(%rsp,%rdx), %ebx
imull %r14d, %ebx
addl %r11d, %ebx
xorl %ecx, %ecx
cmpl 0x440(%rsp,%r13), %r9d
seta %cl
leal (%rcx,%rcx), %edx
movw %r9w, -0x2(%rax)
shll $0x4, %ecx
shrl %cl, %r9d
movl 0x444(%rsp,%r13), %r11d
imulq %r9, %r11
movb 0x44e(%rsp,%r13), %cl
shrq %cl, %r11
subq %rdx, %rax
addl 0x448(%rsp,%r13), %r9d
movzwl 0x44c(%rsp,%r13), %edx
imull %r11d, %edx
addl %r9d, %edx
xorl %ecx, %ecx
cmpl 0x440(%rsp,%r10), %esi
seta %cl
leal (%rcx,%rcx), %r9d
movw %si, -0x2(%rax)
shll $0x4, %ecx
shrl %cl, %esi
movl 0x444(%rsp,%r10), %r11d
imulq %rsi, %r11
movb 0x44e(%rsp,%r10), %cl
shrq %cl, %r11
subq %r9, %rax
addl 0x448(%rsp,%r10), %esi
movzwl 0x44c(%rsp,%r10), %ecx
imull %r11d, %ecx
addl %esi, %ecx
addq $-0x4, %r8
movl %ebp, %r15d
movl %edx, %r9d
movl %ebx, %r11d
movl %ecx, %esi
cmpq $0x4, %r8
jg 0x65161
jmp 0x652d8
movl %esi, %ecx
movl %r11d, %ebx
movl %r9d, %edx
movl %ebp, -0x4(%rax)
movb %bl, -0x8(%rax)
movb %bh, -0x7(%rax)
movl %ebx, %esi
shrl $0x10, %esi
movb %sil, -0x6(%rax)
shrl $0x18, %ebx
movb %bl, -0x5(%rax)
movb %dl, -0xc(%rax)
movb %dh, -0xb(%rax)
movl %edx, %esi
shrl $0x10, %esi
movb %sil, -0xa(%rax)
shrl $0x18, %edx
movb %dl, -0x9(%rax)
leaq -0x10(%rax), %rsi
movb %cl, -0x10(%rax)
movb %ch, -0xf(%rax)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, -0xe(%rax)
shrl $0x18, %ecx
movb %cl, -0xd(%rax)
movslq %edi, %rdi
movq (%rsp), %r14
movq 0x10(%rsp), %r13
subq %rsi, %r13
leal (%rdi,%r13), %eax
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
addq %r14, %rdi
movq %r13, %rdx
callq 0x4830
jmp 0x648de
leaq 0x398c8(%rip), %rdi     # 0x9ec16
leaq 0x3985b(%rip), %rsi     # 0x9ebb0
leaq 0x39874(%rip), %rcx     # 0x9ebd0
movl $0xcc, %edx
callq 0x42f0
leaq 0x398c5(%rip), %rdi     # 0x9ec32
leaq 0x3983c(%rip), %rsi     # 0x9ebb0
leaq 0x39855(%rip), %rcx     # 0x9ebd0
movl $0xcd, %edx
callq 0x42f0