LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/binex.cpp
// Function: bamboo::adjday(bamboo::gtime_t, double)
static gtime_t adjday(gtime_t time, double tod)
{
    double ep[6],tod_p;
    time2epoch(time,ep);
    tod_p=ep[3]*3600.0+ep[4]*60.0+ep[5];
    if      (tod<tod_p-43200.0) tod+=86400.0;
    else if (tod>tod_p+43200.0) tod-=86400.0;
    ep[3]=ep[4]=ep[5]=0.0;
    return timeadd(epoch2time(ep),tod);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movsd %xmm1, -0x10(%rbp)
leaq -0x40(%rbp), %rbx
movq %rbx, %rsi
callq 0x4fa81
movsd 0x18(%rbx), %xmm0
movsd 0x20(%rbx), %xmm1
mulsd 0x37c87(%rip), %xmm1    # 0x6a8b8
mulsd 0x37c87(%rip), %xmm0    # 0x6a8c0
addsd %xmm1, %xmm0
addsd 0x28(%rbx), %xmm0
movsd 0x391a6(%rip), %xmm1    # 0x6bdf0
addsd %xmm0, %xmm1
movsd -0x10(%rbp), %xmm2
ucomisd %xmm2, %xmm1
movapd %xmm2, %xmm1
jbe 0x32c67
addsd 0x37c6b(%rip), %xmm1    # 0x6a8d0
jmp 0x32c7d
addsd 0x39189(%rip), %xmm0    # 0x6bdf8
ucomisd %xmm0, %xmm1
jbe 0x32c82
addsd 0x39183(%rip), %xmm1    # 0x6be00
movsd %xmm1, -0x10(%rbp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rbx)
movq $0x0, 0x28(%rbx)
leaq -0x40(%rbp), %rdi
callq 0x4f9a4
movq %rax, %rdi
movsd -0x10(%rbp), %xmm1
callq 0x4fe63
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/binex.cpp
// Function: bamboo::sisaindex(double)
static int sisaindex(double value)
{
    if (value< 0.5) return (int)((value    )/0.01);
    if (value< 1.0) return (int)((value-0.5)/0.02)+ 50;
    if (value< 2.0) return (int)((value-1.0)/0.04)+ 75;
    if (value<=6.0) return (int)((value-2.0)/0.16)+100;
    return 255; /* NAPA */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x38fbc(%rip), %xmm1    # 0x6bc78
ucomisd %xmm0, %xmm1
jbe 0x32cd0
divsd 0x38af6(%rip), %xmm0    # 0x6b7c0
cvttsd2si %xmm0, %eax
jmp 0x32d48
movsd 0x36c48(%rip), %xmm1    # 0x69920
ucomisd %xmm0, %xmm1
jbe 0x32cf7
addsd 0x37d0a(%rip), %xmm0    # 0x6a9f0
divsd 0x39132(%rip), %xmm0    # 0x6be20
cvttsd2si %xmm0, %eax
addl $0x32, %eax
jmp 0x32d48
movsd 0x390b1(%rip), %xmm1    # 0x6bdb0
ucomisd %xmm0, %xmm1
jbe 0x32d1e
addsd 0x37ca3(%rip), %xmm0    # 0x6a9b0
divsd 0x39103(%rip), %xmm0    # 0x6be18
cvttsd2si %xmm0, %eax
addl $0x4b, %eax
jmp 0x32d48
movl $0xff, %eax
movsd 0x37d0d(%rip), %xmm1    # 0x6aa38
ucomisd %xmm0, %xmm1
jb 0x32d48
addsd 0x390cf(%rip), %xmm0    # 0x6be08
divsd 0x390cf(%rip), %xmm0    # 0x6be10
cvttsd2si %xmm0, %eax
addl $0x64, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/lambda.cpp
// Function: bamboo::lambda(int, int, double const*, double const*, double*, double*)
extern int lambda(int n, int m, const double *a, const double *Q, double *F,
                  double *s)
{
    int info;
    double *L,*D,*Z,*z,*E;
    
    if (n<=0||m<=0) return -1;
    L=zeros(n,n); D=mat(n,1); Z=eye(n); z=mat(n,1); E=mat(n,m);
    
    /* LD factorization */
    if (!(info=LD(n,Q,L,D))) {
        
        /* lambda reduction */
        reduction(n,L,D,Z);
        matmul("TN",n,1,n,1.0,Z,a,0.0,z); /* z=Z'*a */
        
        /* mlambda search */
        if (!(info=search(n,m,L,D,z,E,s))) {
            
            info=solve("T",Z,E,n,m,F); /* F=Z'\E */
        }
    }
    free(L); free(D); free(Z); free(z); free(E);
    return info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
testl %edi, %edi
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jne 0x32eac
movl %esi, %r14d
movl %edi, %r15d
movq %rdx, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movq %r8, -0x48(%rbp)
movl %edi, %esi
callq 0x4e730
movq %rax, %r12
movl %r15d, %edi
movl $0x1, %esi
callq 0x4e5e2
movq %rax, %r13
movl %r15d, %edi
callq 0x4e778
movq %rax, -0x38(%rbp)
movl %r15d, %edi
movl $0x1, %esi
callq 0x4e5e2
movq %rax, -0x40(%rbp)
movl %r15d, %edi
movl %r14d, %esi
callq 0x4e5e2
movq %rax, -0x30(%rbp)
movl %r15d, %edi
movq %rbx, %rsi
movq %r12, %rbx
movq %r12, %rdx
movq %r13, %rcx
callq 0x32ebe
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x32e81
movl %r15d, %edi
movq %rbx, %rsi
movq %r13, %rdx
movq -0x38(%rbp), %r12
movq %r12, %rcx
callq 0x330d6
movq -0x40(%rbp), %rax
movq %rax, (%rsp)
leaq 0x39e4a(%rip), %rdi     # 0x6cc60
movsd 0x36b02(%rip), %xmm0    # 0x69920
xorps %xmm1, %xmm1
movl %r15d, %esi
movl $0x1, %edx
movl %r15d, %ecx
movq %r12, %r8
movq -0x50(%rbp), %r9
callq 0x4e91f
movq -0x58(%rbp), %rax
movq %rax, (%rsp)
movl %r15d, %edi
movl %r14d, %esi
movq %rbx, %rdx
movq %r13, %rcx
movq -0x40(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0x333a6
movl %eax, %r12d
testl %eax, %eax
jne 0x32e81
leaq 0x45c25(%rip), %rdi     # 0x78a8c
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl %r15d, %ecx
movl %r14d, %r8d
movq -0x48(%rbp), %r9
callq 0x4ef8c
movl %eax, %r12d
movq %rbx, %rdi
callq 0x87b0
movq %r13, %rdi
callq 0x87b0
movq -0x38(%rbp), %rdi
callq 0x87b0
movq -0x40(%rbp), %rdi
callq 0x87b0
movq -0x30(%rbp), %rdi
callq 0x87b0
movl %r12d, %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/lambda.cpp
// Function: bamboo::lambda_reduction(int, double const*, double*)
extern int lambda_reduction(int n, const double *Q, double *Z)
{
    double *L,*D;
    int i,j,info;
    
    if (n<=0) return -1;
    
    L=zeros(n,n); D=mat(n,1);
    
    for (i=0;i<n;i++) for (j=0;j<n;j++) {
        Z[i+j*n]=i==j?1.0:0.0;
    }
    /* LD factorization */
    if ((info=LD(n,Q,L,D))) {
        free(L); free(D);
        return info;
    }
    /* lambda reduction */
    reduction(n,L,D,Z);
     
    free(L); free(D);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %edi, %edi
jle 0x3393b
movq %rdx, %rbx
movq %rsi, %r13
movl %edi, %r15d
movl %edi, %esi
callq 0x4e730
movq %rax, %r14
movl %r15d, %edi
movl $0x1, %esi
callq 0x4e5e2
movq %rax, %r12
movl %r15d, %eax
leaq (,%rax,8), %rcx
xorl %edx, %edx
movsd 0x36055(%rip), %xmm0    # 0x69920
movq %rbx, %rsi
movq %rsi, %rdi
xorl %r8d, %r8d
movaps %xmm0, %xmm1
cmpq %r8, %rdx
je 0x338df
xorps %xmm1, %xmm1
movsd %xmm1, (%rdi)
incq %r8
addq %rcx, %rdi
cmpq %r8, %rax
jne 0x338d4
incq %rdx
addq $0x8, %rsi
cmpq %rax, %rdx
jne 0x338ce
movl %r15d, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x32ebe
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x33929
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x330d6
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x87b0
movq %r12, %rdi
callq 0x87b0
jmp 0x33941
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r13d, %eax
addq $0x8, %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/lambda.cpp
// Function: bamboo::lambda_search(int, int, double const*, double const*, double*, double*)
extern int lambda_search(int n, int m, const double *a, const double *Q,
                         double *F, double *s)
{
    double *L,*D;
    int info;
    
    if (n<=0||m<=0) return -1;
    
    L=zeros(n,n); D=mat(n,1);
    
    /* LD factorization */
    if ((info=LD(n,Q,L,D))) {
        free(L); free(D);
        return info;
    }
    /* mlambda search */
    info=search(n,m,L,D,a,F,s);
    
    free(L); free(D);
    return info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
testl %edi, %edi
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jne 0x339f6
movl %esi, %r12d
movl %edi, %r13d
movq %r9, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movl %edi, %esi
callq 0x4e730
movq %rax, %rbx
movl %r13d, %edi
movl $0x1, %esi
callq 0x4e5e2
movq %rax, %r14
movl %r13d, %edi
movq %r15, %rsi
movq %rbx, %r15
movq %rbx, %rdx
movq %rax, %rcx
callq 0x32ebe
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x339e6
movq -0x30(%rbp), %rax
movq %rax, (%rsp)
movl %r13d, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
callq 0x333a6
movl %eax, %ebx
movq %r15, %rdi
callq 0x87b0
movq %r14, %rdi
callq 0x87b0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rcvraw.cpp
// Function: bamboo::getbits2(unsigned char const*, int, int, int, int)
static int getbits2(const unsigned char *buff, int p1, int l1, int p2, int l2)
{
    if (getbitu(buff,p1,1))
        return (int)((getbits(buff,p1,l1)<<l2)+getbitu(buff,p2,l2));
    else
        return (int)getbitu2(buff,p1,l1,p2,l2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %r15
movl $0x1, %edx
callq 0x4e341
movq %r15, %rdi
movl %r13d, %esi
movl %r12d, %edx
testl %eax, %eax
je 0x34913
callq 0x4e390
jmp 0x34918
callq 0x4e341
movl %eax, %r12d
movl %ebx, %ecx
shll %cl, %r12d
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x4e341
addl %r12d, %eax
addq $0x8, %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/rcvraw.cpp
// Function: bamboo::getbits3(unsigned char const*, int, int, int, int, int, int)
static int getbits3(const unsigned char *buff, int p1, int l1, int p2, int l2,
                    int p3, int l3)
{
    if (getbitu(buff,p1,1))
        return (int)((getbits(buff,p1,l1)<<(l2+l3))+
                   (getbitu(buff,p2,l2)<<l3)+getbitu(buff,p3,l3));
    else
        return (int)getbitu3(buff,p1,l1,p2,l2,p3,l3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, -0x2c(%rbp)
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %r14d
movq %rdi, %r15
movl $0x1, %edx
callq 0x4e341
testl %eax, %eax
je 0x35554
movq %r15, %rdi
movl %r14d, %esi
movl %r13d, %edx
callq 0x4e390
movl %eax, %r14d
leal 0x16(%rbx), %ecx
shll %cl, %r14d
movq %r15, %rdi
movl %r12d, %esi
movl $0x16, %edx
callq 0x4e341
movl %eax, %r12d
movl %ebx, %ecx
shll %cl, %r12d
movq %r15, %rdi
movl -0x2c(%rbp), %esi
movl %ebx, %edx
callq 0x4e341
addl %r14d, %eax
addl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl %r14d, %esi
movl %r13d, %edx
movl %r12d, %ecx
movl -0x2c(%rbp), %r8d
movl %ebx, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x35577
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rcvraw.cpp
// Function: bamboo::test_glostr(unsigned char const*)
extern int test_glostr(const unsigned char *buff)
{
    static const unsigned char xor_8bit[256]={ /* xor of 8 bits */
        0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
        1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
        1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
        0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
        1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
        0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
        0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
        1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0
    };
    static const unsigned char mask_hamming[][12]={ /* mask of hamming codes */
        {0x55,0x55,0x5A,0xAA,0xAA,0xAA,0xB5,0x55,0x6A,0xD8,0x08},
        {0x66,0x66,0x6C,0xCC,0xCC,0xCC,0xD9,0x99,0xB3,0x68,0x10},
        {0x87,0x87,0x8F,0x0F,0x0F,0x0F,0x1E,0x1E,0x3C,0x70,0x20},
        {0x07,0xF8,0x0F,0xF0,0x0F,0xF0,0x1F,0xE0,0x3F,0x80,0x40},
        {0xF8,0x00,0x0F,0xFF,0xF0,0x00,0x1F,0xFF,0xC0,0x00,0x80},
        {0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x01,0x00},
        {0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00},
        {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8}
    };
    unsigned char cs;
    int i,j,n=0;
    
    for (i=0;i<8;i++) {
        for (j=0,cs=0;j<11;j++) {
            cs^=xor_8bit[buff[j]&mask_hamming[i][j]];
        }
        if (cs) n++;
    }
    return n==0||(n==2&&cs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leaq 0x3792a(%rip), %rcx     # 0x6cf10
leaq 0x37823(%rip), %rsi     # 0x6ce10
xorl %edx, %edx
xorl %r10d, %r10d
xorl %r11d, %r11d
movl %r11d, %r8d
movzbl (%rdi,%r10), %r9d
movzbl (%rcx,%r10), %r11d
andl %r9d, %r11d
movb (%r11,%rsi), %r9b
movl %r9d, %r11d
xorb %r8b, %r11b
incq %r10
cmpq $0xb, %r10
jne 0x355f5
xorl %r10d, %r10d
cmpb %r8b, %r9b
setne %r10b
addl %r10d, %edx
incq %rax
addq $0xc, %rcx
cmpq $0x8, %rax
jne 0x355ef
testl %edx, %edx
sete %al
cmpl $0x2, %edx
sete %cl
cmpb %r8b, %r9b
setne %dl
andb %cl, %dl
orb %al, %dl
movzbl %dl, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rcvraw.cpp
// Function: bamboo::free_raw(bamboo::raw_t*)
extern void free_raw(raw_t *raw)
{
    half_cyc_t *p,*next;
    
    trace(3,"free_raw:\n");
    
    free(raw->obs.data ); raw->obs.data =NULL; raw->obs.n =0;
    free(raw->obuf.data); raw->obuf.data=NULL; raw->obuf.n=0;
    free(raw->nav.eph  ); raw->nav.eph  =NULL; raw->nav.n =0;
    free(raw->nav.alm  ); raw->nav.alm  =NULL; raw->nav.na=0;
    free(raw->nav.geph ); raw->nav.geph =NULL; raw->nav.ng=0;
    free(raw->nav.seph ); raw->nav.seph =NULL; raw->nav.ns=0;
    
    /* free half-cycle correction list */
    for (p=raw->half_cyc;p;p=next) {
        next=p->next;
        free(p);
    }
    raw->half_cyc=NULL;
    
    /* free receiver dependent data */
    switch (raw->format) {
       // case STRFMT_CMR : free_cmr (raw); break;
        case STRFMT_RT17: free_rt17(raw); break;
    }
    raw->rcv_data=NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x36260(%rip), %rsi     # 0x6d1ca
xorl %r14d, %r14d
movl $0x3, %edi
xorl %eax, %eax
callq 0x4ded0
movq 0x1d28(%rbx), %rdi
callq 0x87b0
movq %r14, 0x1d28(%rbx)
movl %r14d, 0x1d20(%rbx)
movq 0x1d38(%rbx), %rdi
callq 0x87b0
movq %r14, 0x1d38(%rbx)
movl %r14d, 0x1d30(%rbx)
movq 0x1d80(%rbx), %rdi
callq 0x87b0
movq %r14, 0x1d80(%rbx)
movl %r14d, 0x1d40(%rbx)
movq 0x1da8(%rbx), %rdi
callq 0x87b0
movq %r14, 0x1da8(%rbx)
movl %r14d, 0x1d68(%rbx)
movq 0x1d88(%rbx), %rdi
callq 0x87b0
movq %r14, 0x1d88(%rbx)
movl %r14d, 0x1d48(%rbx)
movq 0x1d90(%rbx), %rdi
callq 0x87b0
movq %r14, 0x1d90(%rbx)
movl %r14d, 0x1d50(%rbx)
movq 0x82b90(%rbx), %rdi
testq %rdi, %rdi
je 0x37032
movq 0x28(%rdi), %r14
callq 0x87b0
movq %r14, %rdi
testq %r14, %r14
jne 0x37021
movq $0x0, 0x82b90(%rbx)
cmpl $0xc, 0x82b98(%rbx)
jne 0x3704e
movq %rbx, %rdi
callq 0x3779c
movq $0x0, 0x82ba0(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rcvraw.cpp
// Function: bamboo::input_raw(bamboo::raw_t*, int, unsigned char)
extern int input_raw(raw_t *raw, int format, unsigned char data)
{
    trace(5,"input_raw: format=%d data=0x%02x\n",format,data);
    
    switch (format) {
//        case STRFMT_OEM4 : return input_oem4 (raw,data);
//        case STRFMT_OEM3 : return input_oem3 (raw,data);
        case STRFMT_UBX  : return input_ubx  (raw,data);
//        case STRFMT_SS2  : return input_ss2  (raw,data);
//        case STRFMT_CRES : return input_cres (raw,data);
        case STRFMT_STQ  : return input_stq  (raw,data);
//        case STRFMT_GW10 : return input_gw10 (raw,data);
//        case STRFMT_JAVAD: return input_javad(raw,data);
//        case STRFMT_NVS  : return input_nvs  (raw,data);
        case STRFMT_BINEX: return input_bnx  (raw,data);
        case STRFMT_RT17 : return input_rt17 (raw,data);
//        case STRFMT_SEPT : return input_sbf  (raw,data);
//        case STRFMT_CMR  : return input_cmr  (raw,data);
//        case STRFMT_TERSUS: return input_tersus(raw,data);
//        case STRFMT_LEXR : return input_lexr (raw,data);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x3615d(%rip), %rsi     # 0x6d1d5
movl $0x5, %edi
movl %r15d, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x4ded0
addl $-0x4, %r15d
cmpl $0x8, %r15d
ja 0x370fc
leaq 0x35d29(%rip), %rax     # 0x6cdc4
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzbl %r14b, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5f5e8
movzbl %r14b, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2e340
movzbl %r14b, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x56938
movzbl %r14b, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x378ed
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rcvraw.cpp
// Function: bamboo::input_rawf(bamboo::raw_t*, int, _IO_FILE*)
extern int input_rawf(raw_t *raw, int format, FILE *fp)
{
    trace(4,"input_rawf: format=%d\n",format);
    
    switch (format) {
//        case STRFMT_OEM4 : return input_oem4f (raw,fp);
//        case STRFMT_OEM3 : return input_oem3f (raw,fp);
        case STRFMT_UBX  : return input_ubxf  (raw,fp);
//        case STRFMT_SS2  : return input_ss2f  (raw,fp);
//        case STRFMT_CRES : return input_cresf (raw,fp);
        case STRFMT_STQ  : return input_stqf  (raw,fp);
//        case STRFMT_GW10 : return input_gw10f (raw,fp);
//        case STRFMT_JAVAD: return input_javadf(raw,fp);
//        case STRFMT_NVS  : return input_nvsf  (raw,fp);
        case STRFMT_BINEX: return input_bnxf  (raw,fp);
        case STRFMT_RT17 : return input_rt17f (raw,fp);
//        case STRFMT_SEPT : return input_sbff  (raw,fp);
//        case STRFMT_CMR  : return input_cmrf  (raw,fp);
//        case STRFMT_TERSUS: return input_tersusf(raw,fp);
//        case STRFMT_LEXR : return input_lexrf (raw,fp);
    }
    return -2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
leaq 0x360d4(%rip), %rsi     # 0x6d1f7
movl $0x4, %edi
movl %r15d, %edx
xorl %eax, %eax
callq 0x4ded0
addl $-0x4, %r15d
cmpl $0x8, %r15d
ja 0x371a0
leaq 0x35ca5(%rip), %rax     # 0x6cde8
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x617db
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x32a03
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x56c28
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x38d3c
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rt17.cpp
// Function: bamboo::free_rt17(bamboo::raw_t*)
EXPORT void free_rt17(raw_t *Raw)
{
    rt17_t *rt17 = NULL;
    
    if (Raw->format != STRFMT_RT17)
        return;
 
    if ((rt17 = (rt17_t*) Raw->rcv_data))
    {
        if (rt17->MessageBuffer)
        {
            memset(rt17->MessageBuffer, 0, MBUFF_LENGTH);
            free(rt17->MessageBuffer);
            rt17->MessageBuffer = NULL;
        }

        if (rt17->PacketBuffer)
        {
            memset(rt17->PacketBuffer, 0, PBUFF_LENGTH);
            free(rt17->PacketBuffer);
            rt17->PacketBuffer = NULL;
        }

        memset(rt17, 0, sizeof(rt17_t));
        free(rt17);
        Raw->rcv_data = NULL;
    }
}

// Assembly:
cmpl $0xc, 0x82b98(%rdi)
jne 0x3783c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x82ba0(%rdi), %r14
testq %r14, %r14
je 0x37832
movq (%r14), %rdi
testq %rdi, %rdi
je 0x377e5
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x8390
movq (%r14), %rdi
callq 0x87b0
movq $0x0, (%r14)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x3780b
movl $0x105, %edx            # imm = 0x105
xorl %esi, %esi
callq 0x8390
movq 0x8(%r14), %rdi
callq 0x87b0
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
xorl %r15d, %r15d
movq %r15, 0x30(%r14)
movq %r14, %rdi
callq 0x87b0
movq %r15, 0x82ba0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rt17.cpp
// Function: bamboo::init_rt17(bamboo::raw_t*)
EXPORT int init_rt17(raw_t *Raw)
{
	rt17_t *rt17 = NULL;
    unsigned char *MessageBuffer = NULL, *PacketBuffer = NULL;

    if (Raw->format != STRFMT_RT17)
       return 0;
 
    if (!(rt17 = (rt17_t*) calloc(1, sizeof(rt17_t))))
    {
        tracet(0, "RT17: unable to allocate RT17 dependent private data structure.\n");
        return 0;
    }
    Raw->rcv_data = (void*) rt17;
    
    if (!(MessageBuffer = (unsigned char*) calloc(MBUFF_LENGTH, sizeof(unsigned char))))
    {
        tracet(0, "RT17: unable to allocate RT17 message buffer.\n");
        free_rt17(Raw);
        return 0;
    }
    rt17->MessageBuffer = MessageBuffer;

    if (!(PacketBuffer = (unsigned char*) calloc(PBUFF_LENGTH, sizeof(unsigned char))))
    {
        tracet(0, "RT17: unable to allocate RT17 packet buffer.\n");
        free_rt17(Raw);
        return 0;
    }
    rt17->PacketBuffer = PacketBuffer;

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %r14d, %r14d
cmpl $0xc, 0x82b98(%rdi)
jne 0x378e5
movq %rdi, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x8440
testq %rax, %rax
je 0x378ac
movq %rax, %r14
movq %rax, 0x82ba0(%rbx)
movl $0x2000, %edi           # imm = 0x2000
movl $0x1, %esi
callq 0x8440
testq %rax, %rax
je 0x378c1
movq %rax, (%r14)
movl $0x105, %edi            # imm = 0x105
movl $0x1, %esi
callq 0x8440
testq %rax, %rax
je 0x378ca
movq %rax, 0x8(%r14)
movl $0x1, %r14d
jmp 0x378e5
leaq 0x35a85(%rip), %rsi     # 0x6d338
xorl %r14d, %r14d
xorl %edi, %edi
xorl %eax, %eax
callq 0x53ec4
jmp 0x378e5
leaq 0x35ab1(%rip), %rsi     # 0x6d379
jmp 0x378d1
leaq 0x35ad7(%rip), %rsi     # 0x6d3a8
xorl %r14d, %r14d
xorl %edi, %edi
xorl %eax, %eax
callq 0x53ec4
movq %rbx, %rdi
callq 0x3779c
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rt17.cpp
// Function: bamboo::input_rt17f(bamboo::raw_t*, _IO_FILE*)
EXPORT int input_rt17f(raw_t *Raw, FILE *fp)
{
    int i, Data, Ret;
    
    for (i = 0; i < 4096; i++)
    {
	if ((Data = fgetc(fp)) == EOF) return -2;
	    if ((Ret = input_rt17(Raw, (unsigned char) Data))) return Ret;
    }

    return 0; /* return at every 4k bytes */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1000, %r15d          # imm = 0x1000
movq %rbx, %rdi
callq 0x89d0
cmpl $-0x1, %eax
je 0x38d77
movzbl %al, %esi
movq %r14, %rdi
callq 0x378ed
testl %eax, %eax
jne 0x38d7c
decl %r15d
jne 0x38d52
xorl %eax, %eax
jmp 0x38d7c
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rt17.cpp
// Function: bamboo::SetWeek(bamboo::raw_t*, int, double)
static void SetWeek(raw_t *Raw, int Week, double Tow)
{
    rt17_t *rt17 = (rt17_t*) Raw->rcv_data;

    if (!(rt17->Flags & M_WEEK_OPTION))
    {
        if (rt17->Week)
        {
            if (Week != rt17->Week)
            {
                if (Week == (rt17->Week + 1))
                    tracet(2, "RT17: GPS WEEK rolled over from %d to %d.\n", rt17->Week, Week);
                else
                    tracet(2, "RT17: GPS WEEK changed from %d to %d.\n", rt17->Week, Week);
            }
        }
        else
            tracet(2, "RT17: GPS WEEK initially set to %d.\n", Week);

        rt17->Week = Week;
    }

    /* Also update the time if we can */
    if (Week && (Tow != 0.0))
        Raw->time = gpst2time(Week, Tow);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x82ba0(%rdi), %r15
testb $0x1, 0x18(%r15)
jne 0x38e04
movl 0x34(%r15), %edx
testl %edx, %edx
je 0x38dc8
cmpl %r14d, %edx
je 0x38e00
movsd %xmm0, -0x20(%rbp)
leal 0x1(%rdx), %eax
cmpl %r14d, %eax
jne 0x38de5
leaq 0x34b4b(%rip), %rsi     # 0x6d911
jmp 0x38dec
leaq 0x34b94(%rip), %rsi     # 0x6d963
movl $0x2, %edi
movl %r14d, %edx
xorl %eax, %eax
movsd %xmm0, -0x20(%rbp)
callq 0x53ec4
jmp 0x38dfb
leaq 0x34b50(%rip), %rsi     # 0x6d93c
movl $0x2, %edi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x53ec4
movsd -0x20(%rbp), %xmm0
movl %r14d, 0x34(%r15)
testl %r14d, %r14d
je 0x38e25
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x38e15
jnp 0x38e25
movl %r14d, %edi
callq 0x4fbc6
movq %rax, (%rbx)
movsd %xmm0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm.cpp
// Function: bamboo::free_rtcm(bamboo::rtcm_t*)
extern void free_rtcm(rtcm_t *rtcm)
{
    trace(3,"free_rtcm:\n");
    
    /* free memory for observation and ephemeris buffer */
    free(rtcm->obs.data); rtcm->obs.data=NULL; rtcm->obs.n=0;
    free(rtcm->nav.eph ); rtcm->nav.eph =NULL; rtcm->nav.n=0;
    free(rtcm->nav.geph); rtcm->nav.geph=NULL; rtcm->nav.ng=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x34f1b(%rip), %rsi     # 0x6e1ed
xorl %r14d, %r14d
movl $0x3, %edi
xorl %eax, %eax
callq 0x4ded0
movq 0x38(%rbx), %rdi
callq 0x87b0
movq %r14, 0x38(%rbx)
movl %r14d, 0x30(%rbx)
movq 0x80(%rbx), %rdi
callq 0x87b0
movq %r14, 0x80(%rbx)
movl %r14d, 0x40(%rbx)
movq 0x88(%rbx), %rdi
callq 0x87b0
movq %r14, 0x88(%rbx)
movl %r14d, 0x48(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm.cpp
// Function: bamboo::input_rtcm2(bamboo::rtcm_t*, unsigned char)
extern int input_rtcm2(rtcm_t *rtcm, unsigned char data)
{
    unsigned char preamb;
    int i;
    
    trace(5,"input_rtcm2: data=%02x\n",data);
    
    if ((data&0xC0)!=0x40) return 0; /* ignore if upper 2bit != 01 */
    
    for (i=0;i<6;i++,data>>=1) { /* decode 6-of-8 form */
        rtcm->word=(rtcm->word<<1)+(data&1);
        
        /* synchronize frame */
        if (rtcm->nbyte==0) {
            preamb=(unsigned char)(rtcm->word>>22);
            if (rtcm->word&0x40000000) preamb^=0xFF; /* decode preamble */
            if (preamb!=RTCM2PREAMB) continue;
            
            /* check parity */
            if (!decode_word(rtcm->word,rtcm->buff)) continue;
            rtcm->nbyte=3; rtcm->nbit=0;
            continue;
        }
        if (++rtcm->nbit<30) continue; else rtcm->nbit=0;
        
        /* check parity */
        if (!decode_word(rtcm->word,rtcm->buff+rtcm->nbyte)) {
            trace(2,"rtcm2 partity error: i=%d word=%08x\n",i,rtcm->word);
            rtcm->nbyte=0; rtcm->word&=0x3;
            continue;
        }
        rtcm->nbyte+=3;
        if (rtcm->nbyte==6) rtcm->len=(rtcm->buff[5]>>3)*3+6;
        if (rtcm->nbyte<rtcm->len) continue;
        rtcm->nbyte=0; rtcm->word&=0x3;
        
        /* decode rtcm2 message */
        return decode_rtcm2(rtcm);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x34eb9(%rip), %rsi     # 0x6e1f9
movl $0x5, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x4ded0
movl %r14d, %eax
andl $-0x40, %eax
cmpl $0x40, %eax
jne 0x39459
leaq 0x9f0c4(%rbx), %r15
leaq 0x34ea5(%rip), %r12     # 0x6e211
xorl %r13d, %r13d
movl 0x9f574(%rbx), %eax
movl %r14d, %ecx
andb $0x1, %cl
movzbl %cl, %ecx
leal (%rcx,%rax,2), %edi
movl %edi, 0x9f574(%rbx)
movslq 0x9f0b8(%rbx), %rsi
testq %rsi, %rsi
je 0x393f5
movl 0x9f0bc(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x9f0bc(%rbx)
cmpl $0x1d, %eax
jl 0x39449
movl $0x0, 0x9f0bc(%rbx)
addq %r15, %rsi
callq 0x4e562
testl %eax, %eax
je 0x39420
movl 0x9f0b8(%rbx), %eax
addl $0x3, %eax
movl %eax, 0x9f0b8(%rbx)
cmpl $0x6, %eax
jne 0x393eb
movzbl 0x9f0c9(%rbx), %ecx
shrl $0x3, %ecx
leal (%rcx,%rcx,2), %ecx
addl $0x6, %ecx
movl %ecx, 0x9f0c0(%rbx)
cmpl 0x9f0c0(%rbx), %eax
jl 0x39449
jmp 0x3946a
leal (%rax,%rax), %ecx
shrl $0x16, %ecx
shll $0x2, %eax
sarl $0x1f, %eax
xorl %ecx, %eax
cmpb $0x66, %al
jne 0x39449
movq %r15, %rsi
callq 0x4e562
testl %eax, %eax
je 0x39449
movq $0x3, 0x9f0b8(%rbx)
jmp 0x39449
movl 0x9f574(%rbx), %ecx
movl $0x2, %edi
movq %r12, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x4ded0
movl $0x0, 0x9f0b8(%rbx)
andl $0x3, 0x9f574(%rbx)
incl %r13d
shrb %r14b
cmpl $0x6, %r13d
jne 0x3936f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x9f0b8(%rbx)
andl $0x3, 0x9f574(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x397f8
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm.cpp
// Function: bamboo::input_rtcm3(bamboo::rtcm_t*, unsigned char)
extern int input_rtcm3(rtcm_t *rtcm, unsigned char data)
{
    trace(5,"input_rtcm3: data=%02x\n",data);
    
    /* synchronize frame */
    if (rtcm->nbyte==0) {
        if (data!=RTCM3PREAMB) return 0;
        rtcm->buff[rtcm->nbyte++]=data;
        return 0;
    }
    rtcm->buff[rtcm->nbyte++]=data;
    
    if (rtcm->nbyte==3) {
        rtcm->len=getbitu(rtcm->buff,14,10)+3; /* length without parity */
    }
    if (rtcm->nbyte<3||rtcm->nbyte<rtcm->len+3) return 0;
    rtcm->nbyte=0;
    
    /* check parity */
    if (rtk_crc24q(rtcm->buff,rtcm->len)!=getbitu(rtcm->buff,rtcm->len*8,24)) {
        trace(2,"rtcm3 parity error: len=%d\n",rtcm->len);
        return 0;
    }
    /* decode rtcm3 message */
    return decode_rtcm3(rtcm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x34d8e(%rip), %rsi     # 0x6e236
movl $0x5, %edi
movl %r15d, %edx
xorl %eax, %eax
callq 0x4ded0
movslq 0x9f0b8(%rbx), %rax
testq %rax, %rax
je 0x39561
leaq 0x9f0c4(%rbx), %r14
leal 0x1(%rax), %ecx
movl %ecx, 0x9f0b8(%rbx)
movb %r15b, 0x9f0c4(%rbx,%rax)
cmpl $0x3, 0x9f0b8(%rbx)
jne 0x39503
movq %r14, %rdi
movl $0xe, %esi
movl $0xa, %edx
callq 0x4e341
addl $0x3, %eax
movl %eax, 0x9f0c0(%rbx)
movl 0x9f0b8(%rbx), %eax
cmpl $0x3, %eax
jl 0x39593
movl 0x9f0c0(%rbx), %esi
leal 0x3(%rsi), %ecx
cmpl %ecx, %eax
jl 0x39593
movl $0x0, 0x9f0b8(%rbx)
movq %r14, %rdi
callq 0x4e4e2
movl %eax, %r15d
movl 0x9f0c0(%rbx), %esi
shll $0x3, %esi
movq %r14, %rdi
movl $0x18, %edx
callq 0x4e341
cmpl %eax, %r15d
jne 0x3957a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3ae50
cmpb $-0x2d, %r15b
jne 0x39593
movl $0x1, 0x9f0b8(%rbx)
movb %r15b, 0x9f0c4(%rbx)
jmp 0x39593
movl 0x9f0c0(%rbx), %edx
leaq 0x34cc7(%rip), %rsi     # 0x6e24e
movl $0x2, %edi
xorl %eax, %eax
callq 0x4ded0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm.cpp
// Function: bamboo::input_rtcm2f(bamboo::rtcm_t*, _IO_FILE*)
extern int input_rtcm2f(rtcm_t *rtcm, FILE *fp)
{
    int i,data=0,ret;
    
    trace(4,"input_rtcm2f: data=%02x\n",data);
    
    for (i=0;i<4096;i++) {
        if ((data=fgetc(fp))==EOF) return -2;
        if ((ret=input_rtcm2(rtcm,(unsigned char)data))) return ret;
    }
    return 0; /* return at every 4k bytes */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x34cb3(%rip), %rsi     # 0x6e26a
movl $0x4, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4ded0
movl $0x1000, %r15d          # imm = 0x1000
movq %rbx, %rdi
callq 0x89d0
cmpl $-0x1, %eax
je 0x395f0
movzbl %al, %esi
movq %r14, %rdi
callq 0x39325
testl %eax, %eax
jne 0x395f5
decl %r15d
jne 0x395cb
xorl %eax, %eax
jmp 0x395f5
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm.cpp
// Function: bamboo::input_rtcm3f(bamboo::rtcm_t*, _IO_FILE*)
extern int input_rtcm3f(rtcm_t *rtcm, FILE *fp)
{
    int i,data=0,ret;
    
    trace(4,"input_rtcm3f: data=%02x\n",data);
    
    for (i=0;i<4096;i++) {
        if ((data=fgetc(fp))==EOF) return -2;
        if ((ret=input_rtcm3(rtcm,(unsigned char)data))) return ret;
    }
    return 0; /* return at every 4k bytes */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x34c6c(%rip), %rsi     # 0x6e283
movl $0x4, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4ded0
movl $0x1000, %r15d          # imm = 0x1000
movq %rbx, %rdi
callq 0x89d0
cmpl $-0x1, %eax
je 0x39650
movzbl %al, %esi
movq %r14, %rdi
callq 0x39491
testl %eax, %eax
jne 0x39655
decl %r15d
jne 0x3962b
xorl %eax, %eax
jmp 0x39655
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm.cpp
// Function: bamboo::gen_rtcm3(bamboo::rtcm_t*, int, int)
extern int gen_rtcm3(rtcm_t *rtcm, int type, int sync)
{
    unsigned int crc;
    int i=0;
    
    trace(4,"gen_rtcm3: type=%d sync=%d\n",type,sync);
    
    rtcm->nbit=rtcm->len=rtcm->nbyte=0;
    
    /* set preamble and reserved */
    setbitu(rtcm->buff,i, 8,RTCM3PREAMB); i+= 8;
    setbitu(rtcm->buff,i, 6,0          ); i+= 6;
    setbitu(rtcm->buff,i,10,0          ); i+=10;
    
    /* encode rtcm 3 message body */
    if (!encode_rtcm3(rtcm,type,sync)) return 0;
    
    /* padding to align 8 bit boundary */
    for (i=rtcm->nbit;i%8;i++) {
        setbitu(rtcm->buff,i,1,0);
    }
    /* message length (header+data) (bytes) */
    if ((rtcm->len=i/8)>=3+1024) {
        trace(2,"generate rtcm 3 message length error len=%d\n",rtcm->len-3);
        rtcm->nbit=rtcm->len=0;
        return 0;
    }
    /* message length without header and parity */
    setbitu(rtcm->buff,14,10,rtcm->len-3);
    
    /* crc-24q */
    crc=rtk_crc24q(rtcm->buff,rtcm->len);
    setbitu(rtcm->buff,i,24,crc);
    
    /* length total (bytes) */
    rtcm->nbyte=rtcm->len+3;
    
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x34bfc(%rip), %rsi     # 0x6e2b8
xorl %r15d, %r15d
movl $0x4, %edi
movl %r13d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x4ded0
movq $0x0, 0x9f0b8(%rbx)
movl $0x0, 0x9f0c0(%rbx)
leaq 0x9f0c4(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
movl $0x8, %edx
movl $0xd3, %ecx
callq 0x4e403
movq %r14, %rdi
movl $0x8, %esi
movl $0x6, %edx
xorl %ecx, %ecx
callq 0x4e403
movq %r14, %rdi
movl $0xe, %esi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x4e403
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x44420
testl %eax, %eax
je 0x397e5
movl 0x9f0bc(%rbx), %r15d
testb $0x7, %r15b
je 0x39763
movq %r14, %rdi
movl %r15d, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4e403
incl %r15d
jmp 0x39746
movl %r15d, %eax
sarl $0x3, %eax
movl %eax, 0x9f0c0(%rbx)
leal -0x3(%rax), %ecx
cmpl $0x403, %eax            # imm = 0x403
jl 0x3979e
leaq 0x34b54(%rip), %rsi     # 0x6e2d4
xorl %r15d, %r15d
movl $0x2, %edi
movl %ecx, %edx
xorl %eax, %eax
callq 0x4ded0
movq $0x0, 0x9f0bc(%rbx)
jmp 0x397e5
movq %r14, %rdi
movl $0xe, %esi
movl $0xa, %edx
callq 0x4e403
movl 0x9f0c0(%rbx), %esi
movq %r14, %rdi
callq 0x4e4e2
movq %r14, %rdi
movl %r15d, %esi
movl $0x18, %edx
movl %eax, %ecx
callq 0x4e403
movl 0x9f0c0(%rbx), %eax
addl $0x3, %eax
movl %eax, 0x9f0b8(%rbx)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm2.cpp
// Function: bamboo::decode_type1(bamboo::rtcm_t*)
static int decode_type1(rtcm_t *rtcm)
{
    int i=48,fact,udre,prn,sat,iod;
    double prc,rrc;
    
    trace(4,"decode_type1: len=%d\n",rtcm->len);
    
    while (i+40<=rtcm->len*8) {
        fact=getbitu(rtcm->buff,i, 1); i+= 1;
        udre=getbitu(rtcm->buff,i, 2); i+= 2;
        prn =getbitu(rtcm->buff,i, 5); i+= 5;
        prc =getbits(rtcm->buff,i,16); i+=16;
        rrc =getbits(rtcm->buff,i, 8); i+= 8;
        iod =getbits(rtcm->buff,i, 8); i+= 8;
        if (prn==0) prn=32;
        if (prc==0x80000000||rrc==0xFFFF8000) {
            trace(2,"rtcm2 1 prc/rrc indicates satellite problem: prn=%d\n",prn);
            continue;
        }
        if (rtcm->dgps) {
            sat=satno(SYS_GPS,prn);
            rtcm->dgps[sat-1].t0=rtcm->time;
            rtcm->dgps[sat-1].prc=prc*(fact?0.32:0.02);
            rtcm->dgps[sat-1].rrc=rrc*(fact?0.032:0.002);
            rtcm->dgps[sat-1].iod=iod;
            rtcm->dgps[sat-1].udre=udre;
        }
    }
    return 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x9f0c0(%rdi), %edx
leaq 0x34985(%rip), %rsi     # 0x6e48d
movl $0x4, %edi
xorl %eax, %eax
callq 0x4ded0
movq %rbx, -0x30(%rbp)
cmpl $0xb, 0x9f0c0(%rbx)
jl 0x39c8b
movq -0x30(%rbp), %rax
leaq 0x9f0c4(%rax), %r14
addq $0x10, %rax
movq %rax, -0x40(%rbp)
movl $0x58, %r15d
leal -0x28(%r15), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x4e341
movl %eax, -0x34(%rbp)
leal -0x27(%r15), %esi
movq %r14, %rdi
movl $0x2, %edx
callq 0x4e341
movl %eax, -0x38(%rbp)
leal -0x25(%r15), %esi
movq %r14, %rdi
movl $0x5, %edx
callq 0x4e341
movl %eax, %r13d
leal -0x20(%r15), %esi
movq %r14, %rdi
movl $0x10, %edx
callq 0x4e390
movl %eax, %r12d
leal -0x10(%r15), %esi
movq %r14, %rdi
movl $0x8, %edx
callq 0x4e390
movl %eax, %ebx
leal -0x8(%r15), %esi
movq %r14, %rdi
movl $0x8, %edx
callq 0x4e390
movl %eax, %ecx
movq -0x30(%rbp), %rax
cmpq $0x0, 0x6f140(%rax)
je 0x39c71
testl %r13d, %r13d
movl $0x20, %eax
cmovel %eax, %r13d
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
movsd %xmm0, -0x48(%rbp)
movl $0x1, %edi
movl %r13d, %esi
movl %ecx, %ebx
callq 0x4dbc5
movq -0x30(%rbp), %rdx
movq 0x6f140(%rdx), %rcx
cltq
shlq $0x4, %rax
leaq (%rax,%rax,2), %rax
addq $-0x30, %rax
movq -0x40(%rbp), %rsi
movups (%rsi), %xmm0
movups %xmm0, (%rcx,%rax)
xorl %ecx, %ecx
cmpl $0x0, -0x34(%rbp)
sete %cl
shll $0x3, %ecx
leaq 0x3475f(%rip), %rsi     # 0x6e390
movsd -0x48(%rbp), %xmm0
mulsd (%rcx,%rsi), %xmm0
movq 0x6f140(%rdx), %rdx
movsd %xmm0, 0x10(%rdx,%rax)
leaq 0x34751(%rip), %rsi     # 0x6e3a0
movsd -0x50(%rbp), %xmm0
mulsd (%rcx,%rsi), %xmm0
movsd %xmm0, 0x18(%rdx,%rax)
movl %ebx, 0x20(%rdx,%rax)
xorps %xmm0, %xmm0
cvtsi2sdl -0x38(%rbp), %xmm0
movsd %xmm0, 0x28(%rdx,%rax)
addl $0x28, %r15d
movq -0x30(%rbp), %rax
movl 0x9f0c0(%rax), %eax
shll $0x3, %eax
cmpl %eax, %r15d
jle 0x39b3e
addq $0x28, %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/rtcm2.cpp
// Function: bamboo::decode_type3(bamboo::rtcm_t*)
static int decode_type3(rtcm_t *rtcm)
{
    int i=48;
    
    trace(4,"decode_type3: len=%d\n",rtcm->len);
    
    if (i+96<=rtcm->len*8) {
        rtcm->sta.pos[0]=getbits(rtcm->buff,i,32)*0.01; i+=32;
        rtcm->sta.pos[1]=getbits(rtcm->buff,i,32)*0.01; i+=32;
        rtcm->sta.pos[2]=getbits(rtcm->buff,i,32)*0.01;
    }
    else {
        trace(2,"rtcm2 3 length error: len=%d\n",rtcm->len);
        return -1;
    }
    return 5;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x9f0c0(%rdi), %edx
leaq 0x347f2(%rip), %rsi     # 0x6e4a3
movl $0x4, %edi
xorl %eax, %eax
callq 0x4ded0
movl 0x9f0c0(%rbx), %edx
cmpl $0x12, %edx
jl 0x39d52
leaq 0x9f0c4(%rbx), %r14
movq %r14, %rdi
movl $0x30, %esi
movl $0x20, %edx
callq 0x4e390
cvtsi2sd %eax, %xmm0
mulsd 0x31acf(%rip), %xmm0    # 0x6b7c0
movsd %xmm0, 0x6f108(%rbx)
movq %r14, %rdi
movl $0x50, %esi
movl $0x20, %edx
callq 0x4e390
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x31aa6(%rip), %xmm0    # 0x6b7c0
movsd %xmm0, 0x6f110(%rbx)
movq %r14, %rdi
movl $0x70, %esi
movl $0x20, %edx
callq 0x4e390
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x31a7d(%rip), %xmm0    # 0x6b7c0
movsd %xmm0, 0x6f118(%rbx)
movl $0x5, %eax
jmp 0x39d6a
leaq 0x34760(%rip), %rsi     # 0x6e4b9
movl $0x2, %edi
xorl %eax, %eax
callq 0x4ded0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm2.cpp
// Function: bamboo::decode_type14(bamboo::rtcm_t*)
static int decode_type14(rtcm_t *rtcm)
{
    double zcnt;
    int i=48,week,hour,leaps;
    
    trace(4,"decode_type14: len=%d\n",rtcm->len);
    
    zcnt=getbitu(rtcm->buff,24,13);
    if (i+24<=rtcm->len*8) {
        week =getbitu(rtcm->buff,i,10); i+=10;
        hour =getbitu(rtcm->buff,i, 8); i+= 8;
        leaps=getbitu(rtcm->buff,i, 6);
    }
    else {
        trace(2,"rtcm2 14 length error: len=%d\n",rtcm->len);
        return -1;
    }
    week=adjgpsweek(week);
    rtcm->time=gpst2time(week,hour*3600.0+zcnt*0.6);
    rtcm->nav.leaps=leaps;
    return 6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x9f0c0(%rdi), %edx
leaq 0x3474a(%rip), %rsi     # 0x6e4d7
movl $0x4, %edi
xorl %eax, %eax
callq 0x4ded0
leaq 0x9f0c4(%rbx), %r15
movq %r15, %rdi
movl $0x18, %esi
movl $0xd, %edx
callq 0x4e341
movl 0x9f0c0(%rbx), %edx
cmpl $0x9, %edx
jl 0x39e54
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r15, %rdi
movl $0x30, %esi
movl $0xa, %edx
callq 0x4e341
movl %eax, %r12d
movq %r15, %rdi
movl $0x3a, %esi
movl $0x8, %edx
callq 0x4e341
movl %eax, %r13d
movl $0x6, %r14d
movq %r15, %rdi
movl $0x42, %esi
movl $0x6, %edx
callq 0x4e341
movl %eax, %r15d
movl %r12d, %edi
callq 0x5081e
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd -0x30(%rbp), %xmm1
mulsd 0x344d9(%rip), %xmm1    # 0x6e308
mulsd 0x30a89(%rip), %xmm0    # 0x6a8c0
addsd %xmm1, %xmm0
movl %eax, %edi
callq 0x4fbc6
movq %rax, 0x10(%rbx)
movsd %xmm0, 0x18(%rbx)
movl %r15d, 0x2d0(%rbx)
jmp 0x39e6d
leaq 0x34693(%rip), %rsi     # 0x6e4ee
movl $0x2, %edi
xorl %eax, %eax
callq 0x4ded0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %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/rtcm2.cpp
// Function: bamboo::decode_type16(bamboo::rtcm_t*)
static int decode_type16(rtcm_t *rtcm)
{
    int i=48,n=0;
    
    trace(4,"decode_type16: len=%d\n",rtcm->len);
    
    while (i+8<=rtcm->len*8&&n<90) {
        rtcm->msg[n++]=getbitu(rtcm->buff,i,8); i+=8;
    }
    rtcm->msg[n]='\0';
    
    trace(3,"rtcm2 16 message: %s\n",rtcm->msg);
    return 9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x9f0c0(%rdi), %edx
leaq 0x34670(%rip), %rsi     # 0x6e50d
xorl %r15d, %r15d
movl $0x4, %edi
xorl %eax, %eax
callq 0x4ded0
cmpl $0x7, 0x9f0c0(%rbx)
jl 0x39efe
leaq 0x9f0c4(%rbx), %r14
movl $0x40, %r12d
xorl %r13d, %r13d
leal -0x10(%r12), %esi
movq %r14, %rdi
movl $0x8, %edx
callq 0x4e341
leaq 0x1(%r13), %r15
movb %al, 0x9b950(%rbx,%r13)
movl 0x9f0c0(%rbx), %eax
shll $0x3, %eax
cmpl %eax, %r12d
jg 0x39efe
addl $0x8, %r12d
cmpq $0x59, %r13
movq %r15, %r13
jb 0x39ec5
movb $0x0, 0x9b950(%rbx,%r15)
addq $0x9b950, %rbx          # imm = 0x9B950
leaq 0x3460f(%rip), %rsi     # 0x6e524
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ded0
// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm2.cpp
// Function: bamboo::decode_type22(bamboo::rtcm_t*)
static int decode_type22(rtcm_t *rtcm)
{
    double del[2][3]={{0}},hgt=0.0;
    int i=48,j,noh;
    
    trace(4,"decode_type22: len=%d\n",rtcm->len);
    
    if (i+24<=rtcm->len*8) {
        del[0][0]=getbits(rtcm->buff,i,8)/25600.0; i+=8;
        del[0][1]=getbits(rtcm->buff,i,8)/25600.0; i+=8;
        del[0][2]=getbits(rtcm->buff,i,8)/25600.0; i+=8;
    }
    else {
        trace(2,"rtcm2 22 length error: len=%d\n",rtcm->len);
        return -1;
    }
    if (i+24<=rtcm->len*8) {
        i+=5; noh=getbits(rtcm->buff,i,1); i+=1;
        hgt=noh?0.0:getbitu(rtcm->buff,i,18)/25600.0;
        i+=18;
    }
    if (i+24<=rtcm->len*8) {
        del[1][0]=getbits(rtcm->buff,i,8)/1600.0; i+=8;
        del[1][1]=getbits(rtcm->buff,i,8)/1600.0; i+=8;
        del[1][2]=getbits(rtcm->buff,i,8)/1600.0;
    }
    rtcm->sta.deltype=1; /* xyz */
    for (j=0;j<3;j++) rtcm->sta.del[j]=del[0][j];
    rtcm->sta.hgt=hgt;
    return 5;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x9f0c0(%rdi), %edx
leaq 0x33aa4(%rip), %rsi     # 0x6e692
movl $0x4, %edi
xorl %eax, %eax
callq 0x4ded0
movl 0x9f0c0(%rbx), %edx
cmpl $0x9, %edx
jl 0x3ac9e
leaq 0x9f0c4(%rbx), %r14
movq %r14, %rdi
movl $0x30, %esi
movl $0x8, %edx
callq 0x4e390
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r14, %rdi
movl $0x38, %esi
movl $0x8, %edx
callq 0x4e390
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x28(%rbp)
movq %r14, %rdi
movl $0x40, %esi
movl $0x8, %edx
callq 0x4e390
cvtsi2sd %eax, %xmm2
movl $0x48, %r15d
xorpd %xmm3, %xmm3
cmpl $0xb, 0x9f0c0(%rbx)
jle 0x3ace4
movsd %xmm2, -0x20(%rbp)
movq %r14, %rdi
movl $0x4d, %esi
movl $0x1, %edx
callq 0x4e390
movl $0x60, %r15d
testl %eax, %eax
je 0x3acbb
movsd -0x20(%rbp), %xmm2
xorpd %xmm3, %xmm3
jmp 0x3ace4
leaq 0x33a04(%rip), %rsi     # 0x6e6a9
movl $0x2, %edi
xorl %eax, %eax
callq 0x4ded0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3ad9f
movq %r14, %rdi
movl $0x4e, %esi
movl $0x12, %edx
callq 0x4e341
movl %eax, %eax
xorps %xmm3, %xmm3
cvtsi2sd %rax, %xmm3
divsd 0x33651(%rip), %xmm3    # 0x6e330
movsd -0x20(%rbp), %xmm2
movsd -0x30(%rbp), %xmm0
movsd 0x3363f(%rip), %xmm4    # 0x6e330
divsd %xmm4, %xmm0
movsd -0x28(%rbp), %xmm1
divsd %xmm4, %xmm1
divsd %xmm4, %xmm2
leal 0x18(%r15), %eax
movl 0x9f0c0(%rbx), %ecx
shll $0x3, %ecx
cmpl %ecx, %eax
jg 0x3ad70
movq %r14, %rdi
movl %r15d, %esi
movl $0x8, %edx
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x20(%rbp)
movsd %xmm3, -0x38(%rbp)
callq 0x4e390
leal 0x8(%r15), %esi
movq %r14, %rdi
movl $0x8, %edx
callq 0x4e390
orl $0x10, %r15d
movq %r14, %rdi
movl %r15d, %esi
movl $0x8, %edx
callq 0x4e390
movsd -0x38(%rbp), %xmm3
movsd -0x20(%rbp), %xmm2
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
movl $0x1, 0x6f100(%rbx)
movsd %xmm0, 0x6f120(%rbx)
movsd %xmm1, 0x6f128(%rbx)
movsd %xmm2, 0x6f130(%rbx)
movsd %xmm3, 0x6f138(%rbx)
movl $0x5, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq