LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_psrng_ex(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_psrng_ex(rtcm_t *rtcm, int i, const double *psrng,
                               int ncell)
{
    int j,psrng_val;
    
    for (j=0;j<ncell;j++) {
        if (psrng[j]==0.0) {
            psrng_val=-524288;
        }
        else if (fabs(psrng[j])>292.7) {
            trace(2,"msm fine pseudorange ext overflow %s psrng=%.3f\n",
                 time_str(rtcm->time,0),psrng[j]);
            psrng_val=-524288;
        }
        else {
            psrng_val=ROUND(psrng[j]/RANGE_MS/P2_29);
        }
        setbits(rtcm->buff,i,20,psrng_val); i+=20;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, -0x30(%rbp)
leaq 0x9f0c4(%rdi), %rax
movq %rax, -0x38(%rbp)
xorl %r13d, %r13d
testl %ecx, %ecx
cmovlel %r13d, %ebx
cmpq %r13, %rbx
je 0x44eb0
movsd (%r15,%r13,8), %xmm0
movl $0xfff80000, %r12d      # imm = 0xFFF80000
ucomisd 0x1bad2(%rip), %xmm0    # 0x608f8
jne 0x44e2a
jnp 0x44e92
movapd %xmm0, %xmm1
andpd 0x1aafa(%rip), %xmm1    # 0x5f930
ucomisd 0x20e1a(%rip), %xmm1    # 0x65c58
jbe 0x44e70
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movsd 0x18(%rax), %xmm0
xorl %esi, %esi
callq 0x47b0e
movsd (%r15,%r13,8), %xmm0
pushq $0x2
popq %rdi
leaq 0x218f6(%rip), %rsi     # 0x6675a
movq %rax, %rdx
movb $0x1, %al
callq 0x455bc
jmp 0x44e92
divsd 0x1f880(%rip), %xmm0    # 0x646f8
mulsd 0x20d68(%rip), %xmm0    # 0x65be8
addsd 0x1cdf0(%rip), %xmm0    # 0x61c78
callq 0x8ac0
cvttsd2si %xmm0, %r12d
movq -0x38(%rbp), %rdi
movl %r14d, %esi
pushq $0x14
popq %rdx
movl %r12d, %ecx
callq 0x45ae0
addl $0x14, %r14d
incq %r13
jmp 0x44e09
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_phrng_ex(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_phrng_ex(rtcm_t *rtcm, int i, const double *phrng,
                               int ncell)
{
    int j,phrng_val;
    
    for (j=0;j<ncell;j++) {
        if (phrng[j]==0.0) {
            phrng_val=-8388608;
        }
        else if (fabs(phrng[j])>1171.0) {
            trace(2,"msm fine phase-range ext overflow %s phrng=%.3f\n",
                 time_str(rtcm->time,0),phrng[j]);
            phrng_val=-8388608;
        }
        else {
            phrng_val=ROUND(phrng[j]/RANGE_MS/P2_31);
        }
        setbits(rtcm->buff,i,24,phrng_val); i+=24;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, -0x30(%rbp)
leaq 0x9f0c4(%rdi), %rax
movq %rax, -0x38(%rbp)
xorl %r13d, %r13d
testl %ecx, %ecx
cmovlel %r13d, %ebx
cmpq %r13, %rbx
je 0x44f9a
movsd (%r15,%r13,8), %xmm0
movl $0xff800000, %r12d      # imm = 0xFF800000
ucomisd 0x1b9e8(%rip), %xmm0    # 0x608f8
jne 0x44f14
jnp 0x44f7c
movapd %xmm0, %xmm1
andpd 0x1aa10(%rip), %xmm1    # 0x5f930
ucomisd 0x20d18(%rip), %xmm1    # 0x65c40
jbe 0x44f5a
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movsd 0x18(%rax), %xmm0
xorl %esi, %esi
callq 0x47b0e
movsd (%r15,%r13,8), %xmm0
pushq $0x2
popq %rdi
leaq 0x2183d(%rip), %rsi     # 0x6678b
movq %rax, %rdx
movb $0x1, %al
callq 0x455bc
jmp 0x44f7c
divsd 0x1f796(%rip), %xmm0    # 0x646f8
mulsd 0x1bb26(%rip), %xmm0    # 0x60a90
addsd 0x1cd06(%rip), %xmm0    # 0x61c78
callq 0x8ac0
cvttsd2si %xmm0, %r12d
movq -0x38(%rbp), %rdi
movl %r14d, %esi
pushq $0x18
popq %rdx
movl %r12d, %ecx
callq 0x45ae0
addl $0x18, %r14d
incq %r13
jmp 0x44ef3
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_cnr_ex(bamboo::rtcm_t*, int, float const*, int)
static int encode_msm_cnr_ex(rtcm_t *rtcm, int i, const float *cnr, int ncell)
{
    int j,cnr_val;
    
    for (j=0;j<ncell;j++) {
        cnr_val=ROUND(cnr[j]/0.0625);
        setbitu(rtcm->buff,i,10,cnr_val); i+=10;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r15
addq $0x9f0c4, %r15          # imm = 0x9F0C4
xorl %r13d, %r13d
testl %ecx, %ecx
cmovlel %r13d, %ebx
movl %esi, %r12d
cmpq %r13, %rbx
je 0x452db
cvtss2sd (%r14,%r13,4), %xmm0
mulsd 0x1dac5(%rip), %xmm0    # 0x62d78
addsd 0x1c9bd(%rip), %xmm0    # 0x61c78
callq 0x8ac0
cvttsd2si %xmm0, %ecx
movq %r15, %rdi
movl %r12d, %esi
pushq $0xa
popq %rdx
callq 0x45a69
addl $0xa, %r12d
incq %r13
jmp 0x452a0
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satno(int, int)
extern int satno(int sys, int prn)
{
    if (prn<=0) return 0;
    switch (sys) {
        case SYS_GPS:
            if (prn<MINPRNGPS||MAXPRNGPS<prn) return 0;
            return prn-MINPRNGPS+1;
        case SYS_GLO:
            if (prn<MINPRNGLO||MAXPRNGLO<prn) return 0;
            return NSATGPS+prn-MINPRNGLO+1;
        case SYS_GAL:
            if (prn<MINPRNGAL||MAXPRNGAL<prn) return 0;
            return NSATGPS+NSATGLO+prn-MINPRNGAL+1;
        case SYS_QZS:
            if (prn<MINPRNQZS||MAXPRNQZS<prn) return 0;
            return NSATGPS+NSATGLO+NSATGAL+prn-MINPRNQZS+1;
        case SYS_CMP:
            if (prn<MINPRNCMP||MAXPRNCMP<prn) return 0;
            return NSATGPS+NSATGLO+NSATGAL+NSATQZS+prn-MINPRNCMP+1;
        case SYS_IRN:
            if (prn<MINPRNIRN||MAXPRNIRN<prn) return 0;
            return NSATGPS+NSATGLO+NSATGAL+NSATQZS+NSATCMP+prn-MINPRNIRN+1;
        case SYS_LEO:
            if (prn<MINPRNLEO||MAXPRNLEO<prn) return 0;
            return NSATGPS+NSATGLO+NSATGAL+NSATQZS+NSATCMP+NSATIRN+
                   prn-MINPRNLEO+1;
        case SYS_SBS:
            if (prn<MINPRNSBS||MAXPRNSBS<prn) return 0;
            return NSATGPS+NSATGLO+NSATGAL+NSATQZS+NSATCMP+NSATIRN+NSATLEO+
                   prn-MINPRNSBS+1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testl %esi, %esi
jle 0x45360
leal -0x1(%rdi), %ecx
cmpl $0x7, %ecx
ja 0x45329
leaq 0x214ea(%rip), %rdx     # 0x66800
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
xorl %eax, %eax
cmpl $0x21, %esi
cmovbl %esi, %eax
jmp 0x45360
cmpl $0x20, %edi
jne 0x45360
leal 0x5f(%rsi), %ecx
xorl %eax, %eax
cmpl $0x26, %esi
jmp 0x4534a
leal 0x20(%rsi), %ecx
xorl %eax, %eax
cmpl $0x1c, %esi
jmp 0x4534a
leal 0x3b(%rsi), %ecx
xorl %eax, %eax
cmpl $0x25, %esi
cmovbl %ecx, %eax
jmp 0x45360
leal -0x8f(%rsi), %ecx
addl $0xd, %esi
xorl %eax, %eax
cmpl $-0x17, %ecx
cmovael %esi, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satsys(int, int*)
extern int satsys(int sat, int *prn)
{
    int sys=SYS_NONE;
    if (sat<=0||MAXRTKSAT<sat) sat=0;
    else if (sat<=NSATGPS) {
        sys=SYS_GPS; sat+=MINPRNGPS-1;
    }
    else if ((sat-=NSATGPS)<=NSATGLO) {
        sys=SYS_GLO; sat+=MINPRNGLO-1;
    }
    else if ((sat-=NSATGLO)<=NSATGAL) {
        sys=SYS_GAL; sat+=MINPRNGAL-1;
    }
    else if ((sat-=NSATGAL)<=NSATQZS) {
        sys=SYS_QZS; sat+=MINPRNQZS-1; 
    }
    else if ((sat-=NSATQZS)<=NSATCMP) {
        sys=SYS_CMP; sat+=MINPRNCMP-1; 
    }
    else if ((sat-=NSATCMP)<=NSATIRN) {
        sys=SYS_IRN; sat+=MINPRNIRN-1; 
    }
    else if ((sat-=NSATIRN)<=NSATLEO) {
        sys=SYS_LEO; sat+=MINPRNLEO-1; 
    }
    else if ((sat-=NSATLEO)<=NSATSBS) {
        sys=SYS_SBS; sat+=MINPRNSBS-1; 
    }
    else sat=0;
    if (prn) *prn=sat;
    return sys;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal -0x9c(%rdi), %edx
xorl %ecx, %ecx
movl $0x0, %eax
cmpl $0xffffff65, %edx       # imm = 0xFFFFFF65
jb 0x453a5
cmpl $0x21, %edi
jae 0x45387
movl $0x1, %eax
jmp 0x453a3
cmpl $0x3b, %edi
ja 0x45396
addl $-0x20, %edi
movl $0x4, %eax
jmp 0x453a3
cmpl $0x5f, %edi
ja 0x453ae
addl $-0x3b, %edi
movl $0x8, %eax
movl %edi, %ecx
testq %rsi, %rsi
je 0x453ac
movl %ecx, (%rsi)
popq %rbp
retq
leal -0xd(%rdi), %eax
leal -0x5f(%rdi), %ecx
cmpl $0x85, %edi
cmovael %eax, %ecx
movl $0x20, %edx
movl $0x2, %eax
cmovbl %edx, %eax
jmp 0x453a5
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satid2no(char const*)
extern int satid2no(const char *id)
{
    int sys,prn;
    char code;
    
    if (sscanf(id,"%d",&prn)==1) {
        if      (MINPRNGPS<=prn&&prn<=MAXPRNGPS) sys=SYS_GPS;
        else if (MINPRNSBS<=prn&&prn<=MAXPRNSBS) sys=SYS_SBS;
        else if (MINPRNQZS<=prn&&prn<=MAXPRNQZS) sys=SYS_QZS;
        else return 0;
        return satno(sys,prn);
    }
    if (sscanf(id,"%c%d",&code,&prn)<2) return 0;
    
    switch (code) {
        case 'G': sys=SYS_GPS; prn+=MINPRNGPS-1; break;
        case 'R': sys=SYS_GLO; prn+=MINPRNGLO-1; break;
        case 'E': sys=SYS_GAL; prn+=MINPRNGAL-1; break;
        case 'J': sys=SYS_QZS; prn+=MINPRNQZS-1; break;
        case 'C': sys=SYS_CMP; prn+=MINPRNCMP-1; break;
        case 'I': sys=SYS_IRN; prn+=MINPRNIRN-1; break;
        case 'L': sys=SYS_LEO; prn+=MINPRNLEO-1; break;
        case 'S': sys=SYS_SBS; prn+=100; break;
        default: return 0;
    }
    return satno(sys,prn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x26d8a(%rip), %rsi     # 0x6c16b
xorl %ebx, %ebx
leaq -0x14(%rbp), %rdx
xorl %eax, %eax
callq 0x8600
cmpl $0x1, %eax
jne 0x45402
movl -0x14(%rbp), %esi
leal -0x1(%rsi), %eax
cmpl $0x20, %eax
jae 0x45440
pushq $0x1
jmp 0x45452
leaq 0x25be8(%rip), %rsi     # 0x6aff1
leaq -0x15(%rbp), %rdx
leaq -0x14(%rbp), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x8600
cmpl $0x2, %eax
jl 0x4548a
movzbl -0x15(%rbp), %eax
addl $-0x43, %eax
cmpl $0x10, %eax
ja 0x4548a
leaq 0x213ed(%rip), %rcx     # 0x66820
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x20
jmp 0x4547f
leal -0x78(%rsi), %eax
cmpl $0x17, %eax
jae 0x4544c
pushq $0x2
jmp 0x45452
testl %esi, %esi
jne 0x4548a
pushq $0x10
popq %rdi
jmp 0x45483
decl -0x14(%rbp)
movl $0x80, %edi
jmp 0x45480
pushq $0x8
jmp 0x4547f
pushq $0x4
jmp 0x4547f
addl $0x64, -0x14(%rbp)
pushq $0x2
jmp 0x4547f
pushq $0x1
jmp 0x4547f
decl -0x14(%rbp)
pushq $0x40
jmp 0x4547f
decl -0x14(%rbp)
pushq $0x10
popq %rdi
movl -0x14(%rbp), %esi
callq 0x452fd
movl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satno2id(int, char*)
extern void satno2id(int sat, char *id)
{
    int prn;
    switch (satsys(sat,&prn)) {
        case SYS_GPS: sprintf(id,"G%02d",prn-MINPRNGPS+1); return;
        case SYS_GLO: sprintf(id,"R%02d",prn-MINPRNGLO+1); return;
        case SYS_GAL: sprintf(id,"E%02d",prn-MINPRNGAL+1); return;
        case SYS_QZS: sprintf(id,"J%02d",prn-MINPRNQZS+1); return;
        case SYS_CMP: sprintf(id,"C%02d",prn-MINPRNCMP+1); return;
        case SYS_IRN: sprintf(id,"I%02d",prn-MINPRNIRN+1); return;
        case SYS_LEO: sprintf(id,"L%02d",prn-MINPRNLEO+1); return;
        case SYS_SBS: sprintf(id,"%03d" ,prn); return;
    }
    strcpy(id,"");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq -0xc(%rbp), %rsi
callq 0x45362
leal -0x1(%rax), %ecx
cmpl $0x7, %ecx
ja 0x454cb
leaq 0x213ae(%rip), %rax     # 0x66864
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl -0xc(%rbp), %edx
leaq 0x25b2d(%rip), %rsi     # 0x6aff6
jmp 0x45516
cmpl $0x10, %eax
je 0x4550a
cmpl $0x20, %eax
jne 0x454e1
movl -0xc(%rbp), %edx
leaq 0x25b2f(%rip), %rsi     # 0x6b00e
jmp 0x45516
movb $0x0, (%rbx)
jmp 0x45520
movl -0xc(%rbp), %edx
leaq 0x25b12(%rip), %rsi     # 0x6b002
jmp 0x45516
movl -0xc(%rbp), %edx
leaq 0x25b18(%rip), %rsi     # 0x6b014
jmp 0x45516
movl -0xc(%rbp), %edx
leaq 0x25af4(%rip), %rsi     # 0x6affc
jmp 0x45516
movl -0xc(%rbp), %edx
incl %edx
leaq 0x25af2(%rip), %rsi     # 0x6b008
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satexclude(int, double, int, bamboo::prcopt_t const*)
extern int satexclude(int sat, double var, int svh, const prcopt_t *opt)
{
    int sys=satsys(sat,NULL);
    
    if (svh<0) return 1; /* ephemeris unavailable */
    
    if (opt) {
        if (opt->exsats[sat-1]==1) return 1; /* excluded satellite */
        if (opt->exsats[sat-1]==2) return 0; /* included satellite */
        if (!(sys&opt->navsys)) return 1; /* unselected sat sys */
    }
    if (sys==SYS_QZS) svh&=0xFE; /* mask QZSS LEX health */
    if (svh) {
        trace(3,"unhealthy satellite: sat=%3d svh=%02X\n",sat,svh);
        return 1;
    }
    if (var>MAX_VAR_EPH) {
        trace(3,"invalid ura satellite: sat=%3d ura=%.2f\n",sat,sqrt(var));
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movl %esi, %ebx
movsd %xmm0, -0x28(%rbp)
movl %edi, %r15d
xorl %esi, %esi
callq 0x45362
pushq $0x1
popq %r12
testl %ebx, %ebx
js 0x4558f
movl %eax, %ecx
testq %r14, %r14
movsd -0x28(%rbp), %xmm0
je 0x4557e
movslq %r15d, %rax
movzbl 0x8a7(%rax,%r14), %eax
cmpl $0x1, %eax
je 0x45592
cmpl $0x2, %eax
jne 0x45578
xorl %eax, %eax
jmp 0x45592
testl %ecx, 0xc(%r14)
je 0x4558f
movl %ebx, %eax
andl $0xfe, %eax
cmpl $0x10, %ecx
cmovnel %ebx, %eax
testl %eax, %eax
je 0x4559f
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
ucomisd 0x255cf(%rip), %xmm0    # 0x6ab78
jbe 0x45592
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jae 0x4558f
callq 0x84e0
jmp 0x4558f
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::testsnr(int, int, double, double, bamboo::snrmask_t const*)
extern int testsnr(int base, int freq, double el, double snr,
                   const snrmask_t *mask)
{
    double minsnr,a;
    int i;
    
    if (!mask->ena[base]||freq<0||freq>=NFREQ) return 0;
    
    a=(el*R2D+5.0)/10.0;
    i=(int)floor(a); a-=i;
    if      (i<1) minsnr=mask->mask[freq][0];
    else if (i>8) minsnr=mask->mask[freq][8];
    else minsnr=(1.0-a)*mask->mask[freq][i-1]+a*mask->mask[freq][i];
    
    return snr<minsnr;
}

// Assembly:
xorl %eax, %eax
cmpl $0x2, %esi
ja 0x45693
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movslq %edi, %rcx
cmpl $0x0, (%rdx,%rcx,4)
je 0x4568b
movl %esi, %r14d
movsd %xmm1, -0x18(%rbp)
mulsd 0x1f0f8(%rip), %xmm0    # 0x646f0
addsd 0x1c1a0(%rip), %xmm0    # 0x617a0
divsd 0x1b4b0(%rip), %xmm0    # 0x60ab8
movsd %xmm0, -0x20(%rbp)
callq 0x8ac0
cvttsd2si %xmm0, %eax
testl %eax, %eax
jle 0x45633
cmpl $0x9, %eax
movsd -0x18(%rbp), %xmm1
jb 0x45647
movl %r14d, %eax
imulq $0x48, %rax, %rax
movsd 0x48(%rbx,%rax), %xmm0
jmp 0x45682
movl %r14d, %eax
imulq $0x48, %rax, %rax
movsd 0x8(%rbx,%rax), %xmm0
movsd -0x18(%rbp), %xmm1
jmp 0x45682
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
movsd -0x20(%rbp), %xmm2
subsd %xmm0, %xmm2
movsd 0x1a2c0(%rip), %xmm0    # 0x5f920
subsd %xmm2, %xmm0
movl %r14d, %ecx
imulq $0x48, %rcx, %rcx
addq %rcx, %rbx
movl %eax, %ecx
mulsd 0x8(%rbx,%rcx,8), %xmm2
decl %eax
mulsd 0x8(%rbx,%rax,8), %xmm0
addsd %xmm2, %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
seta %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::obs2code(char const*, int*)
extern unsigned char obs2code(const char *obs, int *freq)
{
    int i;
    if (freq) *freq=0;
    for (i=1;*obscodes[i];i++) {
        if (strcmp(obscodes[i],obs)) continue;
        if (freq) *freq=obsfreqs[i];
        return (unsigned char)i;
    }
    return CODE_NONE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x456ae
andl $0x0, (%r14)
pushq $0x1
popq %rbx
leaq 0x40238(%rip), %r12     # 0x858f0
cmpq $0x38, %rbx
je 0x456d3
movq (%r12,%rbx,8), %rdi
movq %r15, %rsi
callq 0x8890
testl %eax, %eax
je 0x456d7
incq %rbx
jmp 0x456b8
xorl %ebx, %ebx
jmp 0x456ea
testq %r14, %r14
je 0x456ea
leaq 0x2286d(%rip), %rax     # 0x67f50
movzbl (%rbx,%rax), %eax
movl %eax, (%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::code2obs(unsigned char, int*)
extern char *code2obs(unsigned char code, int *freq)
{
    if (freq) *freq=0;
    if (code<=CODE_NONE||MAXCODE<code) return "";
    if (freq) *freq=obsfreqs[code];
    return obscodes[code];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x4571b
andl $0x0, (%rsi)
leal -0x38(%rdi), %eax
cmpb $-0x37, %al
jb 0x45722
movzbl %dil, %eax
leaq 0x2283d(%rip), %rcx     # 0x67f50
movzbl (%rax,%rcx), %ecx
movl %ecx, (%rsi)
jmp 0x4572f
leal -0x38(%rdi), %eax
cmpb $-0x37, %al
jae 0x4572b
leaq 0x1aebc(%rip), %rax     # 0x605e5
jmp 0x4573a
movzbl %dil, %eax
leaq 0x401ba(%rip), %rcx     # 0x858f0
movq (%rcx,%rax,8), %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::setcodepri(int, int, char const*)
extern void setcodepri(int sys, int freq, const char *pri)
{
    trace(3,"setcodepri:sys=%d freq=%d pri=%s\n",sys,freq,pri);
    
    if (freq<=0||MAXRTKFREQ<freq) return;
    if (sys&SYS_GPS) strcpy(codepris[0][freq-1],pri);
    if (sys&SYS_GLO) strcpy(codepris[1][freq-1],pri);
    if (sys&SYS_GAL) strcpy(codepris[2][freq-1],pri);
    if (sys&SYS_QZS) strcpy(codepris[3][freq-1],pri);
    if (sys&SYS_SBS) strcpy(codepris[4][freq-1],pri);
    if (sys&SYS_CMP) strcpy(codepris[5][freq-1],pri);
    if (sys&SYS_IRN) strcpy(codepris[6][freq-1],pri);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
leal -0x8(%r14), %eax
cmpl $-0x7, %eax
jb 0x45847
movq %rdx, %rbx
movl %edi, %r15d
testb $0x1, %r15b
je 0x4577c
leal -0x1(%r14), %eax
shlq $0x4, %rax
leaq 0x415ef(%rip), %rdi     # 0x86d60
addq %rax, %rdi
movq %rbx, %rsi
callq 0x85c0
testb $0x4, %r15b
je 0x457a1
leal -0x1(%r14), %eax
shlq $0x4, %rax
leaq 0x415cf(%rip), %rcx     # 0x86d60
leaq (%rax,%rcx), %rdi
addq $0x70, %rdi
movq %rbx, %rsi
callq 0x85c0
testb $0x8, %r15b
je 0x457c9
leal -0x1(%r14), %eax
shlq $0x4, %rax
leaq 0x415aa(%rip), %rcx     # 0x86d60
leaq (%rax,%rcx), %rdi
addq $0xe0, %rdi
movq %rbx, %rsi
callq 0x85c0
testb $0x10, %r15b
je 0x457f1
leal -0x1(%r14), %eax
shlq $0x4, %rax
leaq 0x41582(%rip), %rcx     # 0x86d60
leaq (%rax,%rcx), %rdi
addq $0x150, %rdi            # imm = 0x150
movq %rbx, %rsi
callq 0x85c0
testb $0x2, %r15b
je 0x45819
leal -0x1(%r14), %eax
shlq $0x4, %rax
leaq 0x4155a(%rip), %rcx     # 0x86d60
leaq (%rax,%rcx), %rdi
addq $0x1c0, %rdi            # imm = 0x1C0
movq %rbx, %rsi
callq 0x85c0
testb $0x20, %r15b
je 0x45841
leal -0x1(%r14), %eax
shlq $0x4, %rax
leaq 0x41532(%rip), %rcx     # 0x86d60
leaq (%rax,%rcx), %rdi
addq $0x230, %rdi            # imm = 0x230
movq %rbx, %rsi
callq 0x85c0
testb $0x40, %r15b
jne 0x45852
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
decl %r14d
shlq $0x4, %r14
leaq 0x41500(%rip), %rax     # 0x86d60
leaq (%r14,%rax), %rdi
addq $0x2a0, %rdi            # imm = 0x2A0
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x85c0
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::getcodepri(int, unsigned char, char const*)
extern int getcodepri(int sys, unsigned char code, const char *opt)
{
    const char *p,*optstr;
    char *obs,str[8]="";
    int i,j;
    
    switch (sys) {
        case SYS_GPS: i=0; optstr="-GL%2s"; break;
        case SYS_GLO: i=1; optstr="-RL%2s"; break;
        case SYS_GAL: i=2; optstr="-EL%2s"; break;
        case SYS_QZS: i=3; optstr="-JL%2s"; break;
        case SYS_SBS: i=4; optstr="-SL%2s"; break;
        case SYS_CMP: i=5; optstr="-CL%2s"; break;
        case SYS_IRN: i=6; optstr="-IL%2s"; break;
        default: return 0;
    }
    obs=code2obs(code,&j);
    
    /* parse code options */
    for (p=opt;p&&(p=strchr(p,'-'));p++) {
        if (sscanf(p,optstr,str)<1||str[0]!=obs[0]) continue;
        return str[1]==obs[1]?15:0;
    }
    /* search code priority */
    return (p=strchr(codepris[i][j-1],obs[1]))?14-(int)(p-codepris[i][j-1]):0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
andq $0x0, -0x38(%rbp)
xorl %edx, %edx
leal -0x1(%rdi), %eax
cmpl $0x7, %eax
ja 0x458c1
leaq 0x20fdd(%rip), %rcx     # 0x66884
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, -0x30(%rbp)
leaq 0x2575a(%rip), %r15     # 0x6b019
jmp 0x45932
cmpl $0x10, %edi
je 0x45924
cmpl $0x20, %edi
je 0x45914
cmpl $0x40, %edi
jne 0x459e6
pushq $0x6
popq %rax
movq %rax, -0x30(%rbp)
leaq 0x25761(%rip), %r15     # 0x6b043
jmp 0x45932
pushq $0x4
popq %rax
movq %rax, -0x30(%rbp)
leaq 0x25743(%rip), %r15     # 0x6b035
jmp 0x45932
pushq $0x2
popq %rax
movq %rax, -0x30(%rbp)
leaq 0x25725(%rip), %r15     # 0x6b027
jmp 0x45932
pushq $0x1
popq %rax
movq %rax, -0x30(%rbp)
leaq 0x2570e(%rip), %r15     # 0x6b020
jmp 0x45932
pushq $0x5
popq %rax
movq %rax, -0x30(%rbp)
leaq 0x2571a(%rip), %r15     # 0x6b03c
jmp 0x45932
pushq $0x3
popq %rax
movq %rax, -0x30(%rbp)
leaq 0x256fc(%rip), %r15     # 0x6b02e
leal -0x38(%rsi), %eax
cmpb $-0x37, %al
jae 0x45946
leaq 0x1aca5(%rip), %r13     # 0x605e5
pushq $-0x1
popq %r12
jmp 0x45964
movzbl %sil, %eax
leaq 0x225ff(%rip), %rcx     # 0x67f50
movzbl (%rax,%rcx), %r12d
leaq 0x3ff93(%rip), %rcx     # 0x858f0
movq (%rcx,%rax,8), %r13
decq %r12
leaq -0x38(%rbp), %rbx
testq %r14, %r14
je 0x459a2
movq %r14, %rdi
pushq $0x2d
popq %rsi
callq 0x8250
testq %rax, %rax
je 0x459a2
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x8600
testl %eax, %eax
jle 0x4599d
movb -0x38(%rbp), %al
cmpb (%r13), %al
je 0x459d7
incq %r14
jmp 0x45968
imulq $0x70, -0x30(%rbp), %rax
leaq 0x413b2(%rip), %rcx     # 0x86d60
shlq $0x4, %r12
addq %rcx, %r12
addq %rax, %r12
movsbl 0x1(%r13), %esi
movq %r12, %rdi
callq 0x8250
subl %eax, %r12d
addl $0xe, %r12d
xorl %edx, %edx
testq %rax, %rax
cmovnel %r12d, %edx
jmp 0x459e6
movb -0x37(%rbp), %al
xorl %ecx, %ecx
cmpb 0x1(%r13), %al
pushq $0xf
popq %rdx
cmovnel %ecx, %edx
movl %edx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::setbitu(unsigned char*, int, int, unsigned int)
extern void setbitu(unsigned char *buff, int pos, int len, unsigned int data)
{
    unsigned int mask=1u<<(len-1);
    int i;
    if (len<=0||32<len) return;
    for (i=pos;i<pos+len;i++,mask>>=1) {
        if (data&mask) buff[i/8]|=1u<<(7-i%8); else buff[i/8]&=~(1u<<(7-i%8));
    }
}

// Assembly:
movl %edx, %r9d
leal -0x21(%r9), %eax
cmpl $-0x20, %eax
jb 0x45adf
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %ecx, %r8d
leal -0x1(%r9), %ecx
movl $0x1, %r10d
movl %r10d, %r11d
shll %cl, %r11d
addl %esi, %r9d
movl $0x8, %ebx
cmpl %r9d, %esi
jge 0x45adb
movl %esi, %eax
cltd
idivl %ebx
leal (,%rax,8), %ecx
movl %esi, %edx
subl %ecx, %edx
movb $0x7, %cl
subb %dl, %cl
movl %r10d, %edx
shll %cl, %edx
cltq
movb (%rdi,%rax), %cl
movl %ecx, %r14d
orb %dl, %r14b
notb %dl
andb %cl, %dl
testl %r8d, %r11d
movzbl %r14b, %ecx
movzbl %dl, %edx
cmovnel %ecx, %edx
movb %dl, (%rdi,%rax)
incl %esi
shrl %r11d
jmp 0x45a97
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::rtk_crc32(unsigned char const*, int)
extern unsigned int rtk_crc32(const unsigned char *buff, int len)
{
    unsigned int crc=0;
    int i,j;
    
    trace(4,"rtk_crc32: len=%d\n",len);
    
    for (i=0;i<len;i++) {
        crc^=buff[i];
        for (j=0;j<8;j++) {
            if (crc&1) crc=(crc>>1)^POLYCRC32; else crc>>=1;
        }
    }
    return crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
movl $0x8, %edx
xorl %eax, %eax
cmpq %rsi, %rcx
je 0x45b4b
movzbl (%rdi,%rcx), %r8d
xorl %r8d, %eax
movl %edx, %r8d
subl $0x1, %r8d
jb 0x45b46
movl %eax, %r9d
shrl %r9d
movl %r9d, %r10d
xorl $0xedb88320, %r10d      # imm = 0xEDB88320
testb $0x1, %al
cmovel %r9d, %r10d
movl %r10d, %eax
jmp 0x45b25
incq %rcx
jmp 0x45b15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::rtk_crc24q(unsigned char const*, int)
extern unsigned int rtk_crc24q(const unsigned char *buff, int len)
{
    unsigned int crc=0;
    int i;
    
    trace(4,"rtk_crc24q: len=%d\n",len);
    
    for (i=0;i<len;i++) crc=((crc<<8)&0xFFFFFF)^tbl_CRC24Q[(crc>>16)^buff[i]];
    return crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
leaq 0x22431(%rip), %rdx     # 0x67f90
xorl %eax, %eax
cmpq %rcx, %rsi
je 0x45b85
movzwl %ax, %r8d
shll $0x8, %r8d
shrl $0x10, %eax
movzbl (%rdi,%rcx), %r9d
xorl %eax, %r9d
xorl (%rdx,%r9,4), %r8d
incq %rcx
movl %r8d, %eax
jmp 0x45b61
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::rtk_crc16(unsigned char const*, int)
extern unsigned short rtk_crc16(const unsigned char *buff, int len)
{
    unsigned short crc=0;
    int i;
    
    trace(4,"rtk_crc16: len=%d\n",len);
    
    for (i=0;i<len;i++) {
        crc=(crc<<8)^tbl_CRC16[((crc>>8)^buff[i])&0xFF];
    }
    return crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
leaq 0x227f7(%rip), %rdx     # 0x68390
xorl %eax, %eax
cmpq %rcx, %rsi
je 0x45bbd
movzwl %ax, %r8d
shll $0x8, %eax
shrl $0x8, %r8d
movzbl (%rdi,%rcx), %r9d
xorl %r8d, %r9d
xorw (%rdx,%r9,2), %ax
incq %rcx
jmp 0x45b9b
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::decode_word(unsigned int, unsigned char*)
extern int decode_word(unsigned int word, unsigned char *data)
{
    const unsigned int hamming[]={
        0xBB1F3480,0x5D8F9A40,0xAEC7CD00,0x5763E680,0x6BB1F340,0x8B7A89C0
    };
    unsigned int parity=0,w;
    int i;
    
    trace(5,"decodeword: word=%08x\n",word);
    
    if (word&0x40000000) word^=0x3FFFFFC0;
    
    for (i=0;i<6;i++) {
        parity<<=1;
        for (w=(word&hamming[i])>>6;w;w>>=1) parity^=w&1;
    }
    if (parity!=(word&0x3F)) return 0;
    
    for (i=0;i<3;i++) data[i]=(unsigned char)(word>>(22-i*8));
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %edx
xorl $0x3fffffc0, %edx       # imm = 0x3FFFFFC0
btl $0x1e, %edi
cmovael %edi, %edx
xorl %eax, %eax
leaq 0x229b5(%rip), %rdi     # 0x68590
xorl %ecx, %ecx
cmpq $0x6, %rax
je 0x45c09
addl %ecx, %ecx
movl (%rdi,%rax,4), %r8d
andl %edx, %r8d
shrl $0x6, %r8d
testl %r8d, %r8d
je 0x45c04
movl %r8d, %r9d
andl $0x1, %r9d
xorl %r9d, %ecx
shrl %r8d
jmp 0x45bf0
incq %rax
jmp 0x45bdd
movl %edx, %edi
andl $0x3f, %edi
xorl %eax, %eax
cmpl %edi, %ecx
jne 0x45c38
movl $0x16, %ecx
xorl %edi, %edi
movl $0x1, %eax
cmpq $0x3, %rdi
je 0x45c38
movl %edx, %r8d
shrl %cl, %r8d
movb %r8b, (%rsi,%rdi)
incq %rdi
addl $-0x8, %ecx
jmp 0x45c20
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::mat(int, int)
extern double *mat(int n, int m)
{
    double *p;
    
    if (n<=0||m<=0) return NULL;
    if (!(p=(double *)malloc(sizeof(double)*n*m))) {
        fatalerr("matrix memory allocation error: n=%d,m=%d\n",n,m);
    }
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testl %edi, %edi
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
je 0x45c53
xorl %eax, %eax
jmp 0x45c6e
movl %esi, %ebx
movl %edi, %r14d
movl %edi, %eax
movl %esi, %edi
imulq %rax, %rdi
shlq $0x3, %rdi
callq 0x8830
testq %rax, %rax
je 0x45c73
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x253d8(%rip), %rdi     # 0x6b052
movl %r14d, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x45c86
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::fatalerr(char const*, ...)
static void fatalerr(const char *format, ...)
{
    char msg[1024];
    va_list ap;
    va_start(ap,format); vsprintf(msg,format,ap); va_end(ap);
    if (fatalfunc) fatalfunc(msg);
    else fprintf(stderr,"%s",msg);
    exit(-9);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, %r10
leaq -0xd0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x45cd9
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
leaq -0x4d0(%rbp), %rdi
movq %r10, %rsi
callq 0x82e0
movq 0x442e4(%rip), %rax     # 0x89ff0
testq %rax, %rax
jne 0x45d2f
movq 0x402b8(%rip), %rax     # 0x85fd0
movq (%rax), %rsi
leaq -0x4d0(%rbp), %rdi
callq 0x86c0
pushq $-0x9
popq %rdi
callq 0x8790
leaq -0x4d0(%rbp), %rdi
callq *%rax
jmp 0x45d27
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::imat(int, int)
extern int *imat(int n, int m)
{
    int *p;
    
    if (n<=0||m<=0) return NULL;
    if (!(p=(int *)malloc(sizeof(int)*n*m))) {
        fatalerr("integer matrix memory allocation error: n=%d,m=%d\n",n,m);
    }
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testl %edi, %edi
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
je 0x45d53
xorl %eax, %eax
jmp 0x45d6e
movl %esi, %ebx
movl %edi, %r14d
movl %edi, %eax
movl %esi, %edi
imulq %rax, %rdi
shlq $0x2, %rdi
callq 0x8830
testq %rax, %rax
je 0x45d73
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x252d0(%rip), %rdi     # 0x6b04a
movl %r14d, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x45c86
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::zeros(int, int)
extern double *zeros(int n, int m)
{
    double *p;
    
#if NOCALLOC
    if ((p=mat(n,m))) for (n=n*m-1;n>=0;n--) p[n]=0.0;
#else
    if (n<=0||m<=0) return NULL;
    if (!(p=(double *)calloc(sizeof(double),n*m))) {
        fatalerr("matrix memory allocation error: n=%d,m=%d\n",n,m);
    }
#endif
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testl %edi, %edi
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
je 0x45d9f
xorl %eax, %eax
jmp 0x45db4
movl %esi, %ebx
movl %edi, %r14d
imull %edi, %esi
pushq $0x8
popq %rdi
callq 0x8440
testq %rax, %rax
je 0x45db9
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x25292(%rip), %rdi     # 0x6b052
movl %r14d, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x45c86
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::eye(int)
extern double *eye(int n)
{
    double *p;
    int i;
    
    if ((p=zeros(n,n))) for (i=0;i<n;i++) p[i+i*n]=1.0;
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, %esi
callq 0x45d86
testq %rax, %rax
je 0x45e05
leal 0x1(%rbx), %ecx
xorl %edx, %edx
testl %ebx, %ebx
cmovlel %edx, %ebx
movabsq $0x3ff0000000000000, %rsi # imm = 0x3FF0000000000000
subq $0x1, %rbx
jb 0x45e05
movslq %edx, %rdx
movq %rsi, (%rax,%rdx,8)
addl %ecx, %edx
jmp 0x45df4
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::normv3(double const*, double*)
extern int normv3(const double *a, double *b)
{
    double r;
    if ((r=norm(a,3))<=0.0) return 0;
    b[0]=a[0]/r;
    b[1]=a[1]/r;
    b[2]=a[2]/r;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x3
popq %rsi
callq 0x45e31
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x45efc
movsd (%r14), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movsd 0x8(%r14), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rbx)
movsd 0x10(%r14), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::solve(char const*, double const*, double const*, int, int, double*)
extern int solve(const char *tr, const double *A, const double *Y, int n,
                 int m, double *X)
{
    double *B=mat(n,n);
    int info;
    
    matcpy(B,A,n,n);
    if (!(info=matinv(B,n))) matmul(tr[0]=='N'?"NN":"TN",n,m,n,1.0,B,Y,0.0,X);
    free(B);
    return info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, -0x38(%rbp)
movl %r8d, -0x2c(%rbp)
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
movl %ecx, %edi
movl %ecx, %esi
callq 0x45c3a
movq %rax, %r12
movslq %r14d, %r13
movq %r13, %rdx
imulq %r13, %rdx
shlq $0x3, %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84f0
movq %r12, %rdi
movl %r13d, %esi
callq 0x46100
movl %eax, %ebx
testl %eax, %eax
jne 0x4659e
cmpb $0x4e, (%r15)
leaq 0x24b12(%rip), %rax     # 0x6b07d
leaq 0x1c6ee(%rip), %rdi     # 0x62c60
cmoveq %rax, %rdi
movq -0x38(%rbp), %rax
movq %rax, (%rsp)
movsd 0x1939a(%rip), %xmm0    # 0x5f920
xorps %xmm1, %xmm1
movl %r14d, %esi
movl -0x2c(%rbp), %edx
movl %r14d, %ecx
movq %r12, %r8
movq -0x40(%rbp), %r9
callq 0x45f19
movq %r12, %rdi
callq 0x8780
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::lsq(double const*, double const*, int, int, double*, double*)
extern int lsq(const double *A, const double *y, int n, int m, double *x,
               double *Q)
{
    double *Ay;
    int info;
    
    if (m<n) return -1;
    Ay=mat(n,1);
    matmul("NN",n,1,m,1.0,A,y,0.0,Ay); /* Ay=A*y */
    matmul("NT",n,n,m,1.0,A,A,0.0,Q);  /* Q=A*A' */
    if (!(info=matinv(Q,n))) matmul("NN",n,1,n,1.0,Q,Ay,0.0,x); /* x=Q^-1*Ay */
    free(Ay);
    return info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl %edx, %ecx
jge 0x465d5
pushq $-0x1
popq %r12
jmp 0x46691
movq %r9, %rbx
movl %ecx, %r12d
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r13
movq %r8, -0x30(%rbp)
pushq $0x1
popq %rsi
movl %edx, %edi
callq 0x45c3a
movq %rax, (%rsp)
leaq 0x24a80(%rip), %rdi     # 0x6b07d
movsd 0x1931b(%rip), %xmm0    # 0x5f920
xorps %xmm1, %xmm1
movl %r14d, %esi
pushq $0x1
popq %rdx
movl %r12d, %ecx
movq %r13, %r8
movq %r15, %r9
movq %rax, %r15
callq 0x45f19
movq %rbx, (%rsp)
leaq 0x2841d(%rip), %rdi     # 0x6ea47
xorps %xmm1, %xmm1
movl %r14d, %esi
movl %r14d, %edx
movl %r12d, %ecx
movsd 0x192e2(%rip), %xmm0    # 0x5f920
movq %r13, %r8
movq %r13, %r9
callq 0x45f19
movq %rbx, %rdi
movl %r14d, %esi
callq 0x46100
movl %eax, %r12d
testl %eax, %eax
jne 0x46689
movq -0x30(%rbp), %rax
movq %rax, (%rsp)
leaq 0x24a13(%rip), %rdi     # 0x6b07d
pushq $0x1
popq %rdx
movsd 0x192ab(%rip), %xmm0    # 0x5f920
xorps %xmm1, %xmm1
movl %r14d, %esi
movl %r14d, %ecx
movq %rbx, %r8
movq %r15, %r9
callq 0x45f19
movq %r15, %rdi
callq 0x8780
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::smoother(double const*, double const*, double const*, double const*, int, double*, double*)
extern int smoother(const double *xf, const double *Qf, const double *xb,
                    const double *Qb, int n, double *xs, double *Qs)
{
    double *invQf=mat(n,n),*invQb=mat(n,n),*xx=mat(n,1);
    int i,info=-1;
    
    matcpy(invQf,Qf,n,n);
    matcpy(invQb,Qb,n,n);
    if (!matinv(invQf,n)&&!matinv(invQb,n)) {
        for (i=0;i<n*n;i++) Qs[i]=invQf[i]+invQb[i];
        if (!(info=matinv(Qs,n))) {
            matmul("NN",n,1,n,1.0,invQf,xf,0.0,xx);
            matmul("NN",n,1,n,1.0,invQb,xb,1.0,xx);
            matmul("NN",n,1,n,1.0,Qs,xx,0.0,xs);
        }
    }
    free(invQf); free(invQb); free(xx);
    return info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x48(%rbp)
movl %r8d, %r12d
movq %rcx, -0x58(%rbp)
movq %rdx, -0x40(%rbp)
movq %rsi, -0x50(%rbp)
movq %rdi, -0x38(%rbp)
movl %r8d, %edi
movl %r8d, %esi
callq 0x45c3a
movq %rax, %rbx
movl %r12d, %edi
movl %r12d, %esi
callq 0x45c3a
movq %rax, %r14
pushq $0x1
popq %rsi
movl %r12d, %edi
callq 0x45c3a
movq %rax, -0x30(%rbp)
movslq %r12d, %r13
movq %r13, %r15
imulq %r13, %r15
shlq $0x3, %r15
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq %r15, %rdx
callq 0x84f0
movq %r14, %rdi
movq -0x58(%rbp), %rsi
movq %r15, %rdx
callq 0x84f0
movq %rbx, %rdi
movl %r13d, %esi
callq 0x46100
pushq $-0x1
popq %r15
testl %eax, %eax
jne 0x46c4e
movq %r14, %rdi
movl %r12d, %esi
callq 0x46100
testl %eax, %eax
jne 0x46c4e
movq 0x10(%rbp), %r13
movl %r12d, %eax
imull %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x46bb0
movsd (%rbx,%rcx,8), %xmm0
addsd (%r14,%rcx,8), %xmm0
movsd %xmm0, (%r13,%rcx,8)
incq %rcx
jmp 0x46b94
movq %r13, %rdi
movl %r12d, %esi
callq 0x46100
testl %eax, %eax
jne 0x46c4e
movq -0x30(%rbp), %r15
movq %r15, (%rsp)
leaq 0x244ab(%rip), %rdi     # 0x6b07d
pushq $0x1
popq %rdx
movsd 0x18d43(%rip), %xmm0    # 0x5f920
xorps %xmm1, %xmm1
movl %r12d, %esi
movl %r12d, %ecx
movq %rbx, %r8
movq -0x38(%rbp), %r9
callq 0x45f19
movq %r15, (%rsp)
leaq 0x24480(%rip), %rdi     # 0x6b07d
movl %r12d, %esi
pushq $0x1
popq %rdx
movl %r12d, %ecx
movsd 0x18d12(%rip), %xmm0    # 0x5f920
movq %r14, %r8
movq -0x40(%rbp), %r9
movaps %xmm0, %xmm1
callq 0x45f19
movq -0x48(%rbp), %rax
movq %rax, (%rsp)
xorps %xmm1, %xmm1
leaq 0x2444e(%rip), %rdi     # 0x6b07d
movl %r12d, %esi
pushq $0x1
popq %rdx
movl %r12d, %ecx
movsd 0x18ce0(%rip), %xmm0    # 0x5f920
movq %r13, %r8
movq %r15, %r9
callq 0x45f19
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x8780
movq %r14, %rdi
callq 0x8780
movq -0x30(%rbp), %rdi
callq 0x8780
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::matfprint(double const*, int, int, int, int, _IO_FILE*)
extern void matfprint(const double A[], int n, int m, int p, int q, FILE *fp)
{
    int i,j;
    
    for (i=0;i<n;i++) {
        for (j=0;j<m;j++) fprintf(fp," %*.*f",p,q,A[i+j*n]);
        fprintf(fp,"\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movl %r8d, -0x2c(%rbp)
movl %ecx, %r15d
movslq %esi, %r13
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movq %rdx, -0x38(%rbp)
testl %r13d, %r13d
movl $0x0, %ecx
cmovgl %r13d, %ecx
movq %rcx, -0x40(%rbp)
movq %rdi, %r12
shlq $0x3, %r13
cmpq -0x40(%rbp), %rax
je 0x46d0f
movq %rax, -0x50(%rbp)
movq %r12, -0x48(%rbp)
movq -0x38(%rbp), %r14
subq $0x1, %r14
jb 0x46cf3
movsd (%r12), %xmm0
movq %rbx, %rdi
leaq 0x2439f(%rip), %rsi     # 0x6b080
movl %r15d, %edx
movl -0x2c(%rbp), %ecx
movb $0x1, %al
callq 0x88c0
addq %r13, %r12
jmp 0x46ccb
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x87c0
movq -0x50(%rbp), %rax
incq %rax
movq -0x48(%rbp), %r12
addq $0x8, %r12
jmp 0x46cb9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::str2num(char const*, int, int)
extern double str2num(const char *s, int i, int n)
{
    double value;
    char str[256],*p=str;
    
    if (i<0||(int)strlen(s)<i||(int)sizeof(str)-1<n) return 0.0;
    for (s+=i;*s&&--n>=0;s++) *p++=*s=='d'||*s=='D'?'E':*s;
    *p='\0';
    return sscanf(str,"%lf",&value)==1?value:0.0;
}

// Assembly:
xorps %xmm0, %xmm0
testl %esi, %esi
js 0x46dd8
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
callq 0x8290
cmpl $0xff, %ebx
jg 0x46dc1
cmpl %r15d, %eax
xorps %xmm0, %xmm0
jl 0x46dcb
movl %r15d, %eax
addq %rax, %r14
xorl %eax, %eax
movzbl (%r14,%rax), %ecx
testl %ecx, %ecx
je 0x46d9b
testl %ebx, %ebx
jle 0x46d9b
movb $0x45, %dl
movl %ecx, %esi
orl $0x20, %esi
cmpl $0x64, %esi
je 0x46d8d
movl %ecx, %edx
movb %dl, -0x120(%rbp,%rax)
incq %rax
decl %ebx
jmp 0x46d72
movb $0x0, -0x120(%rbp,%rax)
leaq 0x246ff(%rip), %rsi     # 0x6b4a9
leaq -0x120(%rbp), %rdi
leaq -0x20(%rbp), %rdx
xorl %eax, %eax
callq 0x8600
cmpl $0x1, %eax
je 0x46dc6
xorps %xmm0, %xmm0
jmp 0x46dcb
movsd -0x20(%rbp), %xmm0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::str2time(char const*, int, int, bamboo::gtime_t*)
extern int str2time(const char *s, int i, int n, gtime_t *t)
{
    double ep[6];
    char str[256],*p=str;
    
    if (i<0||(int)strlen(s)<i||(int)sizeof(str)-1<i) return -1;
    for (s+=i;*s&&--n>=0;) *p++=*s++;
    *p='\0';
    if (sscanf(str,"%lf %lf %lf %lf %lf %lf",ep,ep+1,ep+2,ep+3,ep+4,ep+5)<6)
        return -1;
    if (ep[0]<100.0) ep[0]+=ep[0]<80.0?2000.0:1900.0;
    *t=epoch2time(ep);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
pushq $-0x1
popq %r14
testl %esi, %esi
js 0x46ecd
movq %rcx, %rbx
movl %edx, %r15d
movl %esi, %r13d
movq %rdi, %r12
callq 0x8290
cmpl $0xff, %r13d
ja 0x46ecd
cmpl %r13d, %eax
jl 0x46ecd
movl %r13d, %eax
addq %rax, %r12
xorl %eax, %eax
movb (%r12,%rax), %cl
testb %cl, %cl
je 0x46e44
testl %r15d, %r15d
jle 0x46e44
decl %r15d
movb %cl, -0x160(%rbp,%rax)
incq %rax
jmp 0x46e28
movb $0x0, -0x160(%rbp,%rax)
leaq -0x58(%rbp), %rcx
leaq -0x50(%rbp), %r8
leaq -0x48(%rbp), %r9
leaq -0x40(%rbp), %r10
leaq -0x38(%rbp), %r11
leaq 0x242b1(%rip), %rsi     # 0x6b118
leaq -0x160(%rbp), %rdi
leaq -0x60(%rbp), %rdx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x8600
popq %rcx
popq %rdx
cmpl $0x6, %eax
jl 0x46ecd
movsd -0x60(%rbp), %xmm0
movsd 0x23cef(%rip), %xmm1    # 0x6ab80
ucomisd %xmm0, %xmm1
jbe 0x46eb9
movsd 0x23ce9(%rip), %xmm1    # 0x6ab88
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x24051(%rip), %rcx     # 0x6af00
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x46ee2
movq %rax, (%rbx)
movsd %xmm0, 0x8(%rbx)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::epoch2time(double const*)
extern gtime_t epoch2time(const double *ep)
{
    const int doy[]={1,32,60,91,121,152,182,213,244,274,305,335};
    gtime_t time={0};
    int days,sec,year=(int)ep[0],mon=(int)ep[1],day=(int)ep[2];
    
    if (year<1970||2099<year||mon<1||12<mon) return time;
    
    /* leap year if year%4==0 in 1901-2099 */
    days=(year-1970)*365+(year-1969)/4+doy[mon-1]+day-2+(year%4==0&&mon>=3?1:0);
    sec=(int)floor(ep[5]);
    time.time=(time_t)days*86400+(int)ep[3]*3600+(int)ep[4]*60+sec;
    time.sec=ep[5]-sec;
    return time;
}

// Assembly:
cvttsd2si (%rdi), %ecx
cvttsd2si 0x8(%rdi), %eax
leal -0x834(%rcx), %edx
cmpl $0xffffff7e, %edx       # imm = 0xFFFFFF7E
setb %dl
leal -0xd(%rax), %esi
cmpl $-0xc, %esi
setb %sil
orb %dl, %sil
je 0x46f0f
xorps %xmm0, %xmm0
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cvttsd2si 0x10(%rdi), %edx
imull $0x16d, %ecx, %esi      # imm = 0x16D
leal -0x7b1(%rcx), %edi
shrl $0x2, %edi
leal -0x1(%rax), %r8d
leaq 0x21674(%rip), %r9      # 0x685b0
testb $0x3, %cl
sete %cl
cmpl $0x3, %eax
setae %al
andb %cl, %al
movzbl %al, %eax
addl %esi, %edi
addl %eax, %edi
addl (%r9,%r8,4), %edi
leal (%rdx,%rdi), %r14d
addl $0xfff50734, %r14d      # imm = 0xFFF50734
movsd 0x28(%rbx), %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x8ac0
cvttsd2si %xmm0, %eax
movslq %r14d, %rcx
imulq $0x15180, %rcx, %rcx    # imm = 0x15180
cvttsd2si 0x18(%rbx), %edx
imull $0xe10, %edx, %edx      # imm = 0xE10
cvttsd2si 0x20(%rbx), %esi
movslq %edx, %rdx
imull $0x3c, %esi, %esi
movslq %esi, %rsi
cltq
addq %rdx, %rax
addq %rsi, %rax
cvttpd2dq %xmm0, %xmm0
addq %rcx, %rax
cvtdq2pd %xmm0, %xmm0
movsd -0x18(%rbp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::time2epoch(bamboo::gtime_t, double*)
extern void time2epoch(gtime_t t, double *ep)
{
    const int mday[]={ /* # of days in a month */
        31,28,31,30,31,30,31,31,30,31,30,31,31,28,31,30,31,30,31,31,30,31,30,31,
        31,29,31,30,31,30,31,31,30,31,30,31,31,28,31,30,31,30,31,31,30,31,30,31
    };
    int days,sec,mon,day;
    
    /* leap year if year%4==0 in 1901-2099 */
    days=(int)(t.time/86400);
    sec=(int)(t.time-(time_t)days*86400);
    for (day=days%1461,mon=0;mon<48;mon++) {
        if (day>=mday[mon]) day-=mday[mon]; else break;
    }
    ep[0]=1970+days/1461*4+mon/12; ep[1]=mon%12+1; ep[2]=day+1;
    ep[3]=sec/3600; ep[4]=sec%3600/60; ep[5]=sec%60+t.sec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x15180, %ecx          # imm = 0x15180
movq %rdi, %rax
cqto
idivq %rcx
movq %rax, %rcx
movl $0x5b5, %r8d            # imm = 0x5B5
cltd
idivl %r8d
movl %eax, %r9d
movl %edx, %r8d
leaq 0x215f6(%rip), %r10     # 0x685e0
xorl %edx, %edx
movl $0x30, %eax
cmpq $0x30, %rdx
je 0x4700d
movl %r8d, %r11d
subl (%r10), %r11d
jl 0x4700b
incq %rdx
addq $0x4, %r10
movl %r11d, %r8d
jmp 0x46ff1
movl %edx, %eax
movl $0xc, %r10d
xorl %edx, %edx
divl %r10d
imull $0xfffeae80, %ecx, %ecx # imm = 0xFFFEAE80
addl %ecx, %edi
leal (%rax,%r9,4), %eax
addl $0x7b2, %eax            # imm = 0x7B2
cvtsi2sd %eax, %xmm1
movsd %xmm1, (%rsi)
incl %edx
cvtsi2sd %edx, %xmm1
movsd %xmm1, 0x8(%rsi)
incl %r8d
cvtsi2sd %r8d, %xmm1
movsd %xmm1, 0x10(%rsi)
movl $0xe10, %ecx            # imm = 0xE10
movl %edi, %eax
cltd
idivl %ecx
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x18(%rsi)
movl %edx, %eax
cwtd
movw $0x3c, %cx
idivw %cx
cwtl
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x20(%rsi)
movl $0x3c, %ecx
movl %edi, %eax
cltd
idivl %ecx
cvtsi2sd %edx, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::gpst2time(int, double)
extern gtime_t gpst2time(int week, double sec)
{
    gtime_t t=epoch2time(gpst0);
    
    if (sec<-1E9||1E9<sec) sec=0.0;
    t.time+=(time_t)86400*7*week+(int)sec;
    t.sec=sec-(int)sec;
    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movaps %xmm0, -0x20(%rbp)
movl %edi, %ebx
leaq 0x21600(%rip), %rdi     # 0x686a0
callq 0x46ee2
movapd 0x18883(%rip), %xmm1    # 0x5f930
movapd -0x20(%rbp), %xmm2
andpd %xmm2, %xmm1
movsd 0x23ad2(%rip), %xmm0    # 0x6ab90
cmpltsd %xmm1, %xmm0
andnpd %xmm2, %xmm0
movslq %ebx, %rcx
imulq $0x93a80, %rcx, %rcx    # imm = 0x93A80
cvttsd2si %xmm0, %edx
movslq %edx, %rdx
addq %rcx, %rax
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
addq %rdx, %rax
subsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq