// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_head(int, bamboo::rtcm_t*, int, int, int*, int*, double*, double*, unsigned char*, double*, double*, double*, double*, unsigned char*, float*)
static int encode_msm_head(int type, rtcm_t *rtcm, int sys, int sync, int *nsat,
                           int *ncell, double *rrng, double *rrate,
                           unsigned char *info, double *psrng, double *phrng,
                           double *rate, double *lock, unsigned char *half,
                           float *cnr)
{
    double tow;
    unsigned char sat_ind[64]={0},sig_ind[32]={0},cell_ind[32*64]={0};
    unsigned int dow,epoch;
    int i=24,j,nsig=0;
    
    switch (sys) {
        case SYS_GPS: type+=1070; break;
        case SYS_GLO: type+=1080; break;
        case SYS_GAL: type+=1090; break;
        case SYS_QZS: type+=1110; break;
        case SYS_SBS: type+=1100; break;
        case SYS_CMP: type+=1120; break;
        default: return 0;
    }
    /* generate msm satellite, signal and cell index */
    gen_msm_index(rtcm,sys,nsat,&nsig,ncell,sat_ind,sig_ind,cell_ind);
    
    if (sys==SYS_GLO) {
        /* glonass time (dow + tod-ms) */
        tow=time2gpst(timeadd(gpst2utc(rtcm->time),10800.0),NULL);
        dow=(unsigned int)(tow/86400.0);
        epoch=(dow<<27)+ROUND_U(fmod(tow,86400.0)*1E3);
    }
    else if (sys==SYS_CMP) {
        /* beidou time (tow-ms) */
        epoch=ROUND_U(time2gpst(gpst2bdt(rtcm->time),NULL)*1E3);
    }
    else {
        /* gps, qzs and galileo time (tow-ms) */
        epoch=ROUND_U(time2gpst(rtcm->time,NULL)*1E3);
    }
    /* encode msm header (ref [15] table 3.5-78) */
    setbitu(rtcm->buff,i,12,type       ); i+=12; /* message number */
    setbitu(rtcm->buff,i,12,rtcm->staid); i+=12; /* reference station id */
    setbitu(rtcm->buff,i,30,epoch      ); i+=30; /* epoch time */
    setbitu(rtcm->buff,i, 1,sync       ); i+= 1; /* multiple message bit */
    setbitu(rtcm->buff,i, 3,rtcm->seqno); i+= 3; /* issue of data station */
    setbitu(rtcm->buff,i, 7,0          ); i+= 7; /* reserved */
    setbitu(rtcm->buff,i, 2,0          ); i+= 2; /* clock streering indicator */
    setbitu(rtcm->buff,i, 2,0          ); i+= 2; /* external clock indicator */
    setbitu(rtcm->buff,i, 1,0          ); i+= 1; /* smoothing indicator */
    setbitu(rtcm->buff,i, 3,0          ); i+= 3; /* smoothing interval */
    
    /* satellite mask */
    for (j=0;j<64;j++) {
        setbitu(rtcm->buff,i,1,sat_ind[j]?1:0); i+=1;
    }
    /* signal mask */
    for (j=0;j<32;j++) {
        setbitu(rtcm->buff,i,1,sig_ind[j]?1:0); i+=1;
    }
    /* cell mask */
    for (j=0;j<*nsat*nsig&&j<64;j++) {
        setbitu(rtcm->buff,i,1,cell_ind[j]?1:0); i+=1;
    }
    /* generate msm satellite data fields */
    gen_msm_sat(rtcm,sys,*nsat,sat_ind,rrng,rrate,info);
    
    /* generate msm signal data fields */
    gen_msm_sig(rtcm,sys,*nsat,nsig,*ncell,sat_ind,sig_ind,cell_ind,rrng,rrate,
                psrng,phrng,rate,lock,half,cnr);
    
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8f8, %rsp            # imm = 0x8F8
movq %r9, %r15
movq %r8, %r12
movl %ecx, %r13d
movl %edx, %ebx
movq %rsi, %r14
movl %edi, -0x48(%rbp)
xorpd %xmm0, %xmm0
movapd %xmm0, -0xf0(%rbp)
movapd %xmm0, -0x100(%rbp)
movapd %xmm0, -0x110(%rbp)
movapd %xmm0, -0x120(%rbp)
movapd %xmm0, -0xb0(%rbp)
movapd %xmm0, -0xc0(%rbp)
leaq -0x920(%rbp), %rdi
movl $0x0, -0x5c(%rbp)
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x8390
leal -0x1(%rbx), %eax
cmpl $0x7, %eax
movq %rbx, -0x40(%rbp)
ja 0x4c325
leaq 0x23c1d(%rip), %rcx     # 0x6ff2c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movl %r13d, -0x50(%rbp)
jmpq *%rax
movl $0x42e, -0x30(%rbp)     # imm = 0x42E
jmp 0x4c366
cmpl $0x10, %ebx
je 0x4c35b
cmpl $0x20, %ebx
jne 0x4cd5c
movl %r13d, -0x50(%rbp)
movl $0x460, -0x30(%rbp)     # imm = 0x460
jmp 0x4c366
movl $0x442, -0x30(%rbp)     # imm = 0x442
jmp 0x4c366
movl $0x44c, -0x30(%rbp)     # imm = 0x44C
jmp 0x4c366
movl $0x438, -0x30(%rbp)     # imm = 0x438
jmp 0x4c366
movl %r13d, -0x50(%rbp)
movl $0x456, -0x30(%rbp)     # imm = 0x456
xorl %eax, %eax
movq %r15, -0x80(%rbp)
movl %eax, (%r15)
movq %r12, -0x78(%rbp)
movl %eax, (%r12)
cmpl %eax, 0x30(%r14)
movq %r14, -0x58(%rbp)
jle 0x4c40f
movl $0x18, %ebx
xorl %ecx, %ecx
leaq -0x34(%rbp), %r15
movb $0x1, %r13b
movq 0x38(%r14), %rax
movq %rcx, -0x70(%rbp)
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
movzbl 0x10(%rax,%rcx), %esi
movq -0x40(%rbp), %rdi
callq 0x4cef6
testl %eax, %eax
je 0x4c3f7
movslq %eax, %r12
movq $-0x3, %r14
movq -0x58(%rbp), %rax
movq 0x38(%rax), %rax
addq %rbx, %rax
movzbl 0x3(%r14,%rax), %esi
movq -0x40(%rbp), %rdi
movq %r15, %rdx
callq 0x4cf30
testl %eax, %eax
je 0x4c3f2
cltq
movb %r13b, -0xc1(%rbp,%rax)
movb %r13b, -0x121(%rbp,%r12)
incq %r14
jne 0x4c3bf
movq -0x70(%rbp), %rcx
incq %rcx
movq -0x58(%rbp), %r14
movslq 0x30(%r14), %rax
addq $0x60, %rbx
cmpq %rax, %rcx
jl 0x4c393
movl -0x48(%rbp), %eax
addl %eax, -0x30(%rbp)
xorl %eax, %eax
movq -0x78(%rbp), %rdx
cmpb $0x0, -0x120(%rbp,%rax)
je 0x4c432
movl (%rdx), %ecx
incl %ecx
movl %ecx, (%rdx)
movb %cl, -0x120(%rbp,%rax)
incq %rax
cmpq $0x40, %rax
jne 0x4c41b
movq $0x0, -0x48(%rbp)
xorl %eax, %eax
cmpb $0x0, -0xc0(%rbp,%rax)
je 0x4c460
movq -0x48(%rbp), %rcx
incl %ecx
movq %rcx, -0x48(%rbp)
movb %cl, -0xc0(%rbp,%rax)
incq %rax
cmpq $0x20, %rax
jne 0x4c445
cmpl $0x0, 0x30(%r14)
movslq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
jle 0x4c51b
movl $0x18, %ebx
xorl %r13d, %r13d
leaq -0x34(%rbp), %r15
movq 0x38(%r14), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movzbl 0x10(%rax,%rcx), %esi
movq -0x40(%rbp), %rdi
callq 0x4cef6
testl %eax, %eax
je 0x4c503
movslq %eax, %r12
movq $-0x3, %r14
movq -0x58(%rbp), %rax
movq 0x38(%rax), %rax
addq %rbx, %rax
movzbl 0x3(%r14,%rax), %esi
movq -0x40(%rbp), %rdi
movq %r15, %rdx
callq 0x4cf30
testl %eax, %eax
je 0x4c4fe
cltq
movzbl -0xc1(%rbp,%rax), %eax
movzbl -0x121(%rbp,%r12), %ecx
decq %rcx
imulq -0x70(%rbp), %rcx
addq %rax, %rcx
movb $0x1, -0x921(%rbp,%rcx)
incq %r14
jne 0x4c4b7
incq %r13
movq -0x58(%rbp), %r14
movslq 0x30(%r14), %rax
addq $0x60, %rbx
cmpq %rax, %r13
jl 0x4c488
movq -0x78(%rbp), %r12
movl (%r12), %eax
imull -0x48(%rbp), %eax
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x80(%rbp), %rsi
jle 0x4c562
xorl %eax, %eax
cmpb $0x0, -0x920(%rbp,%rax)
je 0x4c551
movl (%rsi), %ecx
cmpl $0x3f, %ecx
jg 0x4c551
incl %ecx
movl %ecx, (%rsi)
movb %cl, -0x920(%rbp,%rax)
incq %rax
movslq (%r12), %rcx
imulq -0x70(%rbp), %rcx
cmpq %rcx, %rax
jl 0x4c535
movq 0x10(%r14), %rdi
movsd 0x18(%r14), %xmm0
cmpl $0x20, %edx
je 0x4c5d1
cmpl $0x4, %edx
jne 0x4c5d9
callq 0x5034e
movsd 0x1e52d(%rip), %xmm1    # 0x6aab0
movq %rax, %rdi
callq 0x4fe63
movq %rax, %rdi
xorl %esi, %esi
callq 0x4fc2d
movsd 0x1e333(%rip), %xmm1    # 0x6a8d0
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttsd2si %xmm2, %rbx
shll $0x1b, %ebx
callq 0x8860
mulsd 0x1eebe(%rip), %xmm0    # 0x6b478
addsd 0x1f6b6(%rip), %xmm0    # 0x6bc78
callq 0x8ad0
cvttsd2si %xmm0, %r15
addl %ebx, %r15d
jmp 0x4c5fa
callq 0x504b5
movq %rax, %rdi
xorl %esi, %esi
callq 0x4fc2d
mulsd 0x1ee90(%rip), %xmm0    # 0x6b478
addsd 0x1f688(%rip), %xmm0    # 0x6bc78
callq 0x8ad0
cvttsd2si %xmm0, %r15
leaq 0x9f0c4(%r14), %r13
movq %r13, %rdi
movl $0x18, %esi
movl $0xc, %edx
movl -0x30(%rbp), %ecx
callq 0x4e403
movl (%r14), %ecx
movq %r13, %rdi
movl $0x24, %esi
movl $0xc, %edx
callq 0x4e403
movq %r13, %rdi
movl $0x30, %esi
movl $0x1e, %edx
movl %r15d, %ecx
callq 0x4e403
movq %r13, %rdi
movl $0x4e, %esi
movl $0x1, %edx
movl -0x50(%rbp), %ecx
callq 0x4e403
movl 0x8(%r14), %ecx
movq %r13, %rdi
movl $0x4f, %esi
movl $0x3, %edx
callq 0x4e403
xorl %ebx, %ebx
movq %r13, %rdi
movl $0x52, %esi
movl $0x7, %edx
xorl %ecx, %ecx
callq 0x4e403
movq %r13, %rdi
movl $0x59, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x4e403
movq %r13, %rdi
movl $0x5b, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x4e403
movq %r13, %rdi
movl $0x5d, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4e403
movq %r13, %rdi
movl $0x5e, %esi
movl $0x3, %edx
xorl %ecx, %ecx
callq 0x4e403
leal 0x61(%rbx), %esi
xorl %ecx, %ecx
cmpb $0x0, -0x120(%rbp,%rbx)
setne %cl
movq %r13, %rdi
movl $0x1, %edx
callq 0x4e403
incq %rbx
cmpq $0x40, %rbx
jne 0x4c6d1
xorl %ebx, %ebx
movq -0x40(%rbp), %r15
leal 0xa1(%rbx), %esi
xorl %ecx, %ecx
cmpb $0x0, -0xc0(%rbp,%rbx)
setne %cl
movq %r13, %rdi
movl $0x1, %edx
callq 0x4e403
incq %rbx
cmpq $0x20, %rbx
jne 0x4c6fd
movl (%r12), %eax
imull -0x48(%rbp), %eax
testl %eax, %eax
jle 0x4c779
xorl %eax, %eax
movq %rax, %rbx
leal 0xc1(%rax), %esi
xorl %ecx, %ecx
cmpb $0x0, -0x920(%rbp,%rax)
setne %cl
movq %r13, %rdi
movl $0x1, %edx
callq 0x4e403
leaq 0x1(%rbx), %rax
cmpq $0x3e, %rbx
ja 0x4c76f
movslq (%r12), %rcx
imulq -0x70(%rbp), %rcx
cmpq %rcx, %rax
jl 0x4c734
addl $0xc1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x4c780
movl $0xc1, -0x5c(%rbp)
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x18(%rbp), %rdx
movq 0x10(%rbp), %rsi
movq %rax, (%rdx,%rcx,8)
movq %rax, (%rsi,%rcx,8)
incq %rcx
cmpq $0x40, %rcx
jne 0x4c78c
cmpl $0x0, 0x30(%r14)
jle 0x4c982
leaq 0x40(%r14), %rax
movq %rax, -0x78(%rbp)
movq $0x0, -0x88(%rbp)
xorl %ecx, %ecx
movq 0x38(%r14), %rbx
movq %rcx, -0x90(%rbp)
leaq (%rcx,%rcx,2), %r13
shlq $0x5, %r13
movzbl 0x10(%rbx,%r13), %esi
movl %r15d, %edi
callq 0x4cef6
testl %eax, %eax
je 0x4c95f
movl %eax, %r14d
addq %rbx, %r13
movzbl 0x10(%r13), %edi
movq -0x58(%rbp), %rsi
callq 0x4bbd0
movl %eax, %ecx
testl %eax, %eax
movl $0xf, %eax
cmovsl %eax, %ecx
cmpl $0x4, %r15d
movslq %r14d, %r14
movl $0x0, %eax
cmovnel %eax, %ecx
movl %ecx, -0x50(%rbp)
addq -0x88(%rbp), %rbx
movl $0x14, %r12d
movzbl 0x4(%rbx,%r12), %esi
movl %r15d, %edi
leaq -0x34(%rbp), %rdx
callq 0x4cf30
testl %eax, %eax
je 0x4c94e
movzbl -0x121(%rbp,%r14), %r15d
movzbl 0x10(%r13), %edi
movl -0x34(%rbp), %esi
decl %esi
movq -0x78(%rbp), %rdx
callq 0x530a2
movsd -0x68(%rbx,%r12,8), %xmm1
movsd %xmm1, -0x70(%rbp)
movss (%rbx,%r12,4), %xmm1
movss %xmm1, -0x30(%rbp)
cvtss2sd %xmm1, %xmm1
mulsd %xmm0, %xmm1
movsd 0x1f3f6(%rip), %xmm0    # 0x6bc78
subsd %xmm1, %xmm0
callq 0x8ad0
movsd -0x70(%rbp), %xmm3
movapd %xmm0, %xmm2
movq 0x10(%rbp), %rax
movsd -0x8(%rax,%r15,8), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4c909
jp 0x4c909
ucomisd %xmm1, %xmm3
jne 0x4c8b3
jnp 0x4c909
movsd 0x22545(%rip), %xmm0    # 0x6ee00
divsd %xmm0, %xmm3
mulsd 0x238e1(%rip), %xmm3    # 0x701a8
addsd 0x1f3a9(%rip), %xmm3    # 0x6bc78
movapd %xmm3, %xmm0
movapd %xmm2, -0x70(%rbp)
callq 0x8ad0
movapd -0x70(%rbp), %xmm2
xorpd %xmm1, %xmm1
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
mulsd 0x2250a(%rip), %xmm0    # 0x6ee00
mulsd 0x22572(%rip), %xmm0    # 0x6ee70
movq 0x10(%rbp), %rax
movsd %xmm0, -0x8(%rax,%r15,8)
movq 0x18(%rbp), %rax
movsd -0x8(%rax,%r15,8), %xmm0
ucomisd %xmm1, %xmm0
jne 0x4c93b
jp 0x4c93b
movss -0x30(%rbp), %xmm0
ucomiss 0x23960(%rip), %xmm0    # 0x70288
jne 0x4c92c
jnp 0x4c93b
cvttpd2dq %xmm2, %xmm0
cvtdq2pd %xmm0, %xmm0
movsd %xmm0, -0x8(%rax,%r15,8)
cmpq $0x0, 0x20(%rbp)
je 0x4c94e
movq 0x20(%rbp), %rax
movl -0x50(%rbp), %ecx
movb %cl, -0x1(%rax,%r15)
incq %r12
cmpq $0x17, %r12
movq -0x40(%rbp), %r15
jne 0x4c825
movq -0x90(%rbp), %rcx
incq %rcx
movq -0x58(%rbp), %r14
movslq 0x30(%r14), %rax
addq $0x60, -0x88(%rbp)
cmpq %rax, %rcx
jl 0x4c7bd
movq -0x80(%rbp), %rax
movslq (%rax), %rax
testq %rax, %rax
movq 0x38(%rbp), %rdx
movq 0x30(%rbp), %rsi
movq 0x28(%rbp), %rdi
jle 0x4c9cb
xorl %ecx, %ecx
testq %rdi, %rdi
je 0x4c9a9
movq $0x0, (%rdi,%rcx,8)
testq %rsi, %rsi
je 0x4c9b6
movq $0x0, (%rsi,%rcx,8)
testq %rdx, %rdx
je 0x4c9c3
movq $0x0, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x4c99c
cmpl $0x0, 0x30(%r14)
jle 0x4cd5c
leaq 0x40(%r14), %rax
movq %rax, -0xd8(%rbp)
leaq 0x9bdc0(%r14), %rax
movq %rax, -0xd0(%rbp)
movl $0x12, %eax
movq %rax, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
xorl %ecx, %ecx
movq 0x38(%r14), %rax
movq %rcx, -0xc8(%rbp)
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
movq %rax, %rbx
movq %rcx, -0x30(%rbp)
movzbl 0x10(%rax,%rcx), %esi
movl %r15d, %edi
callq 0x4cef6
testl %eax, %eax
je 0x4cd2d
addq %rbx, -0x30(%rbp)
cltq
movq %rax, -0x78(%rbp)
movq -0xa0(%rbp), %rax
leaq (%rbx,%rax), %r12
addq -0x98(%rbp), %rbx
movq %rbx, -0x80(%rbp)
xorl %r15d, %r15d
movzbl 0x6(%r12), %esi
movq -0x40(%rbp), %rdi
leaq -0x34(%rbp), %rdx
callq 0x4cf30
testl %eax, %eax
je 0x4cd1c
movq -0x78(%rbp), %rcx
movzbl -0x121(%rbp,%rcx), %r13d
leal -0x1(%r13), %r14d
cltq
movzbl -0xc1(%rbp,%rax), %eax
movl %r14d, %ecx
imull -0x48(%rbp), %ecx
movslq %ecx, %rcx
addq %rax, %rcx
movzbl -0x921(%rbp,%rcx), %ebx
cmpq $0x3f, %rbx
ja 0x4cd1c
movq -0x30(%rbp), %rax
movzbl 0x10(%rax), %edi
movl -0x34(%rbp), %esi
decl %esi
movq -0xd8(%rbp), %rdx
callq 0x530a2
movapd %xmm0, %xmm4
movq -0x80(%rbp), %rdx
movsd 0x38(%rdx,%r15,2), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
xorpd %xmm2, %xmm2
jne 0x4cae7
jnp 0x4caf6
movq 0x10(%rbp), %rax
subsd -0x8(%rax,%r13,8), %xmm0
movapd %xmm0, %xmm2
ucomisd %xmm4, %xmm1
jae 0x4cb29
movsd 0x20(%rdx,%r15,2), %xmm0
ucomisd 0x1ddfd(%rip), %xmm0    # 0x6a908
movq -0x30(%rbp), %r13
jne 0x4cb13
jnp 0x4cb2d
movslq %r14d, %rax
mulsd %xmm4, %xmm0
movq 0x10(%rbp), %rcx
subsd (%rcx,%rax,8), %xmm0
movapd %xmm0, %xmm1
jmp 0x4cb2d
movq -0x30(%rbp), %r13
xorpd %xmm3, %xmm3
ucomisd %xmm4, %xmm3
movsd %xmm2, -0x50(%rbp)
jae 0x4cb6c
movss 0x50(%rdx,%r15), %xmm0
ucomiss 0x2373e(%rip), %xmm0    # 0x70288
jne 0x4cb4e
jnp 0x4cb6c
xorps 0x2373b(%rip), %xmm0    # 0x70290
xorps %xmm3, %xmm3
cvtss2sd %xmm0, %xmm3
movslq %r14d, %rax
mulsd %xmm4, %xmm3
movq 0x18(%rbp), %rcx
subsd (%rcx,%rax,8), %xmm3
movsd %xmm3, -0x90(%rbp)
movb 0x3(%r12), %cl
testb $0x1, %cl
movq -0xd0(%rbp), %r14
jne 0x4cbae
movzbl 0x10(%r13), %eax
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rax
movapd %xmm1, %xmm0
subsd (%rax,%r15,2), %xmm0
andpd 0x1cd8c(%rip), %xmm0    # 0x69930
ucomisd 0x23604(%rip), %xmm0    # 0x701b0
jbe 0x4cbfa
movapd %xmm1, %xmm0
divsd %xmm4, %xmm0
addsd 0x1f0ba(%rip), %xmm0    # 0x6bc78
movsd %xmm1, -0x70(%rbp)
movsd %xmm4, -0x88(%rbp)
callq 0x8ad0
movsd -0x70(%rbp), %xmm1
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
mulsd -0x88(%rbp), %xmm0
movzbl 0x10(%r13), %eax
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rax
movsd %xmm0, (%rax,%r15,2)
movb $0x1, %cl
movzbl 0x10(%r13), %eax
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rdx
subsd (%rdx,%r15,2), %xmm1
movsd %xmm1, -0x70(%rbp)
movq (%r13), %rdi
movsd 0x8(%r13), %xmm0
movl %eax, %edx
shll $0x4, %edx
addq %r14, %rdx
testb $0x1, %cl
jne 0x4cc34
cmpq $0x0, 0x15b8(%rdx,%r15,4)
jne 0x4cc4e
movq %rdi, 0x15b8(%rdx,%r15,4)
movl %eax, %ecx
shll $0x4, %ecx
addq %r14, %rcx
movsd %xmm0, 0x15c0(%rcx,%r15,4)
movq 0x15b8(%rdx,%r15,4), %rsi
shll $0x4, %eax
addq %r14, %rax
movsd 0x15c0(%rax,%r15,4), %xmm1
callq 0x4fe97
movq 0x28(%rbp), %rax
testq %rax, %rax
movsd -0x50(%rbp), %xmm1
je 0x4cc8b
ucomisd 0x1dc87(%rip), %xmm1    # 0x6a908
jne 0x4cc85
jnp 0x4cc8b
movsd %xmm1, -0x8(%rax,%rbx,8)
movq 0x30(%rbp), %rsi
testq %rsi, %rsi
movq 0x48(%rbp), %rcx
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rdx
movsd -0x70(%rbp), %xmm1
movsd -0x90(%rbp), %xmm2
je 0x4ccbf
ucomisd 0x1dc53(%rip), %xmm1    # 0x6a908
jne 0x4ccb9
jnp 0x4ccbf
movsd %xmm1, -0x8(%rsi,%rbx,8)
testq %rdx, %rdx
je 0x4ccd6
ucomisd 0x1dc3c(%rip), %xmm2    # 0x6a908
jne 0x4ccd0
jnp 0x4ccd6
movsd %xmm2, -0x8(%rdx,%rbx,8)
testq %rax, %rax
je 0x4cce1
movsd %xmm0, -0x8(%rax,%rbx,8)
testq %rcx, %rcx
je 0x4ccf3
movb 0x3(%r12), %al
shrb %al
andb $0x1, %al
movb %al, -0x1(%rcx,%rbx)
cmpq $0x0, 0x50(%rbp)
je 0x4cd1c
movzbl (%r12), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x1dd02(%rip), %xmm0    # 0x6aa10
cvtsd2ss %xmm0, %xmm0
movq 0x50(%rbp), %rax
movss %xmm0, -0x4(%rax,%rbx,4)
addq $0x4, %r15
incq %r12
cmpq $0xc, %r15
jne 0x4ca5a
movq -0xc8(%rbp), %rcx
incq %rcx
movq -0x58(%rbp), %r14
movslq 0x30(%r14), %rax
addq $0x60, -0xa0(%rbp)
addq $0x60, -0x98(%rbp)
cmpq %rax, %rcx
movq -0x40(%rbp), %r15
jl 0x4ca08
movl -0x5c(%rbp), %eax
addq $0x8f8, %rsp            # imm = 0x8F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq