// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rt17.cpp
// Function: bamboo::input_rt17(bamboo::raw_t*, unsigned char)
EXPORT int input_rt17(raw_t *Raw, unsigned char Data)
{
    rt17_t *rt17 = (rt17_t*) Raw->rcv_data;
    unsigned char *MessageBuffer = rt17->MessageBuffer;
    unsigned char *PacketBuffer = rt17->PacketBuffer;
    unsigned int Page, Pages, Reply;
    int Ret = 0;

    /* If no current packet */
    if (rt17->PacketBytes == 0)
    {   
        /* Find something that looks like a packet. */
        if (SyncPacket(rt17, Data))
        {
            /* Found one. */
            rt17->PacketLength = 4 + PacketBuffer[3] + 2; /* 4 (header) + length + 2 (trailer) */
            rt17->PacketBytes = 4; /* We now have four bytes in the packet buffer */
        }
                
        /* Continue reading the rest of the packet from the stream */
        return 0;
    }

    /* Store the next byte of the packet */
    PacketBuffer[rt17->PacketBytes++] = Data;

    /*
    | Keep storing bytes into the current packet
    | until we have what we think are all of them.
    */
    if (rt17->PacketBytes < rt17->PacketLength)
        return 0;

    /*
    | At this point we think have an entire packet.
    | The prospective packet must end with an ETX.
    */
    if (rt17->PacketBuffer[rt17->PacketLength-1] != ETX)
    {
        tracet(2, "RT17: Prospective packet did not end with an ETX character. Some data lost.\n");
        ClearPacketBuffer(rt17);
        return 0;
    }

    /*
    | We do indeed have an entire packet.
    | Check the packet checksum.
    */
    if (!CheckPacketChecksum(PacketBuffer))
    {
        tracet(2, "RT17: Packet checksum failure. Packet discarded.\n");
        ClearPacketBuffer(rt17);
        return 0;
    }

    if (Raw->outtype)
        sprintf(Raw->msgtype, "RT17 0x%02X (%4d)", PacketBuffer[2], rt17->PacketLength);

    /* If this is a SVDATA packet, then process it immediately */
    if (PacketBuffer[2] == RETSVDATA)
    {
        Ret = DecodeRetsvdata(Raw);
        ClearPacketBuffer(rt17);
        return Ret;
    }
        
    /* Accumulate a sequence of RAWDATA packets (pages) */
    if (PacketBuffer[2] == RAWDATA)
    {
        Page  = PacketBuffer[5] >> 4;
        Pages = PacketBuffer[5] & 15;
        Reply = PacketBuffer[6];

        /*
        | If this is the first RAWDATA packet in a sequence of RAWDATA packets,
        | then make sure it's page one and not a packet somewhere in the middle.
        | If not page one, then skip it and continue reading from the stream
        | until we find one that starts at page one. Otherwise make sure it is
        | a part of the same requence of packets as the last one, that it's
        | page number is in sequence.
        */
        if (rt17->MessageBytes == 0)
        {       
            if (Page != 1)
            {
                tracet(2, "RT17: First RAWDATA packet is not page #1. Packet discarded.\n");
                ClearPacketBuffer(rt17);
                return 0;
            }

            rt17->Reply = PacketBuffer[6];
        }
        else if ((Reply != rt17->Reply) || (Page != (rt17->Page + 1)))
        {
            tracet(2, "RT17: RAWDATA packet sequence number mismatch or page out of order. %u RAWDATA packets discarded.\n", Page);
            ClearMessageBuffer(rt17);
            ClearPacketBuffer(rt17);
            return 0;
        }
        
        /* Check for message buffer overflow */
        if ((rt17->MessageBytes + rt17->PacketBytes) > MBUFF_LENGTH)
        {
            tracet(2, "RT17: Buffer would overflow. %u RAWDATA packets discarded.\n", Page);
            ClearMessageBuffer(rt17);
            ClearPacketBuffer(rt17);
            return 0; 
        }

        memcpy(MessageBuffer + rt17->MessageBytes, PacketBuffer, rt17->PacketBytes);
        rt17->MessageBytes += rt17->PacketBytes;
        rt17->MessageLength += rt17->PacketLength;
        ClearPacketBuffer(rt17);

        if (Page == Pages)
        {
            Ret = DecodeRawdata(Raw);
            ClearMessageBuffer(rt17);
            return Ret;
        }

        rt17->Page = Page;

        return 0;
    }

    /* Accumulate a sequence of GENOUT (GSOF) packets (pages) */
    if (PacketBuffer[2] == GENOUT)
    {
        Reply = PacketBuffer[4];
        Page  = PacketBuffer[5];
        Pages = PacketBuffer[6];

        /*
        | If this is the first GENOUT packet in a sequence of GENOUT packets,
        | then make sure it's page zero and not a packet somewhere in the middle.
        | If not page zero, then skip it and continue reading from the stream
        | until we find one that starts at page zero. Otherwise make sure it is
        | a part of the same requence of packets as the last one, that it's
        | page number is in sequence.
        */
        if (rt17->MessageBytes == 0)
        {       
            if (Page != 0)
            {
                tracet(3, "RT17: First GENOUT packet is not page #0. Packet discarded.\n");
                ClearPacketBuffer(rt17);
                return 0;
            }

            rt17->Reply = PacketBuffer[4];
        }
        else if ((Reply != rt17->Reply) || (Page != (rt17->Page + 1)))
        {
            tracet(2, "RT17: GENOUT packet sequence number mismatch or page out of order. %u GENOUT packets discarded.\n", Page);
            ClearMessageBuffer(rt17);
            ClearPacketBuffer(rt17);
            return 0;
        }
        
        /* Check for message buffer overflow. */
        if ((rt17->MessageBytes + rt17->PacketBytes) > MBUFF_LENGTH)
        {
            tracet(2, "RT17: Buffer would overflow. %u GENOUT packets discarded.\n", Page);
            ClearMessageBuffer(rt17);
            ClearPacketBuffer(rt17);
            return 0; 
        }

        memcpy(MessageBuffer + rt17->MessageBytes, PacketBuffer, rt17->PacketBytes);
        rt17->MessageBytes += rt17->PacketBytes;
        rt17->MessageLength += rt17->PacketLength;
        ClearPacketBuffer(rt17);

        if (Page == Pages)
        {
            Ret = DecodeGSOF(Raw);
            ClearMessageBuffer(rt17);
            return Ret;
        }

        rt17->Page = Page;

        return 0;
    }

    /*
    | If we fall through to here, then the packet is not one that we support
    | (and hence we can't really even get here). Dump the packet on the floor
    | and continue reading from the stream.
    */
    tracet(2, "RT17: Packet is not GENOUT, RAWDATA or RETSVDATA. Packet discarded.\n"); 
    ClearPacketBuffer(rt17);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq 0x82ba0(%rdi), %r13
movq 0x8(%r13), %r14
movl 0x24(%r13), %eax
testq %rax, %rax
je 0x379de
movq (%r13), %r15
leal 0x1(%rax), %ecx
movl %ecx, 0x24(%r13)
movb %sil, (%r14,%rax)
movl 0x28(%r13), %ecx
xorl %r12d, %r12d
cmpl %ecx, 0x24(%r13)
jb 0x37a5f
movq 0x8(%r13), %rax
leal -0x1(%rcx), %edx
cmpb $0x3, (%rax,%rdx)
jne 0x37a2e
movq %rdi, %rbx
movzbl 0x3(%r14), %eax
leaq 0x3(%rax), %rdx
xorl %esi, %esi
xorl %edi, %edi
addb 0x1(%r14,%rsi), %dil
incq %rsi
cmpl %esi, %edx
jne 0x3795a
cmpb 0x4(%r14,%rax), %dil
jne 0x37a37
cmpl $0x0, 0x81a8c(%rbx)
je 0x37994
leaq 0x70e70(%rbx), %rdi
movzbl 0x2(%r14), %edx
leaq 0x35ac8(%rip), %rsi     # 0x6d455
xorl %eax, %eax
callq 0x8120
movzbl 0x2(%r14), %eax
cmpl $0x40, %eax
je 0x37ab3
cmpl $0x57, %eax
je 0x37a74
cmpl $0x55, %eax
jne 0x37aef
movq 0x82ba0(%rbx), %rax
movq 0x8(%rax), %rcx
movzbl 0x4(%rcx), %r14d
cmpq $0x16, %r14
ja 0x37afb
leaq 0x55cbb(%rip), %rcx     # 0x8d690
movq (%rcx,%r14,8), %rdx
jmp 0x37afd
movb 0x1(%r14), %cl
movb 0x2(%r14), %al
movb %cl, (%r14)
movb %al, 0x1(%r14)
movzbl 0x3(%r14), %eax
movb %al, 0x2(%r14)
movb %sil, 0x3(%r14)
xorl %r12d, %r12d
testb %sil, %sil
je 0x37a5f
cmpb $0x2, %cl
jne 0x37a5f
addl $-0x40, %eax
cmpl $0x17, %eax
ja 0x37a5f
movl $0xa00001, %ecx         # imm = 0xA00001
btl %eax, %ecx
jae 0x37a5f
movzbl %sil, %eax
addl $0x6, %eax
movl %eax, 0x28(%r13)
movl $0x4, 0x24(%r13)
jmp 0x37a5f
leaq 0x359a1(%rip), %rsi     # 0x6d3d6
jmp 0x37a3e
leaq 0x359e5(%rip), %rsi     # 0x6d423
xorl %r12d, %r12d
movl $0x2, %edi
xorl %eax, %eax
callq 0x53ec4
movq 0x8(%r13), %rax
movl $0x0, (%rax)
movq $0x0, 0x24(%r13)
movl %r12d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x5(%r14), %r12d
movl %r12d, %r8d
shrl $0x4, %r8d
movzbl 0x6(%r14), %ecx
movl 0x1c(%r13), %eax
testq %rax, %rax
je 0x37b7f
cmpl %ecx, 0x30(%r13)
jne 0x37aa7
movl 0x2c(%r13), %ecx
incl %ecx
cmpl %ecx, %r8d
je 0x37b89
leaq 0x359f7(%rip), %rsi     # 0x6d4a5
jmp 0x37ce0
movzbl 0x4(%r14), %ecx
movzbl 0x5(%r14), %r8d
movb 0x6(%r14), %r12b
movl 0x1c(%r13), %eax
testq %rax, %rax
je 0x37ba4
cmpl %ecx, 0x30(%r13)
jne 0x37ae3
movl 0x2c(%r13), %ecx
incl %ecx
cmpl %r8d, %ecx
je 0x37cca
leaq 0x35a97(%rip), %rsi     # 0x6d581
jmp 0x37ce0
leaq 0x35b27(%rip), %rsi     # 0x6d61d
jmp 0x37a3e
xorl %edx, %edx
testq %rdx, %rdx
leaq 0x35b5b(%rip), %rcx     # 0x6d662
cmovneq %rdx, %rcx
movl 0x28(%rax), %r8d
leaq 0x362a4(%rip), %rsi     # 0x6ddba
movl $0x3, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x53ec4
cmpl $0xa, %r14d
jg 0x37b55
cmpl $0x1, %r14d
je 0x37c12
cmpl $0x3, %r14d
je 0x37c62
cmpl $0x9, %r14d
jne 0x37c59
leaq 0x365d5(%rip), %rsi     # 0x6e125
jmp 0x37cb9
cmpl $0xb, %r14d
je 0x37c50
cmpl $0xe, %r14d
je 0x37cb2
cmpl $0x15, %r14d
jne 0x37c59
leaq 0x36638(%rip), %rsi     # 0x6e1b2
jmp 0x37cb9
cmpl $0x1, %r8d
jne 0x37bb9
movl %ecx, 0x30(%r13)
movl 0x24(%r13), %edx
leal (%rdx,%rax), %ecx
cmpl $0x2001, %ecx           # imm = 0x2001
jb 0x37bc5
leaq 0x35969(%rip), %rsi     # 0x6d508
jmp 0x37ce0
testl %r8d, %r8d
je 0x37cc6
leaq 0x35990(%rip), %rsi     # 0x6d544
jmp 0x37cb9
leaq 0x358a7(%rip), %rsi     # 0x6d467
jmp 0x37a3e
andl $0xf, %r12d
addq %rax, %r15
movq %r15, %rdi
movq %r14, %rsi
movl %r8d, %r14d
callq 0x84f0
movl 0x24(%r13), %eax
addl %eax, 0x1c(%r13)
movl 0x28(%r13), %eax
addl %eax, 0x20(%r13)
movq 0x8(%r13), %rax
movl $0x0, (%rax)
movq $0x0, 0x24(%r13)
cmpl %r12d, %r14d
jne 0x37d6d
movq %rbx, %rdi
callq 0x3850f
jmp 0x37d54
movq 0x82ba0(%rbx), %r12
movq 0x8(%r12), %r14
movl 0x28(%r12), %edx
leaq 0x362d1(%rip), %rsi     # 0x6defb
movl $0x3, %edi
xorl %eax, %eax
callq 0x53ec4
movl 0x28(%r12), %edx
cmpl $0xb5, %edx
ja 0x37d7c
leaq 0x362d4(%rip), %rsi     # 0x6df22
jmp 0x37c9b
leaq 0x364fe(%rip), %rsi     # 0x6e155
jmp 0x37cb9
leaq 0x35f19(%rip), %rsi     # 0x6db79
jmp 0x37cb9
movq 0x82ba0(%rbx), %r15
movq 0x8(%r15), %r14
movl 0x28(%r15), %edx
leaq 0x36432(%rip), %rsi     # 0x6e0aa
movl $0x3, %edi
xorl %eax, %eax
callq 0x53ec4
movl 0x28(%r15), %edx
cmpl $0x80, %edx
ja 0x37df4
leaq 0x36436(%rip), %rsi     # 0x6e0d1
movl $0x2, %edi
xorl %eax, %eax
callq 0x53ec4
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x37a4d
leaq 0x364cc(%rip), %rsi     # 0x6e185
xorl %r12d, %r12d
movl $0x3, %edi
jmp 0x37a46
movl %ecx, 0x30(%r13)
movl 0x24(%r13), %edx
leal (%rdx,%rax), %ecx
cmpl $0x2001, %ecx           # imm = 0x2001
jb 0x37d11
leaq 0x35902(%rip), %rsi     # 0x6d5e2
xorl %r12d, %r12d
movl $0x2, %edi
movl %r8d, %edx
xorl %eax, %eax
callq 0x53ec4
movq (%r13), %rax
movl %r12d, (%rax)
movq %r12, 0x1c(%r13)
movl %r12d, 0x30(%r13)
movq 0x8(%r13), %rax
movl %r12d, (%rax)
movq %r12, 0x24(%r13)
jmp 0x37a5f
addq %rax, %r15
movq %r15, %rdi
movq %r14, %rsi
movl %r8d, %r14d
callq 0x84f0
movl %r14d, %ecx
movl 0x24(%r13), %eax
addl %eax, 0x1c(%r13)
movl 0x28(%r13), %eax
addl %eax, 0x20(%r13)
movq 0x8(%r13), %rax
movl $0x0, (%rax)
movq $0x0, 0x24(%r13)
cmpb %r12b, %cl
jne 0x37d70
movq %rbx, %rdi
callq 0x389f7
movq (%r13), %rcx
xorl %edx, %edx
movl %edx, (%rcx)
movq $0x0, 0x1c(%r13)
movl %edx, 0x30(%r13)
jmp 0x37a62
movl %r14d, %ecx
movl %ecx, 0x2c(%r13)
xorl %r12d, %r12d
jmp 0x37a5f
movzbl 0x5(%r14), %r15d
movl $0x1, %edi
movl %r15d, %esi
callq 0x4dbc5
movl %eax, -0x4c(%rbp)
testl %eax, %eax
je 0x37ec9
movzwl 0x6(%r14), %eax
movzwl 0x8(%r14), %edx
rolw $0x8, %ax
movzwl %ax, %r8d
rolw $0x8, %dx
movzwl %dx, %eax
movq %rax, -0x40(%rbp)
movzbl 0xb(%r14), %eax
movl %eax, -0x34(%rbp)
movl 0xc(%r14), %r15d
bswapl %r15d
movl 0x10(%r14), %eax
bswapl %eax
movl 0x14(%r14), %ecx
bswapl %ecx
movzbl 0xb2(%r14), %r9d
testb $0x4, %r9b
movl %r9d, -0x48(%rbp)
jne 0x37edd
movsd 0x32ab9(%rip), %xmm0    # 0x6a8a8
jmp 0x37f4c
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x38e30
movq 0x6(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1eb0(%rbx)
movq 0xe(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1eb8(%rbx)
movq 0x16(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1ec0(%rbx)
movq 0x1e(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1ec8(%rbx)
movq 0x26(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1ed0(%rbx)
movq 0x2e(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1ed8(%rbx)
movq 0x36(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1ee0(%rbx)
movq 0x3e(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1ee8(%rbx)
movq 0x46(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1dd0(%rbx)
movq 0x4e(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1dd8(%rbx)
movq 0x56(%r14), %rcx
bswapq %rcx
movq %rcx, 0x1de0(%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x1de8(%rbx)
movq 0x5e(%r14), %rax
bswapq %rax
movq %rax, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x1fd0(%rbx)
movl $0x9, %r12d
jmp 0x37a4d
leaq 0x360a1(%rip), %rsi     # 0x6df71
movl $0x2, %edi
movl %r15d, %edx
jmp 0x37ca0
movl %edx, %esi
andl $0xfff8, %esi           # imm = 0xFFF8
cmpl $0xf0, %esi
jne 0x37ef7
movsd 0x32b4b(%rip), %xmm0    # 0x6aa40
jmp 0x37f4c
movzwl %si, %esi
cmpl $0xf8, %esi
sete %sil
cmpl $0x1f0, -0x40(%rbp)     # imm = 0x1F0
sete %dil
orb %sil, %dil
je 0x37f1e
movsd 0x32a8c(%rip), %xmm0    # 0x6a9a8
jmp 0x37f4c
leal -0x1f1(%rdx), %esi
cmpw $0x7, %si
jae 0x37f34
movsd 0x353ce(%rip), %xmm0    # 0x6d300
jmp 0x37f4c
leal -0x1f8(%rdx), %esi
cmpw $0x7, %si
jae 0x38476
movsd 0x353bc(%rip), %xmm0    # 0x6d308
movsd %xmm0, -0x30(%rbp)
movq 0x40(%r14), %rdx
movq %rdx, -0x70(%rbp)
movq 0x48(%r14), %rdx
movq %rdx, -0x78(%rbp)
movq 0x50(%r14), %rdx
movq %rdx, -0x88(%rbp)
movq 0x60(%r14), %rdx
movq %rdx, -0x80(%rbp)
movq 0x68(%r14), %rdx
movq %rdx, -0x108(%rbp)
movq 0x70(%r14), %rdx
movq %rdx, -0x90(%rbp)
movq 0x78(%r14), %rdx
movq %rdx, -0x98(%rbp)
movq 0x80(%r14), %rdx
movq %rdx, -0xa8(%rbp)
movq 0x88(%r14), %rdx
movq %rdx, -0xa0(%rbp)
movq 0x98(%r14), %rdx
movq %rdx, -0xb0(%rbp)
movl %ecx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movsd %xmm0, -0x58(%rbp)
movq 0xa0(%r14), %rcx
movq %rcx, -0x68(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movq 0xa8(%r14), %rax
movq %rax, -0x60(%rbp)
movzbl 0xb3(%r14), %eax
movl %eax, -0x44(%rbp)
movq 0x18(%r14), %rax
movq %rax, -0x120(%rbp)
movq 0x20(%r14), %rax
movq %rax, -0x118(%rbp)
movq 0x28(%r14), %rax
movq %rax, -0x110(%rbp)
movq 0x30(%r14), %rax
movq %rax, -0x100(%rbp)
movq 0x38(%r14), %rax
movq %rax, -0xf8(%rbp)
movq 0x58(%r14), %rax
movq %rax, -0xe8(%rbp)
movq 0x90(%r14), %rax
movq %rax, -0xf0(%rbp)
movl %r8d, %r14d
movl %r8d, %edi
callq 0x4fbc6
movq %rax, -0xd8(%rbp)
movsd %xmm0, -0xe0(%rbp)
movl %r14d, %edi
movsd -0x58(%rbp), %xmm0
callq 0x4fbc6
movq %rax, -0xc0(%rbp)
movsd %xmm0, -0xb8(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movl %r14d, %r15d
movl %r14d, %edi
callq 0x4fbc6
movq %rax, -0xc8(%rbp)
movsd %xmm0, -0xd0(%rbp)
leaq 0x35f01(%rip), %rsi     # 0x6dfa6
movl $0x3, %edi
movl -0x4c(%rbp), %r14d
movl %r14d, %edx
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x53ec4
movl 0x34(%r12), %eax
testl %eax, %eax
je 0x380ff
cmpl %r15d, %eax
je 0x380ff
leaq 0x35f0e(%rip), %rsi     # 0x6dfe6
movl $0x2, %edi
xorl %eax, %eax
callq 0x53ec4
movl 0x34(%r12), %edx
leaq 0x35f47(%rip), %rsi     # 0x6e037
movl $0x2, %edi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x53ec4
movl 0x18(%r12), %eax
testb $0x1, %al
jne 0x38162
movl 0x34(%r12), %edx
testl %edx, %edx
je 0x3811b
andl $0x4, %eax
jne 0x3811b
cmpl %r15d, %edx
jge 0x38162
testl %edx, %edx
je 0x38137
leaq 0x35f51(%rip), %rsi     # 0x6e077
movl $0x2, %edi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x53ec4
jmp 0x3814d
leaq 0x35be4(%rip), %rsi     # 0x6dd22
movl $0x2, %edi
movl %r15d, %edx
xorl %eax, %eax
callq 0x53ec4
movl 0x18(%r12), %eax
andl $-0x7, %eax
orl $0x2, %eax
movl %eax, 0x18(%r12)
movl %r15d, 0x34(%r12)
leaq 0x82a90(%rbx), %rdi
leaq 0x34557(%rip), %rsi     # 0x6c6c7
callq 0x8160
movslq %r14d, %rcx
testq %rax, %rax
jne 0x3819f
movq 0x1d80(%rbx), %rax
leaq (%rcx,%rcx,8), %rdx
shlq $0x5, %rdx
xorl %r12d, %r12d
movl -0x34(%rbp), %esi
cmpl %esi, -0x11c(%rax,%rdx)
je 0x37a4d
movq -0x70(%rbp), %rax
bswapq %rax
movq %rax, %xmm2
movq -0x78(%rbp), %rax
bswapq %rax
movq %rax, %xmm4
movq -0x88(%rbp), %rax
bswapq %rax
movq -0x80(%rbp), %rdx
bswapq %rdx
movq %rax, %xmm0
movq %rdx, %xmm1
movq -0x90(%rbp), %rax
bswapq %rax
movq %rax, %xmm3
movq -0x98(%rbp), %rax
bswapq %rax
movq %rax, %xmm6
movq -0xa8(%rbp), %rax
bswapq %rax
movq -0xa0(%rbp), %rdx
bswapq %rdx
movq %rax, %xmm5
movq %rdx, %xmm8
movq -0xb0(%rbp), %rax
bswapq %rax
movq %rax, %xmm10
movq -0x68(%rbp), %rax
bswapq %rax
movq %rax, %xmm7
movq -0x60(%rbp), %rax
bswapq %rax
movq %rax, %xmm9
leaq (%rcx,%rcx,8), %rax
shlq $0x5, %rax
movq 0x1d80(%rbx), %rcx
movl %r14d, -0x120(%rcx,%rax)
movl -0x34(%rbp), %edx
movl %edx, -0x11c(%rcx,%rax)
movq -0x40(%rbp), %rdx
movl %edx, -0x118(%rcx,%rax)
movl -0x48(%rbp), %esi
movl %esi, %edx
shrl $0x3, %esi
andl $0xf, %esi
movl %esi, -0x114(%rcx,%rax)
shll $0x8, %edx
movl -0x44(%rbp), %esi
orl %esi, %edx
shrl $0x4, %edx
andl $0x7f, %edx
movl %edx, -0x110(%rcx,%rax)
movl %r15d, -0x10c(%rcx,%rax)
movl %esi, %edx
shrl %edx
andl $0x3, %edx
movl %edx, -0x108(%rcx,%rax)
andl $0x1, %esi
movl %esi, -0x104(%rcx,%rax)
movq -0xc0(%rbp), %rdx
movq %rdx, -0x100(%rcx,%rax)
movsd -0xb8(%rbp), %xmm11
movsd %xmm11, -0xf8(%rcx,%rax)
movq -0xd8(%rbp), %rdx
movq %rdx, -0xf0(%rcx,%rax)
movsd 0x33ac6(%rip), %xmm11   # 0x6bda8
mulsd %xmm11, %xmm2
mulsd %xmm11, %xmm8
mulsd %xmm11, %xmm9
mulsd %xmm11, %xmm4
mulsd %xmm11, %xmm10
mulsd %xmm11, %xmm6
mulsd %xmm11, %xmm7
mulsd %xmm11, %xmm3
mulsd %xmm11, %xmm5
mulsd %xmm11, %xmm0
mulsd %xmm11, %xmm1
movsd -0xe0(%rbp), %xmm11
movsd %xmm11, -0xe8(%rcx,%rax)
movq -0xc8(%rbp), %rdx
movq %rdx, -0xe0(%rcx,%rax)
movq -0x108(%rbp), %rdx
bswapq %rdx
movsd -0xd0(%rbp), %xmm11
movsd %xmm11, -0xd8(%rcx,%rax)
movq %rdx, %xmm11
mulsd %xmm11, %xmm11
movsd %xmm11, -0xd0(%rcx,%rax)
movq -0xe8(%rbp), %rdx
bswapq %rdx
movq %rdx, -0xc8(%rcx,%rax)
movsd %xmm8, -0xc0(%rcx,%rax)
movsd %xmm6, -0xb8(%rcx,%rax)
movsd %xmm10, -0xb0(%rcx,%rax)
movsd %xmm4, -0xa8(%rcx,%rax)
movsd %xmm2, -0xa0(%rcx,%rax)
movsd %xmm7, -0x98(%rcx,%rax)
movsd %xmm9, -0x90(%rcx,%rax)
movq -0xf0(%rbp), %rdx
bswapq %rdx
movq %rdx, -0x88(%rcx,%rax)
movq -0xf8(%rbp), %rdx
bswapq %rdx
movq %rdx, -0x80(%rcx,%rax)
movsd %xmm0, -0x78(%rcx,%rax)
movsd %xmm1, -0x70(%rcx,%rax)
movsd %xmm3, -0x68(%rcx,%rax)
movsd %xmm5, -0x60(%rcx,%rax)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rcx,%rax)
movq -0x100(%rbp), %rdx
bswapq %rdx
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x50(%rcx,%rax)
movq %rdx, -0x48(%rcx,%rax)
movq -0x110(%rbp), %rdx
bswapq %rdx
movq %rdx, -0x40(%rcx,%rax)
movq -0x120(%rbp), %rdx
bswapq %rdx
movq -0x118(%rbp), %rsi
bswapq %rsi
movq %rsi, -0x38(%rcx,%rax)
movq %rdx, -0x30(%rcx,%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x18(%rcx,%rax)
movupd %xmm0, -0x28(%rcx,%rax)
movq $0x0, -0x8(%rcx,%rax)
movl %r14d, 0x70e40(%rbx)
movl $0x2, %r12d
jmp 0x37a4d
movsd 0x34e92(%rip), %xmm0    # 0x6d310
movsd %xmm0, -0x30(%rbp)
movq -0x40(%rbp), %rsi
addl $0xfffffd10, %esi       # imm = 0xFFFFFD10
cmpl $0x5, %esi
jb 0x37f51
cmpl $0x1ff, -0x40(%rbp)     # imm = 0x1FF
je 0x37f51
leal -0x2f5(%rdx), %esi
cmpw $0x7, %si
jae 0x384bc
movsd 0x34e61(%rip), %xmm0    # 0x6d318
jmp 0x37f4c
movl %edx, %esi
andl $0xfffc, %esi           # imm = 0xFFFC
cmpl $0x2fc, %esi            # imm = 0x2FC
sete %sil
leal -0x3f0(%rdx), %edi
cmpw $0x3, %di
setb %dil
orb %sil, %dil
je 0x384ee
movsd 0x34e37(%rip), %xmm0    # 0x6d320
jmp 0x37f4c
addl $0xfffffc0d, %edx       # imm = 0xFFFFFC0D
xorl %esi, %esi
cmpw $0xa, %dx
setb %sil
leaq 0x34e23(%rip), %rdx     # 0x6d328
movsd (%rdx,%rsi,8), %xmm0
jmp 0x37f4c