LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %edx
movl $0x4, %edi
leaq 0x3b6b3(%rip), %rsi     # 0xc7908
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8c2c6
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
xorl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x8, -0x18(%rbp)
jge 0x8c2b9
movl -0x10(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8c2a4
movl -0x10(%rbp), %eax
shrl %eax
xorl $0xedb88320, %eax       # imm = 0xEDB88320
movl %eax, -0x10(%rbp)
jmp 0x8c2ac
movl -0x10(%rbp), %eax
shrl %eax
movl %eax, -0x10(%rbp)
jmp 0x8c2ae
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8c284
jmp 0x8c2bb
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8c263
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %edx
movl $0x4, %edi
leaq 0x3b626(%rip), %rsi     # 0xc791b
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8c346
movl -0x10(%rbp), %eax
shll $0x8, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl -0x10(%rbp), %ecx
shrl $0x10, %ecx
movq -0x8(%rbp), %rdx
movslq -0x14(%rbp), %rsi
movzbl (%rdx,%rsi), %edx
xorl %edx, %ecx
movl %ecx, %ecx
movl %ecx, %edx
leaq 0x37fbb(%rip), %rcx     # 0xc42f0
xorl (%rcx,%rdx,4), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8c303
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw $0x0, -0xe(%rbp)
movl -0xc(%rbp), %edx
movl $0x4, %edi
leaq 0x3b5bb(%rip), %rsi     # 0xc792f
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8c3cb
movzwl -0xe(%rbp), %eax
shll $0x8, %eax
movzwl -0xe(%rbp), %ecx
sarl $0x8, %ecx
movq -0x8(%rbp), %rdx
movslq -0x14(%rbp), %rsi
movzbl (%rdx,%rsi), %edx
xorl %edx, %ecx
andl $0xff, %ecx
movslq %ecx, %rdx
leaq 0x3833a(%rip), %rcx     # 0xc46f0
movzwl (%rcx,%rdx,2), %ecx
xorl %ecx, %eax
movw %ax, -0xe(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8c382
movw -0xe(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x384fa(%rip), %rax     # 0xc48f0
movq %rax, -0x30(%rbp)
movq 0x384f7(%rip), %rax     # 0xc48f8
movq %rax, -0x28(%rbp)
movq 0x384f4(%rip), %rax     # 0xc4900
movq %rax, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x8(%rbp), %edx
movl $0x5, %edi
leaq 0x3b51c(%rip), %rsi     # 0xc7942
movb $0x0, %al
callq 0x8b980
movl -0x8(%rbp), %eax
andl $0x40000000, %eax       # imm = 0x40000000
cmpl $0x0, %eax
je 0x8c445
movl -0x8(%rbp), %eax
xorl $0x3fffffc0, %eax       # imm = 0x3FFFFFC0
movl %eax, -0x8(%rbp)
movl $0x0, -0x3c(%rbp)
cmpl $0x6, -0x3c(%rbp)
jge 0x8c494
movl -0x34(%rbp), %eax
shll %eax
movl %eax, -0x34(%rbp)
movl -0x8(%rbp), %eax
movslq -0x3c(%rbp), %rcx
andl -0x30(%rbp,%rcx,4), %eax
shrl $0x6, %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x8c487
movl -0x38(%rbp), %eax
andl $0x1, %eax
xorl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x38(%rbp), %eax
shrl %eax
movl %eax, -0x38(%rbp)
jmp 0x8c46b
jmp 0x8c489
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8c44c
movl -0x34(%rbp), %eax
movl -0x8(%rbp), %ecx
andl $0x3f, %ecx
cmpl %ecx, %eax
je 0x8c4aa
movl $0x0, -0x4(%rbp)
jmp 0x8c4e8
movl $0x0, -0x3c(%rbp)
cmpl $0x3, -0x3c(%rbp)
jge 0x8c4e1
movl -0x8(%rbp), %eax
movl -0x3c(%rbp), %edx
shll $0x3, %edx
movl $0x16, %ecx
subl %edx, %ecx
shrl %cl, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8c4b1
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x8c51a
cmpl $0x0, -0x10(%rbp)
jg 0x8c524
movq $0x0, -0x8(%rbp)
jmp 0x8c55f
movslq -0xc(%rbp), %rdi
shlq $0x3, %rdi
movslq -0x10(%rbp), %rax
imulq %rax, %rdi
callq 0x99e0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x8c557
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
leaq 0x3b411(%rip), %rdi     # 0xc7961
movb $0x0, %al
callq 0x8c570
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 $0x4e0, %rsp            # imm = 0x4E0
testb %al, %al
je 0x8c5b7
movaps %xmm0, -0x4b0(%rbp)
movaps %xmm1, -0x4a0(%rbp)
movaps %xmm2, -0x490(%rbp)
movaps %xmm3, -0x480(%rbp)
movaps %xmm4, -0x470(%rbp)
movaps %xmm5, -0x460(%rbp)
movaps %xmm6, -0x450(%rbp)
movaps %xmm7, -0x440(%rbp)
movq %r9, -0x4b8(%rbp)
movq %r8, -0x4c0(%rbp)
movq %rcx, -0x4c8(%rbp)
movq %rdx, -0x4d0(%rbp)
movq %rsi, -0x4d8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x430(%rbp), %rax
leaq -0x4e0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq -0x410(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x430(%rbp), %rdx
callq 0x9340
leaq -0x430(%rbp), %rax
cmpq $0x0, 0x6f585(%rip)     # 0xfbbb0
je 0x8c63f
movq 0x6f57c(%rip), %rax     # 0xfbbb0
leaq -0x410(%rbp), %rdi
callq *%rax
jmp 0x8c65e
movq 0x6a982(%rip), %rax     # 0xf6fc8
movq (%rax), %rdi
leaq -0x410(%rbp), %rdx
leaq 0x3c790(%rip), %rsi     # 0xc8de7
movb $0x0, %al
callq 0x9a90
movl $0xfffffff7, %edi       # imm = 0xFFFFFFF7
callq 0x9910
nopl (%rax,%rax)
// File: 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
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x8c68a
cmpl $0x0, -0x10(%rbp)
jg 0x8c694
movq $0x0, -0x8(%rbp)
jmp 0x8c6cf
movslq -0xc(%rbp), %rdi
shlq $0x2, %rdi
movslq -0x10(%rbp), %rax
imulq %rax, %rdi
callq 0x99e0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x8c6c7
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
leaq 0x3b299(%rip), %rdi     # 0xc7959
movb $0x0, %al
callq 0x8c570
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x8c6fa
cmpl $0x0, -0x10(%rbp)
jg 0x8c704
movq $0x0, -0x8(%rbp)
jmp 0x8c73e
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
movslq %eax, %rsi
movl $0x8, %edi
callq 0x94f0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x8c736
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
leaq 0x3b232(%rip), %rdi     # 0xc7961
movb $0x0, %al
callq 0x8c570
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x8c820
movaps %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jb 0x8c988
movl $0x0, -0x4(%rbp)
jmp 0x8c9d2
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
divsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
divsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm0
divsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::matinv(double*, int)
extern int matinv(double *A, int n)
{
    double d,*B;
    int i,j,*indx;
    
    indx=imat(n,1); B=mat(n,n); matcpy(B,A,n,n);
    if (ludcmp(B,n,indx,&d)) {free(indx); free(B); return -1;}
    for (j=0;j<n;j++) {
        for (i=0;i<n;i++) A[i+j*n]=0.0;
        A[j+j*n]=1.0;
        lubksb(B,n,indx,A+j*n);
    }
    free(indx); free(B);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %edi
movl $0x1, %esi
callq 0x8c670
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %edi
movl -0x14(%rbp), %esi
callq 0x8c500
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x8c9e0
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x38(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x8ce50
cmpl $0x0, %eax
je 0x8cd89
movq -0x38(%rbp), %rdi
callq 0x9900
movq -0x28(%rbp), %rdi
callq 0x9900
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8ce3c
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8ce23
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8cdd1
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %edx
imull -0x14(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8cda3
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
movl -0x30(%rbp), %edx
imull -0x14(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movsd 0x2f074(%rip), %xmm0    # 0xbbe60
movsd %xmm0, (%rax,%rcx,8)
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl -0x30(%rbp), %eax
imull -0x14(%rbp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rcx
callq 0x8d300
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8cd90
movq -0x38(%rbp), %rdi
callq 0x9900
movq -0x28(%rbp), %rdi
callq 0x9900
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl -0x1c(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x8c500
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x8c9e0
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x8cd10
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jne 0x8d588
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
jne 0x8d54e
leaq 0x3a444(%rip), %rax     # 0xc798c
movq %rax, -0x40(%rbp)
jmp 0x8d55b
leaq 0x31893(%rip), %rax     # 0xbede8
movq %rax, -0x40(%rbp)
jmp 0x8d55b
movq -0x40(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %r9
movq -0x28(%rbp), %rax
movsd 0x2e8e4(%rip), %xmm0    # 0xbbe60
xorps %xmm1, %xmm1
movq %rax, (%rsp)
callq 0x8ca20
movq -0x30(%rbp), %rdi
callq 0x9900
movl -0x34(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8d5d2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8d69a
movl -0x1c(%rbp), %edi
movl $0x1, %esi
callq 0x8c500
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %r9
movq -0x38(%rbp), %rax
leaq 0x3a390(%rip), %rdi     # 0xc798c
movl $0x1, %edx
movsd 0x2e857(%rip), %xmm0    # 0xbbe60
xorps %xmm1, %xmm1
movq %rax, (%rsp)
callq 0x8ca20
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %r8
movq -0x10(%rbp), %r9
movq -0x30(%rbp), %rax
leaq 0x3e1ba(%rip), %rdi     # 0xcb7eb
movsd 0x2e827(%rip), %xmm0    # 0xbbe60
xorps %xmm1, %xmm1
movq %rax, (%rsp)
callq 0x8ca20
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x8cd10
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jne 0x8d68b
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x28(%rbp), %rax
leaq 0x3a31a(%rip), %rdi     # 0xc798c
movl $0x1, %edx
movsd 0x2e7e1(%rip), %xmm0    # 0xbbe60
xorps %xmm1, %xmm1
movq %rax, (%rsp)
callq 0x8ca20
movq -0x38(%rbp), %rdi
callq 0x9900
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8de26
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x8de09
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %r8d
imull -0xc(%rbp), %r8d
addl %r8d, %esi
movslq %esi, %rsi
movsd (%rax,%rsi,8), %xmm0
leaq 0x39b98(%rip), %rsi     # 0xc798f
movb $0x1, %al
callq 0x9a90
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8ddc3
movq -0x20(%rbp), %rdi
leaq 0x3bddf(%rip), %rsi     # 0xc9bf3
movb $0x0, %al
callq 0x9a90
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8ddb4
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x128(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x8deb1
movq -0x10(%rbp), %rdi
callq 0x92e0
cmpl -0x14(%rbp), %eax
jl 0x8deb1
movl $0xff, %eax
cmpl -0x18(%rbp), %eax
jge 0x8debe
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x8dfae
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x129(%rbp)
je 0x8def5
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
setge %al
movb %al, -0x129(%rbp)
movb -0x129(%rbp), %al
testb $0x1, %al
jne 0x8df01
jmp 0x8df5d
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x64, %eax
je 0x8df19
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x44, %eax
jne 0x8df23
movb $0x45, %al
movb %al, -0x12a(%rbp)
jmp 0x8df2f
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x12a(%rbp)
movb -0x12a(%rbp), %cl
movq -0x128(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x128(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x8decf
movq -0x128(%rbp), %rax
movb $0x0, (%rax)
leaq -0x120(%rbp), %rdi
leaq 0x3a19f(%rip), %rsi     # 0xc8114
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0x9750
cmpl $0x1, %eax
jne 0x8df94
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x138(%rbp)
jmp 0x8dfa1
xorps %xmm0, %xmm0
movsd %xmm0, -0x138(%rbp)
jmp 0x8dfa1
movsd -0x138(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x150(%rbp), %rax
movq %rax, -0x158(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x8e005
movq -0x10(%rbp), %rdi
callq 0x92e0
cmpl -0x14(%rbp), %eax
jl 0x8e005
movl $0xff, %eax
cmpl -0x14(%rbp), %eax
jge 0x8e011
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e165
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x169(%rbp)
je 0x8e048
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
setge %al
movb %al, -0x169(%rbp)
movb -0x169(%rbp), %al
testb $0x1, %al
jne 0x8e054
jmp 0x8e07e
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x158(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x158(%rbp)
movb %cl, (%rax)
jmp 0x8e022
movq -0x158(%rbp), %rax
movb $0x0, (%rax)
leaq -0x150(%rbp), %rdi
leaq -0x50(%rbp), %rdx
leaq -0x50(%rbp), %rcx
addq $0x8, %rcx
leaq -0x50(%rbp), %r8
addq $0x10, %r8
leaq -0x50(%rbp), %r9
addq $0x18, %r9
leaq -0x50(%rbp), %r10
addq $0x20, %r10
leaq -0x50(%rbp), %rax
addq $0x28, %rax
leaq 0x39abb(%rip), %rsi     # 0xc7b7d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x9750
cmpl $0x6, %eax
jge 0x8e0e3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e165
movsd 0x392d5(%rip), %xmm0    # 0xc73c0
ucomisd -0x50(%rbp), %xmm0
jbe 0x8e12d
movsd -0x50(%rbp), %xmm0
movsd 0x392c9(%rip), %xmm3    # 0xc73c8
movsd 0x392c9(%rip), %xmm2    # 0xc73d0
movsd 0x392c9(%rip), %xmm1    # 0xc73d8
cmpltsd %xmm1, %xmm0
movaps %xmm0, %xmm1
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
addsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x8e180
movq %rax, -0x168(%rbp)
movsd %xmm0, -0x160(%rbp)
movq -0x20(%rbp), %rax
movq -0x168(%rbp), %rcx
movq %rcx, (%rax)
movq -0x160(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x18(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0x36779(%rip), %rsi     # 0xc4910
movl $0x30, %edx
callq 0x9610
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x93d0
movq -0x18(%rbp), %rax
cvttsd2si (%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x18(%rbp), %rax
cvttsd2si 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x18(%rbp), %rax
cvttsd2si 0x10(%rax), %eax
movl %eax, -0x64(%rbp)
cmpl $0x7b2, -0x5c(%rbp)     # imm = 0x7B2
jl 0x8e1f7
movl $0x833, %eax            # imm = 0x833
cmpl -0x5c(%rbp), %eax
jl 0x8e1f7
cmpl $0x1, -0x60(%rbp)
jl 0x8e1f7
movl $0xc, %eax
cmpl -0x60(%rbp), %eax
jge 0x8e1fc
jmp 0x8e2dc
movl -0x5c(%rbp), %eax
subl $0x7b2, %eax            # imm = 0x7B2
imull $0x16d, %eax, %eax      # imm = 0x16D
movl %eax, -0x70(%rbp)
movl -0x5c(%rbp), %eax
subl $0x7b1, %eax            # imm = 0x7B1
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x70(%rbp), %eax
addl %ecx, %eax
movl -0x60(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addl -0x50(%rbp,%rcx,4), %eax
addl -0x64(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x6c(%rbp)
movl -0x5c(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x65(%rbp)
jne 0x8e259
cmpl $0x3, -0x60(%rbp)
setge %al
movb %al, -0x65(%rbp)
movl -0x6c(%rbp), %eax
movb -0x65(%rbp), %sil
xorl %ecx, %ecx
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
addl %ecx, %eax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movsd 0x28(%rax), %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x58(%rbp)
movslq -0x54(%rbp), %rax
imulq $0x15180, %rax, %rax    # imm = 0x15180
movq -0x18(%rbp), %rcx
cvttsd2si 0x18(%rcx), %ecx
imull $0xe10, %ecx, %ecx      # imm = 0xE10
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
cvttsd2si 0x20(%rcx), %ecx
imull $0x3c, %ecx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movsd 0x28(%rax), %xmm0
cvtsi2sdl -0x58(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rax
movsd -0x8(%rbp), %xmm0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0xe0(%rbp), %rdi
leaq 0x3662a(%rip), %rsi     # 0xc4940
movl $0xc0, %edx
callq 0x9610
movq -0x10(%rbp), %rax
movl $0x15180, %ecx          # imm = 0x15180
cqto
idivq %rcx
movl %eax, -0xe4(%rbp)
movq -0x10(%rbp), %rax
movslq -0xe4(%rbp), %rcx
imulq $0x15180, %rcx, %rcx    # imm = 0x15180
subq %rcx, %rax
movl %eax, -0xe8(%rbp)
movl -0xe4(%rbp), %eax
movl $0x5b5, %ecx            # imm = 0x5B5
cltd
idivl %ecx
movl %edx, -0xf0(%rbp)
movl $0x0, -0xec(%rbp)
cmpl $0x30, -0xec(%rbp)
jge 0x8e3bf
movl -0xf0(%rbp), %eax
movslq -0xec(%rbp), %rcx
cmpl -0xe0(%rbp,%rcx,4), %eax
jl 0x8e3aa
movslq -0xec(%rbp), %rax
movl -0xe0(%rbp,%rax,4), %ecx
movl -0xf0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xf0(%rbp)
jmp 0x8e3ac
jmp 0x8e3bf
jmp 0x8e3ae
movl -0xec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xec(%rbp)
jmp 0x8e36d
movl -0xe4(%rbp), %eax
movl $0x5b5, %ecx            # imm = 0x5B5
cltd
idivl %ecx
shll $0x2, %eax
addl $0x7b2, %eax            # imm = 0x7B2
movl %eax, -0xf4(%rbp)
movl -0xec(%rbp), %eax
movl $0xc, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0xf4(%rbp), %eax
addl %ecx, %eax
cvtsi2sd %eax, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movl -0xec(%rbp), %eax
movl $0xc, %ecx
cltd
idivl %ecx
addl $0x1, %edx
cvtsi2sd %edx, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movl -0xf0(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movl -0xe8(%rbp), %eax
movl $0xe10, %ecx            # imm = 0xE10
cltd
idivl %ecx
cvtsi2sd %eax, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movl -0xe8(%rbp), %eax
movl $0xe10, %ecx            # imm = 0xE10
cltd
idivl %ecx
movl %edx, %eax
movl $0x3c, %ecx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x20(%rax)
movl -0xe8(%rbp), %eax
movl $0x3c, %ecx
cltd
idivl %ecx
cvtsi2sd %edx, %xmm0
addsd -0x8(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x28(%rax)
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movl %edi, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
leaq 0x36549(%rip), %rdi     # 0xc4a00
callq 0x8e180
movq %rax, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movsd 0x38f13(%rip), %xmm0    # 0xc73e0
ucomisd -0x20(%rbp), %xmm0
ja 0x8e4e7
movsd -0x20(%rbp), %xmm0
movsd 0x38f07(%rip), %xmm1    # 0xc73e8
ucomisd %xmm1, %xmm0
jbe 0x8e4ef
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movslq -0x14(%rbp), %rax
imulq $0x93a80, %rax, %rcx    # imm = 0x93A80
cvttsd2si -0x20(%rbp), %eax
cltq
addq %rax, %rcx
movq -0x10(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movsd -0x20(%rbp), %xmm0
movaps %xmm0, %xmm1
cvttpd2dq %xmm1, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rax
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x364a4(%rip), %rdi     # 0xc4a00
callq 0x8e180
movq %rax, -0x28(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl $0x93a80, %ecx          # imm = 0x93A80
cqto
idivq %rcx
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8e597
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cvtsi2sdq -0x30(%rbp), %xmm1
cvtsi2sdl -0x34(%rbp), %xmm0
movsd 0x2e876(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x2e863(%rip), %xmm2    # 0xbce30
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
// File: 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
subq $0x20, %rsp
movl %edi, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
leaq 0x36439(%rip), %rdi     # 0xc4a30
callq 0x8e180
movq %rax, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movsd 0x38dd3(%rip), %xmm0    # 0xc73e0
ucomisd -0x20(%rbp), %xmm0
ja 0x8e627
movsd -0x20(%rbp), %xmm0
movsd 0x38dc7(%rip), %xmm1    # 0xc73e8
ucomisd %xmm1, %xmm0
jbe 0x8e62f
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movslq -0x14(%rbp), %rax
imulq $0x93a80, %rax, %rcx    # imm = 0x93A80
cvttsd2si -0x20(%rbp), %eax
cltq
addq %rax, %rcx
movq -0x10(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movsd -0x20(%rbp), %xmm0
movaps %xmm0, %xmm1
cvttpd2dq %xmm1, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rax
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x36394(%rip), %rdi     # 0xc4a30
callq 0x8e180
movq %rax, -0x28(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl $0x93a80, %ecx          # imm = 0x93A80
cqto
idivq %rcx
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8e6d7
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cvtsi2sdq -0x30(%rbp), %xmm1
cvtsi2sdl -0x34(%rbp), %xmm0
movsd 0x2e736(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x2e723(%rip), %xmm2    # 0xbce30
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
// File: 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
subq $0x20, %rsp
movl %edi, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
leaq 0x36329(%rip), %rdi     # 0xc4a60
callq 0x8e180
movq %rax, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movsd 0x38c93(%rip), %xmm0    # 0xc73e0
ucomisd -0x20(%rbp), %xmm0
ja 0x8e767
movsd -0x20(%rbp), %xmm0
movsd 0x38c87(%rip), %xmm1    # 0xc73e8
ucomisd %xmm1, %xmm0
jbe 0x8e76f
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movslq -0x14(%rbp), %rax
imulq $0x93a80, %rax, %rcx    # imm = 0x93A80
cvttsd2si -0x20(%rbp), %eax
cltq
addq %rax, %rcx
movq -0x10(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movsd -0x20(%rbp), %xmm0
movaps %xmm0, %xmm1
cvttpd2dq %xmm1, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rax
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x36284(%rip), %rdi     # 0xc4a60
callq 0x8e180
movq %rax, -0x28(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl $0x93a80, %ecx          # imm = 0x93A80
cqto
idivq %rcx
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8e817
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cvtsi2sdq -0x30(%rbp), %xmm1
cvtsi2sdl -0x34(%rbp), %xmm0
movsd 0x2e5f6(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x2e5e3(%rip), %xmm2    # 0xbce30
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
// File: 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
subq $0x90, %rsp
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x93d0
leaq -0x60(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9bf0
cmpl $0x0, %eax
jne 0x8e9d9
leaq -0x60(%rbp), %rdi
callq 0x9670
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0x8e9d9
movq -0x68(%rbp), %rax
movl 0x14(%rax), %eax
addl $0x76c, %eax            # imm = 0x76C
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x68(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x68(%rbp), %rax
cvtsi2sdl 0xc(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x68(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x68(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x68(%rbp), %rax
cvtsi2sdl (%rax), %xmm1
cvtsi2sdq -0x58(%rbp), %xmm0
movsd 0x30404(%rip), %xmm2    # 0xbedd0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x8e180
movq %rax, -0x78(%rbp)
movsd %xmm0, -0x70(%rbp)
movups -0x78(%rbp), %xmm0
movaps %xmm0, -0x20(%rbp)
movaps -0x20(%rbp), %xmm0
movaps %xmm0, -0x90(%rbp)
movsd 0x6d1b2(%rip), %xmm1    # 0xfbbb8
movq -0x90(%rbp), %rdi
movsd -0x88(%rbp), %xmm0
callq 0x8e860
movq %rax, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rax
movsd -0x8(%rbp), %xmm0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::read_leaps(char const*)
extern int read_leaps(const char *file)
{
    FILE *fp;
    int i,n;
    
    if (!(fp=fopen(file,"r"))) return 0;
    
    /* read leap seconds table by text or usno */
    if (!(n=read_leaps_text(fp))&&!(n=read_leaps_usno(fp))) {
        fclose(fp);
        return 0;
    }
    for (i=0;i<7;i++) leaps[n][i]=0.0;
    fclose(fp);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x393e8(%rip), %rsi     # 0xc7e9f
callq 0x98d0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x8eacf
movl $0x0, -0x4(%rbp)
jmp 0x8eb49
movq -0x18(%rbp), %rdi
callq 0x8eb60
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jne 0x8eb03
movq -0x18(%rbp), %rdi
callq 0x8ed00
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jne 0x8eb03
movq -0x18(%rbp), %rdi
callq 0x9770
movl $0x0, -0x4(%rbp)
jmp 0x8eb49
movl $0x0, -0x1c(%rbp)
cmpl $0x7, -0x1c(%rbp)
jge 0x8eb39
movslq -0x20(%rbp), %rcx
leaq 0x6a115(%rip), %rax     # 0xf8c30
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8eb0a
movq -0x18(%rbp), %rdi
callq 0x9770
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::read_leaps_text(_IO_FILE*)
static int read_leaps_text(FILE *fp)
{
    char buff[256],*p;
    int i,n=0,ep[6],ls;
    
    rewind(fp);
    
    while (fgets(buff,sizeof(buff),fp)&&n<MAXLEAPS) {
        if ((p=strchr(buff,'#'))) *p='\0';
        if (sscanf(buff,"%d %d %d %d %d %d %d",ep,ep+1,ep+2,ep+3,ep+4,ep+5,
                   &ls)<7) continue;
        for (i=0;i<6;i++) leaps[n][i]=ep[i];
        leaps[n++][6]=ls;
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movl $0x0, -0x120(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9110
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x9ba0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x145(%rbp)
je 0x8ebb8
cmpl $0x40, -0x120(%rbp)
setl %al
movb %al, -0x145(%rbp)
movb -0x145(%rbp), %al
testb $0x1, %al
jne 0x8ebc7
jmp 0x8ecea
leaq -0x110(%rbp), %rdi
movl $0x23, %esi
callq 0x9280
movq %rax, -0x118(%rbp)
cmpq $0x0, %rax
je 0x8ebef
movq -0x118(%rbp), %rax
movb $0x0, (%rax)
leaq -0x110(%rbp), %rdi
leaq -0x140(%rbp), %rdx
leaq -0x140(%rbp), %rcx
addq $0x4, %rcx
leaq -0x140(%rbp), %r8
addq $0x8, %r8
leaq -0x140(%rbp), %r9
addq $0xc, %r9
leaq -0x140(%rbp), %r11
addq $0x10, %r11
leaq -0x140(%rbp), %r10
addq $0x14, %r10
leaq 0x3947a(%rip), %rsi     # 0xc80b5
leaq -0x144(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x9750
cmpl $0x7, %eax
jge 0x8ec61
jmp 0x8eb82
movl $0x0, -0x11c(%rbp)
cmpl $0x6, -0x11c(%rbp)
jge 0x8ecb6
movslq -0x11c(%rbp), %rax
cvtsi2sdl -0x140(%rbp,%rax,4), %xmm0
movslq -0x120(%rbp), %rcx
leaq 0x69f9e(%rip), %rax     # 0xf8c30
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movslq -0x11c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x8ec6b
cvtsi2sdl -0x144(%rbp), %xmm0
movl -0x120(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x120(%rbp)
movslq %eax, %rcx
leaq 0x69f57(%rip), %rax     # 0xf8c30
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x30(%rax)
jmp 0x8eb82
movl -0x120(%rbp), %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x80, %rsp
movq %rdi, -0x20(%rbp)
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
movslq -0x34(%rbp), %rcx
leaq 0x69c8a(%rip), %rax     # 0xf8c30
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x8f07e
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq -0x34(%rbp), %rcx
leaq 0x69c57(%rip), %rax     # 0xf8c30
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd 0x30(%rax), %xmm1
movq -0x58(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
callq 0x8e860
movq %rax, -0x48(%rbp)
movsd %xmm0, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movslq -0x34(%rbp), %rax
leaq 0x69c09(%rip), %rdi     # 0xf8c30
imulq $0x38, %rax, %rax
addq %rax, %rdi
callq 0x8e180
movq %rax, -0x78(%rbp)
movsd %xmm0, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
movq -0x78(%rbp), %rsi
movsd -0x70(%rbp), %xmm1
callq 0x8e8e0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x8f06e
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8f08e
jmp 0x8f070
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x8ef9b
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movsd -0x8(%rbp), %xmm0
addq $0x80, %rsp
popq %rbp
retq
// File: 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
subq $0x60, %rsp
movq %rdi, -0x20(%rbp)
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x69b6d(%rip), %rax     # 0xf8c30
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x8f192
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movslq -0x24(%rbp), %rax
leaq 0x69b3a(%rip), %rdi     # 0xf8c30
imulq $0x38, %rax, %rax
addq %rax, %rdi
callq 0x8e180
movq %rax, -0x48(%rbp)
movsd %xmm0, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
movq -0x48(%rbp), %rsi
movsd -0x40(%rbp), %xmm1
callq 0x8e8e0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x8f182
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x69aea(%rip), %rax     # 0xf8c30
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movsd 0x30(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movq -0x58(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
callq 0x8e860
movq %rax, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
jmp 0x8f1a2
jmp 0x8f184
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8f0b8
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movsd -0x8(%rbp), %xmm0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x18(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x93d0
movsd 0x38137(%rip), %xmm0    # 0xc73c8
movsd %xmm0, -0x50(%rbp)
movsd 0x2cbc2(%rip), %xmm0    # 0xbbe60
movsd %xmm0, -0x48(%rbp)
movsd 0x2cbb5(%rip), %xmm0    # 0xbbe60
movsd %xmm0, -0x40(%rbp)
movsd 0x2e4c0(%rip), %xmm0    # 0xbd778
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movsd -0x18(%rbp), %xmm1
movq -0xc0(%rbp), %rdi
movsd -0xb8(%rbp), %xmm0
callq 0x8e860
movq %rax, -0xb0(%rbp)
movsd %xmm0, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xd0(%rbp), %rdi
movsd -0xc8(%rbp), %xmm0
leaq -0x70(%rbp), %rsi
callq 0x8f490
movsd %xmm0, -0x78(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x8e180
movq %rax, -0xf0(%rbp)
movsd %xmm0, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
movsd -0xd8(%rbp), %xmm0
movq -0xf0(%rbp), %rsi
movsd -0xe8(%rbp), %xmm1
callq 0x8e8e0
movsd 0x2da83(%rip), %xmm1    # 0xbce20
divsd %xmm1, %xmm0
movsd 0x38077(%rip), %xmm1    # 0xc7420
divsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
mulsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x88(%rbp), %xmm0
mulsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x80(%rbp), %xmm0
movsd 0x3802a(%rip), %xmm1    # 0xc7410
mulsd %xmm1, %xmm0
movsd 0x38026(%rip), %xmm1    # 0xc7418
addsd %xmm1, %xmm0
movsd -0x88(%rbp), %xmm1
movsd 0x38002(%rip), %xmm2    # 0xc7408
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x90(%rbp), %xmm0
movsd 0x37fe2(%rip), %xmm2    # 0xc7400
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm1
movsd -0x78(%rbp), %xmm0
movsd 0x37fb5(%rip), %xmm2    # 0xc73f8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0xa0(%rbp), %xmm0
movsd 0x2d9bd(%rip), %xmm1    # 0xbce20
callq 0x99f0
movsd 0x2d9e8(%rip), %xmm1    # 0xbce58
mulsd %xmm1, %xmm0
movsd 0x2e8f4(%rip), %xmm1    # 0xbdd70
divsd %xmm1, %xmm0
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)