// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::save_msm_obs(bamboo::rtcm_t*, int, bamboo::msm_h_t*, double const*, double const*, double const*, double const*, double const*, double const*, int const*, int const*, int const*)
static void save_msm_obs(rtcm_t *rtcm, int sys, msm_h_t *h, const double *r,
                         const double *pr, const double *cp, const double *rr,
                         const double *rrf, const double *cnr, const int *lock,
                         const int *ex, const int *half)
{
    const char *sig[32];
    double tt,wl;
    unsigned char code[32];
    char *msm_type="",*q=NULL;
    int i,j,k,type,prn,sat,fn,index=0,freq[32],ind[32];
    
    type=getbitu(rtcm->buff,24,12);
    
    switch (sys) {
        case SYS_GPS: msm_type=q=rtcm->msmtype[0]; break;
        case SYS_GLO: msm_type=q=rtcm->msmtype[1]; break;
        case SYS_GAL: msm_type=q=rtcm->msmtype[2]; break;
        case SYS_QZS: msm_type=q=rtcm->msmtype[3]; break;
        case SYS_SBS: msm_type=q=rtcm->msmtype[4]; break;
        case SYS_CMP: msm_type=q=rtcm->msmtype[5]; break;
    }
    /* id to signal */
    for (i=0;i<h->nsig;i++) {
        switch (sys) {
            case SYS_GPS: sig[i]=msm_sig_gps[h->sigs[i]-1]; break;
            case SYS_GLO: sig[i]=msm_sig_glo[h->sigs[i]-1]; break;
            case SYS_GAL: sig[i]=msm_sig_gal[h->sigs[i]-1]; break;
            case SYS_QZS: sig[i]=msm_sig_qzs[h->sigs[i]-1]; break;
            case SYS_SBS: sig[i]=msm_sig_sbs[h->sigs[i]-1]; break;
            case SYS_CMP: sig[i]=msm_sig_cmp[h->sigs[i]-1]; break;
            default: sig[i]=""; break;
        }
        /* signal to rinex obs type */
        code[i]=obs2code(sig[i],freq+i);
        
        /* freqency index for beidou and galileo */
        if (sys==SYS_CMP) {
            if      (freq[i]==5) freq[i]=2; /* B2 */
            else if (freq[i]==4) freq[i]=3; /* B3 */
        }
        else if (sys==SYS_GAL) {
            if (freq[i]==5) freq[i]=2; /* E5b */
        }
        if (code[i]!=CODE_NONE) {
            if (q) q+=sprintf(q,"L%s%s",sig[i],i<h->nsig-1?",":"");
        }
        else {
            if (q) q+=sprintf(q,"(%d)%s",h->sigs[i],i<h->nsig-1?",":"");
            
            trace(2,"rtcm3 %d: unknown signal id=%2d\n",type,h->sigs[i]);
        }
    }
    trace(3,"rtcm3 %d: signals=%s\n",type,msm_type);
    
    /* get signal index */
    sigindex(sys,code,freq,h->nsig,rtcm->opt,ind);
    
    for (i=j=0;i<h->nsat;i++) {
        
        prn=h->sats[i];
        if      (sys==SYS_QZS) prn+=MINPRNQZS-1;
        else if (sys==SYS_SBS) prn+=MINPRNSBS-1;
        
        if ((sat=satno(sys,prn))) {
            tt=timediff(rtcm->obs.data[0].time,rtcm->time);
            if (rtcm->obsflag||fabs(tt)>1E-9) {
                rtcm->obs.n=rtcm->obsflag=0;
            }
            index=obsindex(&rtcm->obs,rtcm->time,sat);
        }
        else {
            trace(2,"rtcm3 %d satellite error: prn=%d\n",type,prn);
        }
        for (k=0;k<h->nsig;k++) {
            if (!h->cellmask[k+i*h->nsig]) continue;
            
            if (sat&&index>=0&&ind[k]>=0) {
                
                /* satellite carrier wave length */
                wl=satwavelen(sat,freq[k]-1,&rtcm->nav);
                
                /* glonass wave length by extended info */
                if (sys==SYS_GLO&&ex&&ex[i]<=13) {
                    fn=ex[i]-7;
                    wl=CLIGHT/((freq[k]==2?FREQ2_GLO:FREQ1_GLO)+
                               (freq[k]==2?DFRQ2_GLO:DFRQ1_GLO)*fn);
                }
                /* pseudorange (m) */
                if (r[i]!=0.0&&pr[j]>-1E12) {
                    rtcm->obs.data[index].P[ind[k]]=r[i]+pr[j];
                }
                /* carrier-phase (cycle) */
                if (r[i]!=0.0&&cp[j]>-1E12&&wl>0.0) {
                    rtcm->obs.data[index].L[ind[k]]=(r[i]+cp[j])/wl;
                }
                /* doppler (hz) */
                if (rr&&rrf&&rrf[j]>-1E12&&wl>0.0) {
                    rtcm->obs.data[index].D[ind[k]]=(float)(-(rr[i]+rrf[j])/wl);
                }
                rtcm->obs.data[index].LLI[ind[k]]=
                    lossoflock(rtcm,sat,ind[k],lock[j])+(half[j]?3:0);
                rtcm->obs.data[index].SNR [ind[k]]=(unsigned char)(cnr[j]*4.0);
                rtcm->obs.data[index].code[ind[k]]=code[k];
            }
            j++;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x412d6(%rip), %rax     # 0xbcd07
movq %rax, -0x168(%rbp)
movq $0x0, -0x170(%rbp)
movl $0x0, -0x190(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl $0x18, %esi
movl $0xc, %edx
callq 0x8bfc0
movl %eax, -0x180(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x2c8(%rbp)
subl $0x1f, %eax
ja 0x7bb56
movq -0x2c8(%rbp), %rax
leaq 0x4537e(%rip), %rcx     # 0xc0e10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
addq $0x9bad0, %rax          # imm = 0x9BAD0
movq %rax, -0x170(%rbp)
movq %rax, -0x168(%rbp)
jmp 0x7bb56
movq -0x8(%rbp), %rax
addq $0x9bad0, %rax          # imm = 0x9BAD0
addq $0x80, %rax
movq %rax, -0x170(%rbp)
movq %rax, -0x168(%rbp)
jmp 0x7bb56
movq -0x8(%rbp), %rax
addq $0x9bad0, %rax          # imm = 0x9BAD0
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x170(%rbp)
movq %rax, -0x168(%rbp)
jmp 0x7bb56
movq -0x8(%rbp), %rax
addq $0x9bad0, %rax          # imm = 0x9BAD0
addq $0x180, %rax            # imm = 0x180
movq %rax, -0x170(%rbp)
movq %rax, -0x168(%rbp)
jmp 0x7bb56
movq -0x8(%rbp), %rax
addq $0x9bad0, %rax          # imm = 0x9BAD0
addq $0x200, %rax            # imm = 0x200
movq %rax, -0x170(%rbp)
movq %rax, -0x168(%rbp)
jmp 0x7bb56
movq -0x8(%rbp), %rax
addq $0x9bad0, %rax          # imm = 0x9BAD0
addq $0x280, %rax            # imm = 0x280
movq %rax, -0x170(%rbp)
movq %rax, -0x168(%rbp)
movl $0x0, -0x174(%rbp)
movl -0x174(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl 0x7(%rcx), %ecx
cmpl %ecx, %eax
jge 0x7bed8
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x2d0(%rbp)
subl $0x1f, %eax
ja 0x7bcd9
movq -0x2d0(%rbp), %rax
leaq 0x452f5(%rip), %rcx     # 0xc0e90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x48(%rax,%rcx), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x7c3df(%rip), %rax     # 0xf7fa0
movq (%rax,%rcx,8), %rcx
movslq -0x174(%rbp), %rax
movq %rcx, -0x130(%rbp,%rax,8)
jmp 0x7bcef
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x48(%rax,%rcx), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x7c4aa(%rip), %rax     # 0xf80a0
movq (%rax,%rcx,8), %rcx
movslq -0x174(%rbp), %rax
movq %rcx, -0x130(%rbp,%rax,8)
jmp 0x7bcef
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x48(%rax,%rcx), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x7c575(%rip), %rax     # 0xf81a0
movq (%rax,%rcx,8), %rcx
movslq -0x174(%rbp), %rax
movq %rcx, -0x130(%rbp,%rax,8)
jmp 0x7bcef
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x48(%rax,%rcx), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x7c640(%rip), %rax     # 0xf82a0
movq (%rax,%rcx,8), %rcx
movslq -0x174(%rbp), %rax
movq %rcx, -0x130(%rbp,%rax,8)
jmp 0x7bcef
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x48(%rax,%rcx), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x7c70e(%rip), %rax     # 0xf83a0
movq (%rax,%rcx,8), %rcx
movslq -0x174(%rbp), %rax
movq %rcx, -0x130(%rbp,%rax,8)
jmp 0x7bcef
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x48(%rax,%rcx), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x7c7dc(%rip), %rax     # 0xf84a0
movq (%rax,%rcx,8), %rcx
movslq -0x174(%rbp), %rax
movq %rcx, -0x130(%rbp,%rax,8)
jmp 0x7bcef
movslq -0x174(%rbp), %rax
leaq 0x41020(%rip), %rcx     # 0xbcd07
movq %rcx, -0x130(%rbp,%rax,8)
movslq -0x174(%rbp), %rax
movq -0x130(%rbp,%rax,8), %rdi
leaq -0x210(%rbp), %rsi
movslq -0x174(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x8baf0
movb %al, %cl
movslq -0x174(%rbp), %rax
movb %cl, -0x160(%rbp,%rax)
cmpl $0x20, -0xc(%rbp)
jne 0x7bd7a
movslq -0x174(%rbp), %rax
cmpl $0x5, -0x210(%rbp,%rax,4)
jne 0x7bd53
movslq -0x174(%rbp), %rax
movl $0x2, -0x210(%rbp,%rax,4)
jmp 0x7bd78
movslq -0x174(%rbp), %rax
cmpl $0x4, -0x210(%rbp,%rax,4)
jne 0x7bd76
movslq -0x174(%rbp), %rax
movl $0x3, -0x210(%rbp,%rax,4)
jmp 0x7bd78
jmp 0x7bda7
cmpl $0x8, -0xc(%rbp)
jne 0x7bda5
movslq -0x174(%rbp), %rax
cmpl $0x5, -0x210(%rbp,%rax,4)
jne 0x7bda3
movslq -0x174(%rbp), %rax
movl $0x2, -0x210(%rbp,%rax,4)
jmp 0x7bda5
jmp 0x7bda7
movslq -0x174(%rbp), %rax
movzbl -0x160(%rbp,%rax), %eax
cmpl $0x0, %eax
je 0x7be2c
cmpq $0x0, -0x170(%rbp)
je 0x7be27
movq -0x170(%rbp), %rdi
movslq -0x174(%rbp), %rax
movq -0x130(%rbp,%rax,8), %rdx
movl -0x174(%rbp), %esi
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %r8d
subl $0x1, %r8d
leaq 0x40f12(%rip), %rcx     # 0xbcd07
leaq 0x50299(%rip), %rax     # 0xcc095
cmpl %r8d, %esi
cmovlq %rax, %rcx
leaq 0x45e8e(%rip), %rsi     # 0xc1c98
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x170(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x170(%rbp)
jmp 0x7bec2
cmpq $0x0, -0x170(%rbp)
je 0x7be99
movq -0x170(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x48(%rax,%rcx), %edx
movl -0x174(%rbp), %esi
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %r8d
subl $0x1, %r8d
leaq 0x40ea0(%rip), %rcx     # 0xbcd07
leaq 0x50227(%rip), %rax     # 0xcc095
cmpl %r8d, %esi
cmovlq %rax, %rcx
leaq 0x45e22(%rip), %rsi     # 0xc1c9e
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x170(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x170(%rbp)
movl -0x180(%rbp), %edx
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x48(%rax,%rcx), %ecx
movl $0x2, %edi
leaq 0x45dea(%rip), %rsi     # 0xc1ca5
movb $0x0, %al
callq 0x8b980
jmp 0x7bec4
movl -0x174(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x174(%rbp)
jmp 0x7bb60
movl -0x180(%rbp), %edx
movq -0x168(%rbp), %rcx
movl $0x3, %edi
leaq 0x45dd5(%rip), %rsi     # 0xc1cc6
movb $0x0, %al
callq 0x8b980
movl -0xc(%rbp), %edi
leaq -0x160(%rbp), %rsi
leaq -0x210(%rbp), %rdx
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %ecx
movq -0x8(%rbp), %r8
addq $0x9fd48, %r8           # imm = 0x9FD48
leaq -0x290(%rbp), %r9
callq 0x7c590
movl $0x0, -0x178(%rbp)
movl $0x0, -0x174(%rbp)
movl -0x174(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
cmpl %ecx, %eax
jge 0x7c57e
movq -0x18(%rbp), %rax
movslq -0x174(%rbp), %rcx
movzbl 0x8(%rax,%rcx), %eax
movl %eax, -0x184(%rbp)
cmpl $0x10, -0xc(%rbp)
jne 0x7bf7f
movl -0x184(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x184(%rbp)
jmp 0x7bf96
cmpl $0x2, -0xc(%rbp)
jne 0x7bf94
movl -0x184(%rbp), %eax
addl $0x77, %eax
movl %eax, -0x184(%rbp)
jmp 0x7bf96
movl -0xc(%rbp), %edi
movl -0x184(%rbp), %esi
callq 0x8b1b0
movl %eax, -0x188(%rbp)
cmpl $0x0, %eax
je 0x7c0a0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq (%rax), %rcx
movq %rcx, -0x2a0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x298(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x2b0(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x2a8(%rbp)
movq -0x2a0(%rbp), %rdi
movsd -0x298(%rbp), %xmm0
movq -0x2b0(%rbp), %rsi
movsd -0x2a8(%rbp), %xmm1
callq 0x8e8e0
movsd %xmm0, -0x138(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x9bdd0(%rax)
jne 0x7c043
movsd -0x138(%rbp), %xmm0
movaps 0x411ef(%rip), %xmm1    # 0xbd220
pand %xmm1, %xmm0
movsd 0x41d63(%rip), %xmm1    # 0xbdda0
ucomisd %xmm1, %xmm0
jbe 0x7c05c
movq -0x8(%rbp), %rax
movl $0x0, 0x9bdd0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x2c0(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x2b8(%rbp)
movl -0x188(%rbp), %edx
movq -0x2c0(%rbp), %rsi
movsd -0x2b8(%rbp), %xmm0
callq 0x7a130
movl %eax, -0x190(%rbp)
jmp 0x7c0bf
movl -0x180(%rbp), %edx
movl -0x184(%rbp), %ecx
movl $0x2, %edi
leaq 0x45c24(%rip), %rsi     # 0xc1cdc
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x17c(%rbp)
movl -0x17c(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl 0x7(%rcx), %ecx
cmpl %ecx, %eax
jge 0x7c568
movq -0x18(%rbp), %rax
movl -0x17c(%rbp), %ecx
movl -0x174(%rbp), %edx
movq -0x18(%rbp), %rsi
movzbl 0x7(%rsi), %esi
imull %esi, %edx
addl %edx, %ecx
movslq %ecx, %rcx
cmpb $0x0, 0x68(%rax,%rcx)
jne 0x7c10b
jmp 0x7c554
cmpl $0x0, -0x188(%rbp)
je 0x7c545
cmpl $0x0, -0x190(%rbp)
jl 0x7c545
movslq -0x17c(%rbp), %rax
cmpl $0x0, -0x290(%rbp,%rax,4)
jl 0x7c545
movl -0x188(%rbp), %edi
movslq -0x17c(%rbp), %rax
movl -0x210(%rbp,%rax,4), %esi
subl $0x1, %esi
movq -0x8(%rbp), %rdx
addq $0x40, %rdx
callq 0x938e0
movsd %xmm0, -0x140(%rbp)
cmpl $0x4, -0xc(%rbp)
jne 0x7c271
cmpq $0x0, 0x30(%rbp)
je 0x7c271
movq 0x30(%rbp), %rax
movslq -0x174(%rbp), %rcx
cmpl $0xd, (%rax,%rcx,4)
jg 0x7c271
movq 0x30(%rbp), %rax
movslq -0x174(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x7, %eax
movl %eax, -0x18c(%rbp)
movslq -0x17c(%rbp), %rax
movl -0x210(%rbp,%rax,4), %eax
movsd 0x40d13(%rip), %xmm0    # 0xbced0
movsd 0x40d1b(%rip), %xmm1    # 0xbcee0
movsd %xmm1, -0x2e0(%rbp)
cmpl $0x2, %eax
movsd %xmm0, -0x2d8(%rbp)
je 0x7c1ea
movsd -0x2e0(%rbp), %xmm0
movsd %xmm0, -0x2d8(%rbp)
movsd -0x2d8(%rbp), %xmm0
movsd %xmm0, -0x2f8(%rbp)
movslq -0x17c(%rbp), %rax
movl -0x210(%rbp,%rax,4), %eax
movsd 0x40cb8(%rip), %xmm0    # 0xbcec8
movsd 0x40cc0(%rip), %xmm1    # 0xbced8
movsd %xmm1, -0x2f0(%rbp)
cmpl $0x2, %eax
movsd %xmm0, -0x2e8(%rbp)
je 0x7c23d
movsd -0x2f0(%rbp), %xmm0
movsd %xmm0, -0x2e8(%rbp)
movsd -0x2f8(%rbp), %xmm0
movsd -0x2e8(%rbp), %xmm1
cvtsi2sdl -0x18c(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x41b43(%rip), %xmm0    # 0xbdda8
divsd %xmm1, %xmm0
movsd %xmm0, -0x140(%rbp)
movq -0x20(%rbp), %rax
movslq -0x174(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7c28e
jp 0x7c28e
jmp 0x7c2f7
movq -0x28(%rbp), %rax
movslq -0x178(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x447ca(%rip), %xmm1    # 0xc0a70
ucomisd %xmm1, %xmm0
jbe 0x7c2f7
movq -0x20(%rbp), %rax
movslq -0x174(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x28(%rbp), %rax
movslq -0x178(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x190(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x17c(%rbp), %rcx
movslq -0x290(%rbp,%rcx,4), %rcx
movsd %xmm0, 0x38(%rax,%rcx,8)
movq -0x20(%rbp), %rax
movslq -0x174(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7c317
jp 0x7c317
jmp 0x7c399
movq -0x30(%rbp), %rax
movslq -0x178(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x44741(%rip), %xmm1    # 0xc0a70
ucomisd %xmm1, %xmm0
jbe 0x7c399
movsd -0x140(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7c399
movq -0x20(%rbp), %rax
movslq -0x174(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x30(%rbp), %rax
movslq -0x178(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
divsd -0x140(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x190(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x17c(%rbp), %rcx
movslq -0x290(%rbp,%rcx,4), %rcx
movsd %xmm0, 0x20(%rax,%rcx,8)
cmpq $0x0, 0x10(%rbp)
je 0x7c44c
cmpq $0x0, 0x18(%rbp)
je 0x7c44c
movq 0x18(%rbp), %rax
movslq -0x178(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x446a9(%rip), %xmm1    # 0xc0a70
ucomisd %xmm1, %xmm0
jbe 0x7c44c
movsd -0x140(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7c44c
movq 0x10(%rbp), %rax
movslq -0x174(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x18(%rbp), %rax
movslq -0x178(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd -0x140(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x190(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x17c(%rbp), %rcx
movslq -0x290(%rbp,%rcx,4), %rcx
movss %xmm0, 0x50(%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movl -0x188(%rbp), %esi
movslq -0x17c(%rbp), %rax
movl -0x290(%rbp,%rax,4), %edx
movq 0x28(%rbp), %rax
movslq -0x178(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
callq 0x7a3f0
movq 0x38(%rbp), %rcx
movslq -0x178(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
testl %ecx, %ecx
setne %cl
movzbl %cl, %edx
movl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
addl %ecx, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
movslq -0x190(%rbp), %rax
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq %rax, %rcx
movslq -0x17c(%rbp), %rax
movslq -0x290(%rbp,%rax,4), %rax
movb %dl, 0x15(%rax,%rcx)
movq 0x20(%rbp), %rax
movslq -0x178(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x40915(%rip), %xmm1    # 0xbcdf0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x190(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x17c(%rbp), %rcx
movslq -0x290(%rbp,%rcx,4), %rcx
movb %dl, 0x12(%rax,%rcx)
movslq -0x17c(%rbp), %rax
movb -0x160(%rbp,%rax), %dl
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x190(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x17c(%rbp), %rcx
movslq -0x290(%rbp,%rcx,4), %rcx
movb %dl, 0x18(%rax,%rcx)
movl -0x178(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x178(%rbp)
movl -0x17c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17c(%rbp)
jmp 0x7c0c9
jmp 0x7c56a
movl -0x174(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x174(%rbp)
jmp 0x7bf3c
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
nopw (%rax,%rax)