LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %r9, -0x38(%rbp)
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl %edx, %ecx
jl 0x4f128
movl %ecx, %r12d
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r13
movq %r8, -0x30(%rbp)
movl %edx, %edi
movl $0x1, %esi
callq 0x4e5e2
movq %rax, %r15
movq %rax, (%rsp)
leaq 0x25ffb(%rip), %rdi     # 0x75087
movsd 0x1a88c(%rip), %xmm0    # 0x69920
xorps %xmm1, %xmm1
movl %r14d, %esi
movl $0x1, %edx
movl %r12d, %ecx
movq %r13, %r8
movq %rbx, %r9
callq 0x4e91f
movq -0x38(%rbp), %rbx
movq %rbx, (%rsp)
leaq 0x299df(%rip), %rdi     # 0x78a9b
xorps %xmm1, %xmm1
movl %r14d, %esi
movl %r14d, %edx
movl %r12d, %ecx
movq %r15, %r12
movsd 0x1a84d(%rip), %xmm0    # 0x69920
movq %r13, %r8
movq %r13, %r9
callq 0x4e91f
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4eb12
movl %eax, %r15d
testl %eax, %eax
jne 0x4f120
movq -0x30(%rbp), %rax
movq %rax, (%rsp)
leaq 0x25f88(%rip), %rdi     # 0x75087
movsd 0x1a819(%rip), %xmm0    # 0x69920
xorps %xmm1, %xmm1
movl %r14d, %esi
movl $0x1, %edx
movl %r14d, %ecx
movq %rbx, %r8
movq %r12, %r9
callq 0x4e91f
movq %r12, %rdi
callq 0x87b0
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4e5e2
movq %rax, %rbx
movl %r12d, %edi
movl %r12d, %esi
callq 0x4e5e2
movq %rax, %r13
movl %r12d, %edi
movl $0x1, %esi
callq 0x4e5e2
movq %rax, -0x30(%rbp)
movslq %r12d, %r14
movq %r14, %r15
imulq %r14, %r15
shlq $0x3, %r15
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq %r15, %rdx
callq 0x84f0
movq %r13, %rdi
movq -0x58(%rbp), %rsi
movq %r15, %rdx
callq 0x84f0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4eb12
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x4f5d3
movq %r13, %r14
jmp 0x4f6be
movq %r13, %rdi
movl %r12d, %esi
callq 0x4eb12
testl %eax, %eax
movq %r13, %r14
jne 0x4f6be
movq 0x10(%rbp), %r13
testl %r12d, %r12d
je 0x4f61a
movl %r12d, %eax
imull %eax, %eax
cmpl $0x1, %eax
adcl $0x0, %eax
xorl %ecx, %ecx
movsd (%rbx,%rcx,8), %xmm0
addsd (%r14,%rcx,8), %xmm0
movsd %xmm0, (%r13,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x4f600
movq %r13, %rdi
movl %r12d, %esi
callq 0x4eb12
testl %eax, %eax
jne 0x4f6be
movq -0x30(%rbp), %r15
movq %r15, (%rsp)
leaq 0x25a4b(%rip), %rdi     # 0x75087
movsd 0x1a2dc(%rip), %xmm0    # 0x69920
xorps %xmm1, %xmm1
movl %r12d, %esi
movl $0x1, %edx
movl %r12d, %ecx
movq %rbx, %r8
movq -0x38(%rbp), %r9
callq 0x4e91f
movq %r15, (%rsp)
leaq 0x25a1e(%rip), %rdi     # 0x75087
movl %r12d, %esi
movl $0x1, %edx
movl %r12d, %ecx
movsd 0x1a2a4(%rip), %xmm0    # 0x69920
movq %r14, %r8
movq -0x40(%rbp), %r9
movaps %xmm0, %xmm1
callq 0x4e91f
movq -0x48(%rbp), %rax
movq %rax, (%rsp)
xorps %xmm1, %xmm1
leaq 0x259ea(%rip), %rdi     # 0x75087
movl %r12d, %esi
movl $0x1, %edx
movl %r12d, %ecx
movsd 0x1a270(%rip), %xmm0    # 0x69920
movq %r13, %r8
movq %r15, %r9
callq 0x4e91f
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x87b0
movq %r14, %rdi
callq 0x87b0
movq -0x30(%rbp), %rdi
callq 0x87b0
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_O1/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 $0x48, %rsp
movl %r8d, -0x34(%rbp)
movl %ecx, -0x30(%rbp)
movl %edx, -0x2c(%rbp)
movq %rdi, -0x40(%rbp)
testl %esi, %esi
jle 0x4f79b
movl %esi, %eax
movl -0x2c(%rbp), %ecx
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
leaq (,%rax,8), %rax
movq %rax, -0x68(%rbp)
xorl %eax, %eax
movq %r9, -0x60(%rbp)
movl -0x30(%rbp), %r13d
movq %rax, -0x58(%rbp)
cmpl $0x0, -0x2c(%rbp)
movl -0x34(%rbp), %ebx
leaq 0x25945(%rip), %r15     # 0x7508a
jle 0x4f776
movq -0x48(%rbp), %r12
movq -0x40(%rbp), %r14
movsd (%r14), %xmm0
movq %r9, %rdi
movq %r15, %rsi
movl %r13d, %edx
movl %ebx, %ecx
movb $0x1, %al
callq 0x88d0
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %r9
addq %rcx, %r14
decq %r12
jne 0x4f74f
movl $0xa, %edi
movq %r9, %rbx
movq %r9, %rsi
callq 0x87f0
movq -0x58(%rbp), %rax
incq %rax
addq $0x8, -0x40(%rbp)
cmpq -0x50(%rbp), %rax
movq %rbx, %r9
jne 0x4f733
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4f875
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 0x4f85e
cmpl %r15d, %eax
xorps %xmm0, %xmm0
jl 0x4f868
movl %r15d, %eax
movb (%r14,%rax), %dl
testb %dl, %dl
je 0x4f836
leaq (%rax,%r14), %rcx
incq %rcx
leaq -0x120(%rbp), %rax
testl %ebx, %ebx
jle 0x4f83d
movzbl %dl, %edi
movb $0x45, %sil
orl $0x20, %edi
cmpl $0x64, %edi
je 0x4f823
movl %edx, %esi
movb %sil, (%rax)
incq %rax
movb (%rcx), %dl
incq %rcx
decl %ebx
testb %dl, %dl
jne 0x4f80f
jmp 0x4f83d
leaq -0x120(%rbp), %rax
movb $0x0, (%rax)
leaq 0x25c72(%rip), %rsi     # 0x754b9
leaq -0x120(%rbp), %rdi
leaq -0x20(%rbp), %rdx
xorl %eax, %eax
callq 0x8610
cmpl $0x1, %eax
je 0x4f863
xorps %xmm0, %xmm0
jmp 0x4f868
movsd -0x20(%rbp), %xmm0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %esi, %esi
js 0x4f98f
movq %rcx, %rbx
movl %edx, %r15d
movl %esi, %r13d
movq %rdi, %r12
callq 0x8290
cmpl $0xff, %r13d
jg 0x4f98f
cmpl %r13d, %eax
jl 0x4f98f
movl %r13d, %eax
movb (%r12,%rax), %cl
testb %cl, %cl
sete %dl
testl %r15d, %r15d
setle %sil
orb %dl, %sil
jne 0x4f902
leaq (%rax,%r12), %rdx
incq %rdx
leaq -0x160(%rbp), %rax
movb %cl, (%rax)
incq %rax
movb (%rdx), %cl
testb %cl, %cl
je 0x4f909
leal -0x1(%r15), %esi
incq %rdx
cmpl $0x1, %r15d
movl %esi, %r15d
jg 0x4f8e5
jmp 0x4f909
leaq -0x160(%rbp), %rax
movb $0x0, (%rax)
leaq -0x58(%rbp), %rcx
leaq -0x50(%rbp), %r8
leaq -0x48(%rbp), %r9
leaq -0x40(%rbp), %r10
leaq -0x38(%rbp), %r11
leaq 0x257fb(%rip), %rsi     # 0x75122
leaq -0x160(%rbp), %rdi
leaq -0x60(%rbp), %rdx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x8610
addq $0x10, %rsp
cmpl $0x6, %eax
jl 0x4f98f
movsd -0x60(%rbp), %xmm0
movsd 0x2524d(%rip), %xmm1    # 0x74ba0
ucomisd %xmm0, %xmm1
jbe 0x4f97b
movsd 0x25247(%rip), %xmm1    # 0x74ba8
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x255af(%rip), %rcx     # 0x74f20
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4f9a4
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_O1/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 0x4f9d1
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 0x22bd2(%rip), %r9      # 0x725d0
testb $0x3, %cl
sete %cl
cmpl $0x3, %eax
setge %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 0x8ad0
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_O1/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
movabsq $0x1845c8a0ce512957, %rcx # imm = 0x1845C8A0CE512957
movq %rdi, %rax
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xd, %rdx
addq %rax, %rdx
movslq %edx, %r9
imulq $0x166db073, %r9, %rax  # imm = 0x166DB073
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x27, %rax
addl %ecx, %eax
imull $0x5b5, %eax, %ecx      # imm = 0x5B5
subl %ecx, %r9d
leaq 0x22b36(%rip), %r10     # 0x72600
xorl %ecx, %ecx
movl %r9d, %r8d
subl (%r10), %r8d
jl 0x4faeb
incq %rcx
addq $0x4, %r10
movl %r8d, %r9d
cmpq $0x30, %rcx
jne 0x4facf
movl $0x30, %ecx
jmp 0x4faee
movl %r9d, %r8d
movl %ecx, %r9d
movl $0xaaaaaaab, %r10d      # imm = 0xAAAAAAAB
imulq %r9, %r10
shrq $0x23, %r10
leal (%r10,%rax,4), %eax
addl $0x7b2, %eax            # imm = 0x7B2
cvtsi2sd %eax, %xmm1
imull $0xfffeae80, %edx, %eax # imm = 0xFFFEAE80
movsd %xmm1, (%rsi)
shll $0x2, %r10d
leal (%r10,%r10,2), %edx
negl %edx
addl %edx, %ecx
incl %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
movsd %xmm1, 0x8(%rsi)
incl %r8d
xorps %xmm1, %xmm1
cvtsi2sd %r8d, %xmm1
addl %eax, %edi
movsd %xmm1, 0x10(%rsi)
movslq %edi, %rax
imulq $-0x6e5d4c3b, %rax, %rcx # imm = 0x91A2B3C5
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0xb, %ecx
addl %edx, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
movsd %xmm1, 0x18(%rsi)
imull $0xe10, %ecx, %ecx      # imm = 0xE10
movl %eax, %edx
subl %ecx, %edx
movslq %edx, %rcx
imulq $-0x77777777, %rcx, %rdx # imm = 0x88888889
shrq $0x20, %rdx
addl %edx, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
movsd %xmm1, 0x20(%rsi)
imulq $-0x77777777, %rax, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
imull $0x3c, %ecx, %ecx
subl %ecx, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22ae4(%rip), %rdi     # 0x726c0
callq 0x4f9a4
movapd 0x19d47(%rip), %xmm1    # 0x69930
movapd -0x20(%rbp), %xmm2
andpd %xmm2, %xmm1
movsd 0x24fb6(%rip), %xmm0    # 0x74bb0
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
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::time2gpst(bamboo::gtime_t, int*)
extern double time2gpst(gtime_t t, int *week)
{
    gtime_t t0=epoch2time(gpst0);
    time_t sec=t.time-t0.time;
    int w=(int)(sec/(86400*7));
    
    if (week) *week=w;
    return (double)(sec-(double)w*86400*7)+t.sec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movsd %xmm0, -0x18(%rbp)
movq %rdi, %rbx
leaq 0x22a76(%rip), %rdi     # 0x726c0
callq 0x4f9a4
subq %rax, %rbx
movabsq $0x377aef2669de1559, %rcx # imm = 0x377AEF2669DE1559
movq %rbx, %rax
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x11, %rdx
addl %eax, %edx
testq %r14, %r14
je 0x4fc77
movl %edx, (%r14)
cvtsi2sd %rbx, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
mulsd 0x1c175(%rip), %xmm0    # 0x6be00
mulsd 0x1ac4d(%rip), %xmm0    # 0x6a8e0
addsd %xmm1, %xmm0
addsd -0x18(%rbp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::gst2time(int, double)
extern gtime_t gst2time(int week, double sec)
{
    gtime_t t=epoch2time(gst0);
    
    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 0x22a35(%rip), %rdi     # 0x726f0
callq 0x4f9a4
movapd 0x19c68(%rip), %xmm1    # 0x69930
movapd -0x20(%rbp), %xmm2
andpd %xmm2, %xmm1
movsd 0x24ed7(%rip), %xmm0    # 0x74bb0
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
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::time2gst(bamboo::gtime_t, int*)
extern double time2gst(gtime_t t, int *week)
{
    gtime_t t0=epoch2time(gst0);
    time_t sec=t.time-t0.time;
    int w=(int)(sec/(86400*7));
    
    if (week) *week=w;
    return (double)(sec-(double)w*86400*7)+t.sec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movsd %xmm0, -0x18(%rbp)
movq %rdi, %rbx
leaq 0x229c7(%rip), %rdi     # 0x726f0
callq 0x4f9a4
subq %rax, %rbx
movabsq $0x377aef2669de1559, %rcx # imm = 0x377AEF2669DE1559
movq %rbx, %rax
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x11, %rdx
addl %eax, %edx
testq %r14, %r14
je 0x4fd56
movl %edx, (%r14)
cvtsi2sd %rbx, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
mulsd 0x1c096(%rip), %xmm0    # 0x6be00
mulsd 0x1ab6e(%rip), %xmm0    # 0x6a8e0
addsd %xmm1, %xmm0
addsd -0x18(%rbp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::bdt2time(int, double)
extern gtime_t bdt2time(int week, double sec)
{
    gtime_t t=epoch2time(bdt0);
    
    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 0x22986(%rip), %rdi     # 0x72720
callq 0x4f9a4
movapd 0x19b89(%rip), %xmm1    # 0x69930
movapd -0x20(%rbp), %xmm2
andpd %xmm2, %xmm1
movsd 0x24df8(%rip), %xmm0    # 0x74bb0
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
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::time2bdt(bamboo::gtime_t, int*)
extern double time2bdt(gtime_t t, int *week)
{
    gtime_t t0=epoch2time(bdt0);
    time_t sec=t.time-t0.time;
    int w=(int)(sec/(86400*7));
    
    if (week) *week=w;
    return (double)(sec-(double)w*86400*7)+t.sec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movsd %xmm0, -0x18(%rbp)
movq %rdi, %rbx
leaq 0x22918(%rip), %rdi     # 0x72720
callq 0x4f9a4
subq %rax, %rbx
movabsq $0x377aef2669de1559, %rcx # imm = 0x377AEF2669DE1559
movq %rbx, %rax
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x11, %rdx
addl %eax, %edx
testq %r14, %r14
je 0x4fe35
movl %edx, (%r14)
cvtsi2sd %rbx, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
mulsd 0x1bfb7(%rip), %xmm0    # 0x6be00
mulsd 0x1aa8f(%rip), %xmm0    # 0x6a8e0
addsd %xmm1, %xmm0
addsd -0x18(%rbp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::timeget()
extern gtime_t timeget(void)
{
    gtime_t time;
    double ep[6]={0};
#ifdef WIN32
    SYSTEMTIME ts;
    
    GetSystemTime(&ts); /* utc */
    ep[0]=ts.wYear; ep[1]=ts.wMonth;  ep[2]=ts.wDay;
    ep[3]=ts.wHour; ep[4]=ts.wMinute; ep[5]=ts.wSecond+ts.wMilliseconds*1E-3;
#else
    struct timeval tv;
    struct tm *tt;
    
    if (!gettimeofday(&tv,NULL)&&(tt=gmtime(&tv.tv_sec))) {
        ep[0]=tt->tm_year+1900; ep[1]=tt->tm_mon+1; ep[2]=tt->tm_mday;
        ep[3]=tt->tm_hour; ep[4]=tt->tm_min; ep[5]=tt->tm_sec+tv.tv_usec*1E-6;
    }
#endif
    time=epoch2time(ep);
    
#ifdef CPUTIME_IN_GPST /* cputime operated in gpst */
    time=gpst2utc(time);
#endif
    return timeadd(time,timeoffset_);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
xorpd %xmm0, %xmm0
movapd %xmm0, -0x20(%rbp)
movapd %xmm0, -0x30(%rbp)
movapd %xmm0, -0x40(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0x8a40
testl %eax, %eax
jne 0x4ff61
leaq -0x50(%rbp), %rdi
callq 0x8540
testq %rax, %rax
je 0x4ff61
movl $0x76c, %ecx            # imm = 0x76C
addl 0x14(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, -0x40(%rbp)
movl 0x10(%rax), %ecx
incl %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
cvtsi2sdq -0x48(%rbp), %xmm1
mulsd 0x1cce8(%rip), %xmm1    # 0x6cc40
addsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4f9a4
movq %rax, %rbx
addsd 0x42073(%rip), %xmm0    # 0x91fe8
movsd %xmm0, -0x10(%rbp)
callq 0x8ad0
cvttsd2si %xmm0, %eax
cltq
addq %rbx, %rax
movsd -0x10(%rbp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::gpst2utc(bamboo::gtime_t)
extern gtime_t gpst2utc(gtime_t t)
{
    gtime_t tu;
    int i;
    
    for (i=0;leaps[i][0]>0;i++) {
        tu=timeadd(t,leaps[i][6]);
        if (timediff(tu,epoch2time(leaps[i]))>=0.0) return tu;
    }
    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movsd 0x3ecfa(%rip), %xmm1    # 0x8f060
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x503f5
leaq 0x3ece5(%rip), %r14     # 0x8f060
movsd %xmm0, -0x28(%rbp)
movsd 0x30(%r14), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
movapd %xmm1, %xmm0
callq 0x8ad0
cvttsd2si %xmm0, %eax
movslq %eax, %r15
addq %rbx, %r15
movsd -0x20(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
movq %r14, %rdi
callq 0x4f9a4
movsd %xmm0, -0x30(%rbp)
movq %r15, %rdi
movq %rax, %rsi
callq 0x8330
movsd -0x20(%rbp), %xmm2
xorpd %xmm1, %xmm1
addsd %xmm2, %xmm0
subsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jae 0x503fc
movsd 0x38(%r14), %xmm0
addq $0x38, %r14
ucomisd %xmm1, %xmm0
movsd -0x28(%rbp), %xmm0
ja 0x50380
movq %rbx, %r15
movapd %xmm0, %xmm2
movq %r15, %rax
movapd %xmm2, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::utc2gpst(bamboo::gtime_t)
extern gtime_t utc2gpst(gtime_t t)
{
    int i;
    
    for (i=0;leaps[i][0]>0;i++) {
        if (timediff(t,epoch2time(leaps[i]))>=0.0) return timeadd(t,-leaps[i][6]);
    }
    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, -0x18(%rbp)
movq %rdi, %rbx
movsd 0x3ec37(%rip), %xmm0    # 0x8f060
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x504a4
leaq 0x3ec26(%rip), %r14     # 0x8f060
movq %r14, %rdi
callq 0x4f9a4
movsd %xmm0, -0x20(%rbp)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8330
xorpd %xmm1, %xmm1
addsd -0x18(%rbp), %xmm0
subsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jae 0x50478
movsd 0x38(%r14), %xmm0
addq $0x38, %r14
ucomisd %xmm1, %xmm0
ja 0x5043a
jmp 0x504a4
movsd -0x18(%rbp), %xmm0
subsd 0x30(%r14), %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x8ad0
cvttsd2si %xmm0, %eax
cltq
addq %rax, %rbx
movsd -0x18(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movq %rbx, %rax
movsd -0x18(%rbp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::utc2gmst(bamboo::gtime_t, double)
extern double utc2gmst(gtime_t t, double ut1_utc)
{
    const double ep2000[]={2000,1,1,12,0,0};
    gtime_t tut,tut0;
    double ut,t1,t2,t3,gmst0,gmst;
    
    tut=timeadd(t,ut1_utc);
    ut=time2sec(tut,&tut0);
    t1=timediff(tut0,epoch2time(ep2000))/86400.0/36525.0;
    t2=t1*t1; t3=t2*t1;
    gmst0=24110.54841+8640184.812866*t1+0.093104*t2-6.2E-6*t3;
    gmst=gmst0+1.002737909350795*ut;
    
    return fmod(gmst,86400.0)*pi/43200.0; /* 0 <= gmst <= 2*pi */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %r14
xorps %xmm2, %xmm2
leaq -0x60(%rbp), %rbx
movaps %xmm2, (%rbx)
movaps %xmm2, 0x10(%rbx)
movaps %xmm2, 0x20(%rbx)
movabsq $0x409f400000000000, %rax # imm = 0x409F400000000000
movq %rax, (%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movabsq $0x4028000000000000, %rax # imm = 0x4028000000000000
movq %rax, 0x18(%rbx)
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x8ad0
cvttsd2si %xmm0, %eax
movslq %eax, %rdi
addq %r14, %rdi
movsd -0x18(%rbp), %xmm1
subsd %xmm0, %xmm1
leaq -0x90(%rbp), %r14
movapd %xmm1, %xmm0
movq %r14, %rsi
callq 0x4fa81
movsd 0x20(%r14), %xmm0
mulsd 0x1a301(%rip), %xmm0    # 0x6a8b8
movsd 0x18(%r14), %xmm1
mulsd 0x1a2fb(%rip), %xmm1    # 0x6a8c0
addsd %xmm0, %xmm1
addsd 0x28(%r14), %xmm1
movsd %xmm1, -0x18(%rbp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%r14)
movq $0x0, 0x28(%r14)
movq %r14, %rdi
callq 0x4f9a4
movq %rax, %r14
movsd %xmm0, -0x28(%rbp)
movq %rbx, %rdi
callq 0x4f9a4
movsd %xmm0, -0x20(%rbp)
movq %r14, %rdi
movq %rax, %rsi
callq 0x8330
addsd -0x28(%rbp), %xmm0
subsd -0x20(%rbp), %xmm0
movsd 0x1a2b0(%rip), %xmm1    # 0x6a8d0
divsd %xmm1, %xmm0
divsd 0x24594(%rip), %xmm0    # 0x74bc0
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm0, %xmm3
mulsd %xmm2, %xmm3
mulsd 0x24584(%rip), %xmm0    # 0x74bc8
addsd 0x24584(%rip), %xmm0    # 0x74bd0
mulsd 0x24584(%rip), %xmm2    # 0x74bd8
addsd %xmm2, %xmm0
mulsd 0x24580(%rip), %xmm3    # 0x74be0
addsd %xmm3, %xmm0
movsd -0x18(%rbp), %xmm2
mulsd 0x24577(%rip), %xmm2    # 0x74be8
addsd %xmm2, %xmm0
callq 0x8860
mulsd 0x1a28e(%rip), %xmm0    # 0x6a910
divsd 0x1b76e(%rip), %xmm0    # 0x6bdf8
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::time2str(bamboo::gtime_t, char*, int)
extern void time2str(gtime_t t, char *s, int n)
{
    double ep[6];
    
    if (n<0) n=0; else if (n>12) n=12;
    if (1.0-t.sec<0.5/pow(10.0,n)) {t.time++; t.sec=0.0;};
    time2epoch(t,ep);
    sprintf(s,"%04.0f/%02.0f/%02.0f %02.0f:%02.0f:%0*.*f",ep[0],ep[1],ep[2],
            ep[3],ep[4],n<=0?2:n+3,n<=0?0:n,ep[5]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
cmpl $0xc, %edx
movl $0xc, %r13d
cmovll %edx, %r13d
xorl %ebx, %ebx
testl %r13d, %r13d
cmovlel %ebx, %r13d
movsd 0x19252(%rip), %xmm1    # 0x69920
movsd %xmm0, -0x30(%rbp)
subsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
movsd 0x1a3dc(%rip), %xmm0    # 0x6aac8
callq 0x8b30
movsd 0x1b57f(%rip), %xmm1    # 0x6bc78
divsd %xmm0, %xmm1
xorl %edi, %edi
ucomisd -0x38(%rbp), %xmm1
seta %dil
xorpd %xmm0, %xmm0
ja 0x50713
movsd -0x30(%rbp), %xmm0
addq %r12, %rdi
leaq -0x70(%rbp), %r12
movq %r12, %rsi
callq 0x4fa81
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
movsd 0x10(%r12), %xmm2
movsd 0x18(%r12), %xmm3
leal 0x3(%r13), %eax
testl %r15d, %r15d
movl $0x2, %edx
cmovgl %eax, %edx
movsd 0x20(%r12), %xmm4
cmovgl %r13d, %ebx
movsd 0x28(%r12), %xmm5
leaq 0x2492c(%rip), %rsi     # 0x75091
movq %r14, %rdi
movl %ebx, %ecx
movb $0x6, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8120
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::time2doy(bamboo::gtime_t)
extern double time2doy(gtime_t t)
{
    double ep[6];
    
    time2epoch(t,ep);
    ep[1]=ep[2]=1.0; ep[3]=ep[4]=ep[5]=0.0;
    return timediff(t,epoch2time(ep))/86400.0+1.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movsd %xmm0, -0x20(%rbp)
movq %rdi, %rbx
leaq -0x50(%rbp), %r14
movq %r14, %rsi
callq 0x4fa81
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x10(%r14)
movq %rax, 0x8(%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%r14)
movq $0x0, 0x28(%r14)
movq %r14, %rdi
callq 0x4f9a4
movsd %xmm0, -0x18(%rbp)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8330
addsd -0x20(%rbp), %xmm0
subsd -0x18(%rbp), %xmm0
divsd 0x1a0c3(%rip), %xmm0    # 0x6a8d0
addsd 0x1910b(%rip), %xmm0    # 0x69920
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::adjgpsweek(int)
extern int adjgpsweek(int week)
{
    int w;
    (void)time2gpst(utc2gpst(timeget()),&w);
    if (w<1560) w=1560; /* use 2009/12/1 if time is earlier than 2009/12/1 */
    return week+(w-week+512)/1024*1024;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x4febe
movq %rax, %rdi
callq 0x5040e
movq %rax, %r14
leaq 0x21e82(%rip), %rdi     # 0x726c0
callq 0x4f9a4
subq %rax, %r14
movabsq $0x377aef2669de1559, %rcx # imm = 0x377AEF2669DE1559
movq %r14, %rax
imulq %rcx
movq %rdx, %rcx
shrq $0x3f, %rcx
shrq $0x11, %rdx
addl %edx, %ecx
cmpl $0x619, %ecx            # imm = 0x619
movl $0x618, %eax            # imm = 0x618
cmovgel %ecx, %eax
subl %ebx, %eax
leal 0x200(%rax), %ecx
addl $0x5ff, %eax            # imm = 0x5FF
testl %ecx, %ecx
cmovnsl %ecx, %eax
andl $0xfffffc00, %eax       # imm = 0xFFFFFC00
addl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::tickget()
extern unsigned int tickget(void)
{
#ifdef WIN32
    return (unsigned int)timeGetTime();
#else
    struct timespec tp={0};
    struct timeval  tv={0};
    
#ifdef CLOCK_MONOTONIC_RAW
    /* linux kernel > 2.6.28 */
    if (!clock_gettime(CLOCK_MONOTONIC_RAW,&tp)) {
        return tp.tv_sec*1000u+tp.tv_nsec/1000000u;
    }
    else {
        gettimeofday(&tv,NULL);
        return tv.tv_sec*1000u+tv.tv_usec/1000u;
    }
#else
    gettimeofday(&tv,NULL);
    return tv.tv_sec*1000u+tv.tv_usec/1000u;
#endif
#endif /* WIN32 */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rbx
movaps %xmm0, (%rbx)
movaps %xmm0, -0x20(%rbp)
movl $0x4, %edi
movq %rbx, %rsi
callq 0x85a0
testl %eax, %eax
je 0x508cc
leaq -0x20(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8a40
movl $0x3e8, %ecx            # imm = 0x3E8
jmp 0x508d1
movl $0xf4240, %ecx          # imm = 0xF4240
imull $0x3e8, (%rbx), %esi    # imm = 0x3E8
movq 0x8(%rbx), %rax
cqto
idivq %rcx
addl %esi, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::sleepms(int)
extern void sleepms(int ms)
{
#ifdef WIN32
    if (ms<5) Sleep(1); else Sleep(ms);
#else
    struct timespec ts;
    if (ms<=0) return;
    ts.tv_sec=(time_t)(ms/1000);
    ts.tv_nsec=(long)(ms%1000*1000000);
    nanosleep(&ts,NULL);
#endif
}

// Assembly:
testl %edi, %edi
jle 0x5092a
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, %eax
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
shrq $0x26, %rcx
leaq -0x10(%rbp), %rax
movq %rcx, (%rax)
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
subl %ecx, %edi
imull $0xf4240, %edi, %ecx    # imm = 0xF4240
movq %rcx, 0x8(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x81d0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::deg2dms(double, double*, int)
extern void deg2dms(double deg, double *dms, int ndec)
{
    double sign=deg<0.0?-1.0:1.0,a=fabs(deg);
    double unit=pow(0.1,ndec);
    dms[0]=floor(a); a=(a-dms[0])*60.0;
    dms[1]=floor(a); a=(a-dms[1])*60.0;
    dms[2]=floor(a/unit+0.5)*unit;
    if (dms[2]>=60.0) {
        dms[2]=0.0;
        dms[1]+=1.0;
        if (dms[1]>=60.0) {
            dms[1]=0.0;
            dms[0]+=1.0;
        }
    }
    dms[0]*=sign;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movaps 0x18ff2(%rip), %xmm1    # 0x69930
movaps %xmm0, -0x40(%rbp)
andps %xmm0, %xmm1
movaps %xmm1, -0x20(%rbp)
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
movsd 0x1b430(%rip), %xmm0    # 0x6bd88
callq 0x8b30
movsd %xmm0, -0x10(%rbp)
movapd -0x20(%rbp), %xmm0
callq 0x8ad0
movsd %xmm0, (%rbx)
movsd %xmm0, -0x28(%rbp)
movapd -0x20(%rbp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x19f32(%rip), %xmm1    # 0x6a8b8
movapd %xmm1, -0x20(%rbp)
movapd %xmm1, %xmm0
callq 0x8ad0
movsd %xmm0, 0x8(%rbx)
movapd -0x20(%rbp), %xmm1
movsd %xmm0, -0x30(%rbp)
subsd %xmm0, %xmm1
mulsd 0x19f09(%rip), %xmm1    # 0x6a8b8
divsd -0x10(%rbp), %xmm1
addsd 0x1b2bc(%rip), %xmm1    # 0x6bc78
movapd %xmm1, %xmm0
callq 0x8ad0
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x10(%rbx)
ucomisd 0x19ee1(%rip), %xmm0    # 0x6a8b8
jb 0x50a16
movq $0x0, 0x10(%rbx)
movsd -0x30(%rbp), %xmm0
addsd 0x18f32(%rip), %xmm0    # 0x69920
movsd %xmm0, 0x8(%rbx)
ucomisd 0x19ebd(%rip), %xmm0    # 0x6a8b8
jb 0x50a16
movq $0x0, 0x8(%rbx)
movsd -0x28(%rbp), %xmm0
addsd 0x18f0e(%rip), %xmm0    # 0x69920
movsd %xmm0, (%rbx)
movsd (%rbx), %xmm0
movapd 0x1a0ae(%rip), %xmm1    # 0x6aad0
xorpd %xmm0, %xmm1
xorpd %xmm2, %xmm2
movapd -0x40(%rbp), %xmm3
cmpltsd %xmm2, %xmm3
andpd %xmm3, %xmm1
andnpd %xmm0, %xmm3
orpd %xmm1, %xmm3
movlpd %xmm3, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::ecef2pos(double const*, double*)
extern void ecef2pos(const double *r, double *pos)
{
    double e2=FE_WGS84*(2.0-FE_WGS84),r2=rtk_dot(r,r,2),z,zk,v=RE_WGS84,sinp;
    
    for (z=r[2],zk=0.0;fabs(z-zk)>=1E-4;) {
        zk=z;
        sinp=z/sqrt(r2+z*z);
        v=RE_WGS84/sqrt(1.0-e2*sinp*sinp);
        z=r[2]+v*e2*sinp;
    }
    pos[0]=r2>1E-12?atan(z/sqrt(r2)):(r[2]>0.0?pi/2.0:-pi/2.0);
    pos[1]=r2>1E-12?atan2(r[1],r[0]):0.0;
    pos[2]=sqrt(r2+z*z)-v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm2, %xmm2
movl $0x3, %eax
movsd -0x10(%r14,%rax,8), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm0, %xmm2
decq %rax
cmpq $0x1, %rax
ja 0x50ac2
movsd 0x10(%r14), %xmm1
movapd 0x18e48(%rip), %xmm0    # 0x69930
andpd %xmm1, %xmm0
ucomisd 0x19e2c(%rip), %xmm0    # 0x6a920
movsd %xmm2, -0x20(%rbp)
jae 0x50b08
movsd 0x19df5(%rip), %xmm3    # 0x6a8f8
jmp 0x50bc8
xorpd %xmm4, %xmm4
movapd %xmm1, %xmm5
movapd %xmm5, %xmm0
mulsd %xmm5, %xmm0
addsd %xmm2, %xmm0
ucomisd %xmm4, %xmm0
movsd %xmm5, -0x18(%rbp)
jb 0x50b2d
sqrtsd %xmm0, %xmm0
jmp 0x50b3b
callq 0x84e0
movsd -0x18(%rbp), %xmm5
xorpd %xmm4, %xmm4
movapd %xmm5, %xmm6
divsd %xmm0, %xmm6
movapd %xmm6, %xmm0
mulsd 0x240a1(%rip), %xmm0    # 0x74bf0
mulsd %xmm6, %xmm0
addsd 0x18dc5(%rip), %xmm0    # 0x69920
ucomisd %xmm4, %xmm0
jb 0x50b67
sqrtsd %xmm0, %xmm0
jmp 0x50b7f
movsd %xmm6, -0x30(%rbp)
callq 0x84e0
movsd -0x30(%rbp), %xmm6
movsd -0x18(%rbp), %xmm5
xorpd %xmm4, %xmm4
movsd -0x20(%rbp), %xmm2
movsd 0x19d6c(%rip), %xmm3    # 0x6a8f8
divsd %xmm0, %xmm3
movapd %xmm3, %xmm1
mulsd 0x2405c(%rip), %xmm1    # 0x74bf8
mulsd %xmm6, %xmm1
addsd 0x10(%r14), %xmm1
movapd %xmm1, %xmm0
subsd %xmm5, %xmm0
andpd 0x18d7a(%rip), %xmm0    # 0x69930
ucomisd 0x19d62(%rip), %xmm0    # 0x6a920
movapd %xmm1, %xmm5
jae 0x50b10
ucomisd 0x24030(%rip), %xmm2    # 0x74c00
movsd %xmm3, -0x18(%rbp)
movapd %xmm1, -0x30(%rbp)
jbe 0x50bef
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0x50c10
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0x50c1e
movsd 0x10(%r14), %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
seta %al
leaq 0x24327(%rip), %rcx     # 0x74f30
movsd (%rcx,%rax,8), %xmm0
jmp 0x50c35
movapd %xmm2, %xmm0
callq 0x84e0
movapd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x8510
movsd -0x20(%rbp), %xmm2
movsd -0x18(%rbp), %xmm3
ucomisd 0x23fc3(%rip), %xmm2    # 0x74c00
movsd %xmm0, (%rbx)
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
jbe 0x50c69
movsd (%r14), %xmm1
movsd 0x8(%r14), %xmm0
callq 0x80d0
xorpd %xmm1, %xmm1
movsd -0x18(%rbp), %xmm3
movsd -0x20(%rbp), %xmm2
movsd %xmm0, 0x8(%rbx)
movapd -0x30(%rbp), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x50c87
sqrtsd %xmm0, %xmm0
jmp 0x50c91
callq 0x84e0
movsd -0x18(%rbp), %xmm3
subsd %xmm3, %xmm0
movsd %xmm0, 0x10(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::pos2ecef(double const*, double*)
extern void pos2ecef(const double *pos, double *r)
{
    double sinp=sin(pos[0]),cosp=cos(pos[0]),sinl=sin(pos[1]),cosl=cos(pos[1]);
    double e2=FE_WGS84*(2.0-FE_WGS84),v=RE_WGS84/sqrt(1.0-e2*sinp*sinp);
    
    r[0]=(v+pos[2])*cosp*cosl;
    r[1]=(v+pos[2])*cosp*sinl;
    r[2]=(v*(1.0-e2)+pos[2])*sinp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movsd (%rdi), %xmm0
callq 0x8150
movsd %xmm0, -0x18(%rbp)
movsd (%r14), %xmm0
callq 0x8c00
movsd %xmm0, -0x30(%rbp)
movsd 0x8(%r14), %xmm0
callq 0x8150
movsd %xmm0, -0x28(%rbp)
movsd 0x8(%r14), %xmm0
callq 0x8c00
movsd 0x23efc(%rip), %xmm1    # 0x74bf0
movsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x18c17(%rip), %xmm1    # 0x69920
movapd %xmm0, %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x50d20
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x50d33
movapd %xmm1, %xmm0
movsd %xmm3, -0x20(%rbp)
callq 0x84e0
movsd -0x20(%rbp), %xmm3
movsd 0x19bbd(%rip), %xmm1    # 0x6a8f8
divsd %xmm0, %xmm1
movsd 0x10(%r14), %xmm0
addsd %xmm1, %xmm0
movsd -0x30(%rbp), %xmm2
mulsd %xmm2, %xmm0
mulsd %xmm0, %xmm3
movsd %xmm3, (%rbx)
movsd 0x10(%r14), %xmm0
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
movsd -0x28(%rbp), %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rbx)
mulsd 0x23e8a(%rip), %xmm1    # 0x74c08
addsd 0x10(%r14), %xmm1
movsd -0x18(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::xyz2enu(double const*, double*)
extern void xyz2enu(const double *pos, double *E)
{
    double sinp=sin(pos[0]),cosp=cos(pos[0]),sinl=sin(pos[1]),cosl=cos(pos[1]);
    
    E[0]=-sinl;      E[3]=cosl;       E[6]=0.0;
    E[1]=-sinp*cosl; E[4]=-sinp*sinl; E[7]=cosp;
    E[2]=cosp*cosl;  E[5]=cosp*sinl;  E[8]=sinp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movsd (%rdi), %xmm0
callq 0x8150
movaps %xmm0, -0x40(%rbp)
movsd (%r14), %xmm0
callq 0x8c00
movsd %xmm0, -0x18(%rbp)
movsd 0x8(%r14), %xmm0
callq 0x8150
movaps %xmm0, -0x30(%rbp)
movsd 0x8(%r14), %xmm0
callq 0x8c00
movapd 0x19ce6(%rip), %xmm1    # 0x6aad0
movapd -0x30(%rbp), %xmm5
movapd %xmm5, %xmm2
xorpd %xmm1, %xmm2
movlpd %xmm2, (%rbx)
movsd %xmm0, 0x18(%rbx)
movq $0x0, 0x30(%rbx)
movapd -0x40(%rbp), %xmm3
xorpd %xmm3, %xmm1
movsd -0x18(%rbp), %xmm4
movapd %xmm4, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rbx)
mulsd %xmm5, %xmm1
movsd %xmm1, 0x20(%rbx)
movsd %xmm4, 0x38(%rbx)
movsd %xmm2, 0x10(%rbx)
mulsd %xmm5, %xmm4
movsd %xmm4, 0x28(%rbx)
movsd %xmm3, 0x40(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::covenu(double const*, double const*, double*)
extern void covenu(const double *pos, const double *P, double *Q)
{
    double E[9],EP[9];
    
    xyz2enu(pos,E);
    matmul("NN",3,3,3,1.0,E,P,0.0,EP);
    matmul("NT",3,3,3,1.0,EP,E,0.0,Q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movsd (%rdi), %xmm0
callq 0x8150
movaps %xmm0, -0x50(%rbp)
movsd (%r15), %xmm0
callq 0x8c00
movsd %xmm0, -0x28(%rbp)
movsd 0x8(%r15), %xmm0
callq 0x8150
movaps %xmm0, -0x40(%rbp)
movsd 0x8(%r15), %xmm0
callq 0x8c00
movapd 0x19a26(%rip), %xmm1    # 0x6aad0
movapd -0x40(%rbp), %xmm5
movapd %xmm5, %xmm2
xorpd %xmm1, %xmm2
leaq -0xf0(%rbp), %r15
movlpd %xmm2, (%r15)
movsd %xmm0, 0x18(%r15)
movq $0x0, 0x30(%r15)
movapd -0x50(%rbp), %xmm3
xorpd %xmm3, %xmm1
movsd -0x28(%rbp), %xmm4
movapd %xmm4, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%r15)
mulsd %xmm5, %xmm1
movsd %xmm1, 0x20(%r15)
movsd %xmm4, 0x38(%r15)
movsd %xmm2, 0x10(%r15)
mulsd %xmm5, %xmm4
movsd %xmm4, 0x28(%r15)
movsd %xmm3, 0x40(%r15)
leaq -0xa0(%rbp), %r12
movq %r12, (%rsp)
leaq 0x23f5e(%rip), %rdi     # 0x75087
movsd 0x187ef(%rip), %xmm0    # 0x69920
xorpd %xmm1, %xmm1
movl $0x3, %esi
movl $0x3, %edx
movl $0x3, %ecx
movq %r15, %r8
movq %r14, %r9
callq 0x4e91f
movq %rbx, (%rsp)
leaq 0x27941(%rip), %rdi     # 0x78a9b
xorpd %xmm1, %xmm1
movl $0x3, %esi
movl $0x3, %edx
movl $0x3, %ecx
movsd 0x187ab(%rip), %xmm0    # 0x69920
movq %r12, %r8
movq %r15, %r9
callq 0x4e91f
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::covecef(double const*, double const*, double*)
extern void covecef(const double *pos, const double *Q, double *P)
{
    double E[9],EQ[9];
    
    xyz2enu(pos,E);
    matmul("TN",3,3,3,1.0,E,Q,0.0,EQ);
    matmul("NN",3,3,3,1.0,EQ,E,0.0,P);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movsd (%rdi), %xmm0
callq 0x8150
movaps %xmm0, -0x50(%rbp)
movsd (%r15), %xmm0
callq 0x8c00
movsd %xmm0, -0x28(%rbp)
movsd 0x8(%r15), %xmm0
callq 0x8150
movaps %xmm0, -0x40(%rbp)
movsd 0x8(%r15), %xmm0
callq 0x8c00
movapd 0x198e7(%rip), %xmm1    # 0x6aad0
movapd -0x40(%rbp), %xmm5
movapd %xmm5, %xmm2
xorpd %xmm1, %xmm2
leaq -0xf0(%rbp), %r15
movlpd %xmm2, (%r15)
movsd %xmm0, 0x18(%r15)
movq $0x0, 0x30(%r15)
movapd -0x50(%rbp), %xmm3
xorpd %xmm3, %xmm1
movsd -0x28(%rbp), %xmm4
movapd %xmm4, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%r15)
mulsd %xmm5, %xmm1
movsd %xmm1, 0x20(%r15)
movsd %xmm4, 0x38(%r15)
movsd %xmm2, 0x10(%r15)
mulsd %xmm5, %xmm4
movsd %xmm4, 0x28(%r15)
movsd %xmm3, 0x40(%r15)
leaq -0xa0(%rbp), %r12
movq %r12, (%rsp)
leaq 0x1b9f8(%rip), %rdi     # 0x6cc60
movsd 0x186b0(%rip), %xmm0    # 0x69920
xorpd %xmm1, %xmm1
movl $0x3, %esi
movl $0x3, %edx
movl $0x3, %ecx
movq %r15, %r8
movq %r14, %r9
callq 0x4e91f
movq %rbx, (%rsp)
leaq 0x23dee(%rip), %rdi     # 0x75087
xorpd %xmm1, %xmm1
movl $0x3, %esi
movl $0x3, %edx
movl $0x3, %ecx
movsd 0x1866c(%rip), %xmm0    # 0x69920
movq %r12, %r8
movq %r15, %r9
callq 0x4e91f
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::ast_args(double, double*)
static void ast_args(double t, double *f)
{
    static const double fc[][5]={ /* coefficients for iau 1980 nutation */
        { 134.96340251, 1717915923.2178,  31.8792,  0.051635, -0.00024470},
        { 357.52910918,  129596581.0481,  -0.5532,  0.000136, -0.00001149},
        {  93.27209062, 1739527262.8478, -12.7512, -0.001037,  0.00000417},
        { 297.85019547, 1602961601.2090,  -6.3706,  0.006593, -0.00003169},
        { 125.04455501,   -6962890.2665,   7.4722,  0.007702, -0.00005939}
    };
    double tt[4];
    int i,j;
    
    for (tt[0]=t,i=1;i<4;i++) tt[i]=tt[i-1]*t;
    for (i=0;i<5;i++) {
        f[i]=fc[i][0]*3600.0;
        for (j=0;j<4;j++) f[i]+=fc[i][j+1]*tt[j];
        f[i]=fmod(f[i]*AS2R,2.0*pi);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movsd %xmm0, -0x40(%rbp)
movl $0x1, %eax
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x51c09
leaq 0x20ba5(%rip), %r14     # 0x727c8
xorl %r15d, %r15d
leaq 0x20b93(%rip), %r12     # 0x727c0
leaq (%r15,%r15,4), %rax
movsd (%r12,%rax,8), %xmm0
mulsd 0x18c81(%rip), %xmm0    # 0x6a8c0
xorl %eax, %eax
movsd (%r14,%rax,8), %xmm1
mulsd -0x40(%rbp,%rax,8), %xmm1
leaq 0x1(%rax), %rcx
addsd %xmm1, %xmm0
movq %rcx, %rax
cmpq $0x4, %rcx
jne 0x51c41
movsd %xmm0, (%rbx,%r15,8)
mulsd 0x22fdc(%rip), %xmm0    # 0x74c48
movsd 0x18ca4(%rip), %xmm1    # 0x6a918
callq 0x8860
movsd %xmm0, (%rbx,%r15,8)
incq %r15
addq $0x28, %r14
cmpq $0x5, %r15
jne 0x51c2d
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satwavelen(int, int, bamboo::nav_t const*)
extern double satwavelen(int sat, int frq, const nav_t *nav)
{
    const double freq_glo[]={FREQ1_GLO,FREQ2_GLO};
    const double dfrq_glo[]={DFRQ1_GLO,DFRQ2_GLO};
    int i,sys=satsys(sat,NULL);
    
    if (sys==SYS_GLO) {
        if (0<=frq&&frq<=1) { /* L1,L2 */
            for (i=0;i<nav->ng;i++) {
                if (nav->geph[i].sat!=sat) continue;
                return CLIGHT/(freq_glo[frq]+dfrq_glo[frq]*nav->geph[i].frq);
            }
        }
        else if (frq==2) { /* L3 */
            return CLIGHT/FREQ3_GLO;
        }
    }
    else if (sys==SYS_CMP) {
        if      (frq==0) return CLIGHT/FREQ1_CMP; /* B1 */
        else if (frq==1) return CLIGHT/FREQ2_CMP; /* B2 */
        else if (frq==2) return CLIGHT/FREQ3_CMP; /* B3 */
    }
    else if (sys==SYS_GAL) {
        if      (frq==0) return CLIGHT/FREQ1; /* E1 */
        else if (frq==1) return CLIGHT/FREQ7; /* E5b */
        else if (frq==2) return CLIGHT/FREQ5; /* E5a */
        else if (frq==3) return CLIGHT/FREQ6; /* E6 */
        else if (frq==5) return CLIGHT/FREQ8; /* E5ab */
    }
    else { /* GPS,QZS */
        if      (frq==0) return CLIGHT/FREQ1; /* L1 */
        else if (frq==1) return CLIGHT/FREQ2; /* L2 */
        else if (frq==2) return CLIGHT/FREQ5; /* L5 */
        else if (frq==3) return CLIGHT/FREQ6; /* L6/LEX */
        else if (frq==6) return CLIGHT/FREQ9; /* S */
    }
    return 0.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal -0x9c(%rdi), %ecx
xorl %eax, %eax
cmpl $0xffffff65, %ecx       # imm = 0xFFFFFF65
jb 0x530e7
movl $0x1, %eax
cmpl $0x21, %edi
jl 0x530e7
movl $0x4, %eax
cmpl $0x3c, %edi
jl 0x530e7
movl $0x8, %eax
cmpl $0x60, %edi
jl 0x530e7
cmpl $0x85, %edi
movl $0x20, %ecx
movl $0x2, %eax
cmovll %ecx, %eax
cmpl $0x20, %eax
je 0x53134
cmpl $0x8, %eax
je 0x53124
cmpl $0x4, %eax
jne 0x53144
cmpl $0x1, %esi
ja 0x53159
movslq 0x8(%rdx), %rcx
testq %rcx, %rcx
jle 0x53168
movq 0x48(%rdx), %rax
imulq $0x98, %rcx, %rdx
xorl %ecx, %ecx
cmpl %edi, (%rax,%rcx)
je 0x5316e
addq $0x98, %rcx
cmpq %rcx, %rdx
jne 0x53111
jmp 0x53168
cmpl $0x6, %esi
jae 0x53168
movl %esi, %eax
leaq 0x219fe(%rip), %rcx     # 0x74b30
jmp 0x53152
cmpl $0x3, %esi
jae 0x53168
movl %esi, %eax
leaq 0x219d6(%rip), %rcx     # 0x74b18
jmp 0x53152
cmpl $0x7, %esi
jae 0x53168
movl %esi, %eax
leaq 0x21a0e(%rip), %rcx     # 0x74b60
movsd (%rcx,%rax,8), %xmm0
jmp 0x5316c
cmpl $0x2, %esi
jne 0x53168
movsd 0x21b52(%rip), %xmm0    # 0x74cb8
jmp 0x5316c
xorpd %xmm0, %xmm0
popq %rbp
retq
movl %esi, %edx
leaq 0x1bc49(%rip), %rsi     # 0x6edc0
leaq 0x1bc32(%rip), %rdi     # 0x6edb0
cvtsi2sdl 0x8(%rax,%rcx), %xmm1
mulsd (%rdi,%rdx,8), %xmm1
addsd (%rsi,%rdx,8), %xmm1
movsd 0x18c0a(%rip), %xmm0    # 0x6bda0
divsd %xmm1, %xmm0
jmp 0x5316c