LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::test_staid(bamboo::rtcm_t*, int)
static int test_staid(rtcm_t *rtcm, int staid)
{
    char *p;
    int type,id;
    
    /* test station id option */
    if ((p=strstr(rtcm->opt,"-STA="))&&sscanf(p,"-STA=%d",&id)==1) {
        if (staid!=id) return 0;
    }
    /* save station id */
    if (rtcm->staid==0||rtcm->obsflag) {
        rtcm->staid=staid;
    }
    else if (staid!=rtcm->staid) {
        type=getbitu(rtcm->buff,24,12);
        trace(2,"rtcm3 %d staid invalid id=%d %d\n",type,staid,rtcm->staid);
        
        /* reset station id if station id error */
        rtcm->staid=0;
        return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
addq $0x9fd48, %rdi          # imm = 0x9FD48
leaq 0x2c8b8(%rip), %rsi     # 0x6efaf
callq 0x8160
testq %rax, %rax
je 0x42724
leaq 0x2c8ad(%rip), %rsi     # 0x6efb5
xorl %r15d, %r15d
leaq -0x1c(%rbp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x8610
cmpl $0x1, %eax
jne 0x42724
cmpl %r14d, -0x1c(%rbp)
jne 0x42778
movl (%rbx), %eax
movl $0x1, %r15d
testl %eax, %eax
je 0x42775
cmpl $0x0, 0x9bdd0(%rbx)
jne 0x42775
cmpl %r14d, %eax
je 0x42778
leaq 0x9f0c4(%rbx), %rdi
movl $0x18, %esi
movl $0xc, %edx
callq 0x4d9d6
movl (%rbx), %r8d
leaq 0x2c85f(%rip), %rsi     # 0x6efbd
xorl %r15d, %r15d
movl $0x2, %edi
movl %eax, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x4d55d
xorl %r14d, %r14d
movl %r14d, (%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::adjweek(bamboo::rtcm_t*, double)
static void adjweek(rtcm_t *rtcm, double tow)
{
    double tow_p;
    int week;
    
    /* if no time, get cpu time */
    if (rtcm->time.time==0) rtcm->time=utc2gpst(timeget());
    tow_p=time2gpst(rtcm->time,&week);
    if      (tow<tow_p-302400.0) tow+=604800.0;
    else if (tow>tow_p+302400.0) tow-=604800.0;
    rtcm->time=gpst2time(week,tow);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, -0x18(%rbp)
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x427a7
movsd 0x18(%rbx), %xmm0
jmp 0x427c0
callq 0x4f542
movq %rax, %rdi
callq 0x4fa70
movq %rax, %rdi
movq %rax, 0x10(%rbx)
movsd %xmm0, 0x18(%rbx)
leaq -0xc(%rbp), %rsi
callq 0x4f2b1
movsd 0x295ff(%rip), %xmm1    # 0x6bdd0
addsd %xmm0, %xmm1
movsd -0x18(%rbp), %xmm2
ucomisd %xmm2, %xmm1
movapd %xmm2, %xmm1
jbe 0x427ee
addsd 0x295fc(%rip), %xmm1    # 0x6bde8
jmp 0x42804
addsd 0x295e2(%rip), %xmm0    # 0x6bdd8
ucomisd %xmm0, %xmm1
jbe 0x42804
addsd 0x295dc(%rip), %xmm1    # 0x6bde0
movl -0xc(%rbp), %edi
movapd %xmm1, %xmm0
callq 0x4f24a
movq %rax, 0x10(%rbx)
movsd %xmm0, 0x18(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::decode_head1009(bamboo::rtcm_t*, int*)
static int decode_head1009(rtcm_t *rtcm, int *sync)
{
    double tod;
    char *msg,tstr[64];
    int i=24,staid,nsat,type;
    
    type=getbitu(rtcm->buff,i,12); i+=12;
    
    if (i+49<=rtcm->len*8) {
        staid=getbitu(rtcm->buff,i,12);       i+=12;
        tod  =getbitu(rtcm->buff,i,27)*0.001; i+=27; /* sec in a day */
        *sync=getbitu(rtcm->buff,i, 1);       i+= 1;
        nsat =getbitu(rtcm->buff,i, 5);
    }
    else {
        trace(2,"rtcm3 %d length error: len=%d\n",type,rtcm->len);
        return -1;
    }
    /* test station id */
    if (!test_staid(rtcm,staid)) return -1;
    
    adjday_glot(rtcm,tod);
    
    time2str(rtcm->time,tstr,2);
    trace(4,"decode_head1009: time=%s nsat=%d sync=%d\n",tstr,nsat,*sync);
    
    if (rtcm->outtype) {
        msg=rtcm->msgtype+strlen(rtcm->msgtype);
        sprintf(msg," staid=%4d %s nsat=%2d sync=%d",staid,tstr,nsat,*sync);
    }
    return nsat;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9f0c4(%rdi), %r12
movq %r12, %rdi
movl $0x18, %esi
movl $0xc, %edx
callq 0x4d9d6
movl 0x9f0c0(%r14), %ecx
cmpl $0xb, %ecx
jl 0x429f3
movq %r12, %rdi
movl $0x24, %esi
movl $0xc, %edx
callq 0x4d9d6
movl %eax, %r15d
movq %r12, %rdi
movl $0x30, %esi
movl $0x1b, %edx
callq 0x4d9d6
movl %eax, %r13d
movq %r12, %rdi
movl $0x4b, %esi
movl $0x1, %edx
callq 0x4d9d6
movl %eax, (%rbx)
movq %r12, %rdi
movl $0x4c, %esi
movl $0x5, %edx
callq 0x4d9d6
movl %eax, %r12d
movq %r14, %rdi
movl %r15d, %esi
callq 0x426d9
testl %eax, %eax
je 0x42a08
movl %r13d, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x293ff(%rip), %xmm0    # 0x6bd78
movq %r14, %rdi
callq 0x42a20
movq 0x10(%r14), %rdi
movsd 0x18(%r14), %xmm0
leaq -0x70(%rbp), %r13
movq %r13, %rsi
movl $0x2, %edx
callq 0x4fcf1
movl (%rbx), %r8d
leaq 0x2c76a(%rip), %rsi     # 0x6f110
movl $0x4, %edi
movq %r13, %rdx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x4d55d
cmpl $0x0, 0xc(%r14)
je 0x42a0e
leaq 0x9b9d0(%r14), %rdi
callq 0x8290
leaq (%r14,%rax), %rdi
addq $0x9b9d0, %rdi          # imm = 0x9B9D0
movl (%rbx), %r9d
leaq 0x2c5b0(%rip), %rsi     # 0x6ef90
leaq -0x70(%rbp), %rcx
movl %r15d, %edx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x8120
jmp 0x42a0e
leaq 0x2c54d(%rip), %rsi     # 0x6ef47
movl $0x2, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x4d55d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::adjday_glot(bamboo::rtcm_t*, double)
static void adjday_glot(rtcm_t *rtcm, double tod)
{
    gtime_t time;
    double tow,tod_p;
    int week;
    
    if (rtcm->time.time==0) rtcm->time=utc2gpst(timeget());
    time=timeadd(gpst2utc(rtcm->time),10800.0); /* glonass time */
    tow=time2gpst(time,&week);
    tod_p=fmod(tow,86400.0); tow-=tod_p;
    if      (tod<tod_p-43200.0) tod+=86400.0;
    else if (tod>tod_p+43200.0) tod-=86400.0;
    time=gpst2time(week,tow+tod);
    rtcm->time=utc2gpst(timeadd(time,-10800.0));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, -0x20(%rbp)
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x42a41
movsd 0x18(%rbx), %xmm0
jmp 0x42a5a
callq 0x4f542
movq %rax, %rdi
callq 0x4fa70
movq %rax, %rdi
movq %rax, 0x10(%rbx)
movsd %xmm0, 0x18(%rbx)
callq 0x4f9b0
movsd 0x28049(%rip), %xmm1    # 0x6aab0
movq %rax, %rdi
callq 0x4f4e7
leaq -0xc(%rbp), %rsi
movq %rax, %rdi
callq 0x4f2b1
movsd 0x27e4d(%rip), %xmm1    # 0x6a8d0
movsd %xmm0, -0x18(%rbp)
callq 0x8850
movsd 0x2935b(%rip), %xmm1    # 0x6bdf0
addsd %xmm0, %xmm1
movsd -0x20(%rbp), %xmm2
ucomisd %xmm2, %xmm1
jbe 0x42aae
addsd 0x27e24(%rip), %xmm2    # 0x6a8d0
jmp 0x42ac8
movsd 0x29342(%rip), %xmm1    # 0x6bdf8
addsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x42ac8
addsd 0x29338(%rip), %xmm2    # 0x6be00
movsd -0x18(%rbp), %xmm1
subsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movl -0xc(%rbp), %edi
movapd %xmm1, %xmm0
callq 0x4f24a
movsd 0x292df(%rip), %xmm1    # 0x6bdc8
movq %rax, %rdi
callq 0x4f4e7
movq %rax, %rdi
callq 0x4fa70
movq %rax, 0x10(%rbx)
movsd %xmm0, 0x18(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_type1005(bamboo::rtcm_t*, int)
static int encode_type1005(rtcm_t *rtcm, int sync)
{
    double *p=rtcm->sta.pos;
    int i=24;
    
    trace(3,"encode_type1005: sync=%d\n",sync);
    
    setbitu(rtcm->buff,i,12,1005       ); i+=12; /* message no */
    setbitu(rtcm->buff,i,12,rtcm->staid); i+=12; /* ref station id */
    setbitu(rtcm->buff,i, 6,0          ); i+= 6; /* itrf realization year */
    setbitu(rtcm->buff,i, 1,1          ); i+= 1; /* gps indicator */
    setbitu(rtcm->buff,i, 1,1          ); i+= 1; /* glonass indicator */
    setbitu(rtcm->buff,i, 1,0          ); i+= 1; /* galileo indicator */
    setbitu(rtcm->buff,i, 1,0          ); i+= 1; /* ref station indicator */
    set38bits(rtcm->buff,i,p[0]/0.0001 ); i+=38; /* antenna ref point ecef-x */
    setbitu(rtcm->buff,i, 1,1          ); i+= 1; /* oscillator indicator */
    setbitu(rtcm->buff,i, 1,0          ); i+= 1; /* reserved */
    set38bits(rtcm->buff,i,p[1]/0.0001 ); i+=38; /* antenna ref point ecef-y */
    setbitu(rtcm->buff,i, 2,0          ); i+= 2; /* quarter cycle indicator */
    set38bits(rtcm->buff,i,p[2]/0.0001 ); i+=38; /* antenna ref point ecef-z */
    rtcm->nbit=i;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %edx
movq %rdi, %rbx
leaq 0x2b9c6(%rip), %rsi     # 0x70354
movl $0x3, %edi
xorl %eax, %eax
callq 0x4d55d
leaq 0x9f0c4(%rbx), %r14
movq %r14, %rdi
movl $0x18, %esi
movl $0xc, %edx
movl $0x3ed, %ecx            # imm = 0x3ED
callq 0x4da98
movl (%rbx), %ecx
movq %r14, %rdi
movl $0x24, %esi
movl $0xc, %edx
callq 0x4da98
movq %r14, %rdi
movl $0x30, %esi
movl $0x6, %edx
xorl %ecx, %ecx
callq 0x4da98
movq %r14, %rdi
movl $0x36, %esi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x4da98
movq %r14, %rdi
movl $0x37, %esi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x4da98
movq %r14, %rdi
movl $0x38, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4da98
movq %r14, %rdi
movl $0x39, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4da98
movsd 0x6f108(%rbx), %xmm0
divsd 0x25eda(%rip), %xmm0    # 0x6a920
movq %r14, %rdi
movl $0x3a, %esi
callq 0x4b1c8
movq %r14, %rdi
movl $0x60, %esi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x4da98
movq %r14, %rdi
movl $0x61, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4da98
movsd 0x6f110(%rbx), %xmm0
divsd 0x25e92(%rip), %xmm0    # 0x6a920
movq %r14, %rdi
movl $0x62, %esi
callq 0x4b1c8
movq %r14, %rdi
movl $0x88, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x4da98
movsd 0x6f118(%rbx), %xmm0
divsd 0x25e61(%rip), %xmm0    # 0x6a920
movq %r14, %rdi
movl $0x8a, %esi
callq 0x4b1c8
movl $0xb0, 0x9f0bc(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_type1007(bamboo::rtcm_t*, int)
static int encode_type1007(rtcm_t *rtcm, int sync)
{
    int i=24,j,antsetup=rtcm->sta.antsetup;
    int n=MIN(strlen(rtcm->sta.antdes),31);
    
    trace(3,"encode_type1007: sync=%d\n",sync);
    
    setbitu(rtcm->buff,i,12,1007       ); i+=12; /* message no */
    setbitu(rtcm->buff,i,12,rtcm->staid); i+=12; /* ref station id */
    
    /* antenna descriptor */
    setbitu(rtcm->buff,i,8,n); i+=8;
    for (j=0;j<n;j++) {
        setbitu(rtcm->buff,i,8,rtcm->sta.antdes[j]); i+=8;
    }
    setbitu(rtcm->buff,i,8,antsetup); i+=8; /* antetnna setup id */
    rtcm->nbit=i;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r13d
movq %rdi, %rbx
movl 0x6f0f8(%rdi), %eax
movl %eax, -0x2c(%rbp)
leaq 0x6efb8(%rdi), %r15
movq %r15, %rdi
callq 0x8290
movq %rax, %r14
cmpq $0x1f, %rax
movl $0x1f, %r12d
cmovbq %rax, %r12
leaq 0x2b6b4(%rip), %rsi     # 0x703a6
movl $0x3, %edi
movl %r13d, %edx
xorl %eax, %eax
callq 0x4d55d
leaq 0x9f0c4(%rbx), %r13
movq %r13, %rdi
movl $0x18, %esi
movl $0xc, %edx
movl $0x3ef, %ecx            # imm = 0x3EF
callq 0x4da98
movq %rbx, -0x38(%rbp)
movl (%rbx), %ecx
movq %r13, %rdi
movl $0x24, %esi
movl $0xc, %edx
callq 0x4da98
movq %r13, %rdi
movl $0x30, %esi
movl $0x8, %edx
movl %r12d, %ecx
callq 0x4da98
testq %r14, %r14
je 0x44d7c
movl $0x38, %r14d
xorl %ebx, %ebx
movsbl (%r15,%rbx), %ecx
movq %r13, %rdi
movl %r14d, %esi
movl $0x8, %edx
callq 0x4da98
addl $0x8, %r14d
incq %rbx
cmpq %rbx, %r12
jne 0x44d59
jmp 0x44d82
movl $0x38, %r14d
movq %r13, %rdi
movl %r14d, %esi
movl $0x8, %edx
movl -0x2c(%rbp), %ecx
callq 0x4da98
addl $0x8, %r14d
movq -0x38(%rbp), %rax
movl %r14d, 0x9f0bc(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_type1008(bamboo::rtcm_t*, int)
static int encode_type1008(rtcm_t *rtcm, int sync)
{
    int i=24,j,antsetup=rtcm->sta.antsetup;
    int n=MIN(strlen(rtcm->sta.antdes),31);
    int m=MIN(strlen(rtcm->sta.antsno),31);
    
    trace(3,"encode_type1008: sync=%d\n",sync);
    
    setbitu(rtcm->buff,i,12,1008       ); i+=12; /* message no */
    setbitu(rtcm->buff,i,12,rtcm->staid); i+=12; /* ref station id */
    
    /* antenna descriptor */
    setbitu(rtcm->buff,i,8,n); i+=8;
    for (j=0;j<n;j++) {
        setbitu(rtcm->buff,i,8,rtcm->sta.antdes[j]); i+=8;
    }
    setbitu(rtcm->buff,i,8,antsetup); i+=8; /* antenna setup id */
    
    /* antenna serial number */
    setbitu(rtcm->buff,i,8,m); i+=8;
    for (j=0;j<m;j++) {
        setbitu(rtcm->buff,i,8,rtcm->sta.antsno[j]); i+=8;
    }
    rtcm->nbit=i;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, -0x30(%rbp)
movq %rdi, %r14
movl 0x6f0f8(%rdi), %eax
movl %eax, -0x34(%rbp)
leaq 0x6efb8(%rdi), %r13
movq %r13, %rdi
callq 0x8290
movq %rax, %rbx
movl $0x1f, %r12d
cmpq %r12, %rax
movl $0x1f, %r15d
cmovbq %rax, %r15
leaq 0x6eff8(%r14), %rdi
movq %rdi, -0x40(%rbp)
callq 0x8290
cmpq $0x1f, %rax
movq %rax, -0x48(%rbp)
cmovbq %rax, %r12
movq %r12, -0x50(%rbp)
leaq 0x2b5a1(%rip), %rsi     # 0x703c0
movl $0x3, %edi
movl -0x30(%rbp), %edx
xorl %eax, %eax
callq 0x4d55d
leaq 0x9f0c4(%r14), %r12
movq %r12, %rdi
movl $0x18, %esi
movl $0xc, %edx
movl $0x3f0, %ecx            # imm = 0x3F0
callq 0x4da98
movq %r14, -0x30(%rbp)
movl (%r14), %ecx
movq %r12, %rdi
movl $0x24, %esi
movl $0xc, %edx
callq 0x4da98
movq %r12, %rdi
movl $0x30, %esi
movl $0x8, %edx
movl %r15d, %ecx
callq 0x4da98
testq %rbx, %rbx
je 0x44ea9
movl $0x38, %ebx
xorl %r14d, %r14d
movsbl (%r13,%r14), %ecx
movq %r12, %rdi
movl %ebx, %esi
movl $0x8, %edx
callq 0x4da98
addl $0x8, %ebx
incq %r14
cmpq %r14, %r15
jne 0x44e87
jmp 0x44eae
movl $0x38, %ebx
movq %r12, %rdi
movl %ebx, %esi
movl $0x8, %edx
movl -0x34(%rbp), %ecx
callq 0x4da98
leal 0x8(%rbx), %esi
movq %r12, %rdi
movl $0x8, %edx
movq -0x50(%rbp), %r15
movl %r15d, %ecx
callq 0x4da98
addl $0x10, %ebx
cmpq $0x0, -0x48(%rbp)
je 0x44f08
xorl %r14d, %r14d
movq -0x40(%rbp), %r13
movsbl (%r13,%r14), %ecx
movq %r12, %rdi
movl %ebx, %esi
movl $0x8, %edx
callq 0x4da98
addl $0x8, %ebx
incq %r14
cmpq %r14, %r15
jne 0x44ee8
movq -0x30(%rbp), %rax
movl %ebx, 0x9f0bc(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm1(bamboo::rtcm_t*, int, int)
static int encode_msm1(rtcm_t *rtcm, int sys, int sync)
{
    double rrng[64],rrate[64],psrng[64];
    int i,nsat,ncell;
    
    trace(3,"encode_msm1: sys=%d sync=%d\n",sys,sync);
    
    /* encode msm header */
    if (!(i=encode_msm_head(1,rtcm,sys,sync,&nsat,&ncell,rrng,rrate,NULL,psrng,
                            NULL,NULL,NULL,NULL,NULL))) {
        return 0;
    }
    /* encode msm satellite data */
    i=encode_msm_mod_rrng(rtcm,i,rrng ,nsat ); /* rough range modulo 1 ms */
    
    /* encode msm signal data */
    i=encode_msm_psrng   (rtcm,i,psrng,ncell); /* fine pseudorange */
    
    rtcm->nbit=i;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x660, %rsp            # imm = 0x660
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x26808(%rip), %rsi     # 0x705e7
xorl %r14d, %r14d
movl $0x3, %edi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4d55d
movq %r14, 0x40(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
movups %xmm0, 0x20(%rsp)
leaq -0x230(%rbp), %rax
movq %rax, 0x18(%rsp)
movq %r14, 0x10(%rsp)
leaq -0x630(%rbp), %rax
movq %rax, 0x8(%rsp)
leaq -0x430(%rbp), %rax
movq %rax, (%rsp)
leaq -0x28(%rbp), %r8
leaq -0x24(%rbp), %r9
movl $0x1, %edi
movq %rbx, %rsi
movl %r12d, %edx
movl %r15d, %ecx
callq 0x4b94e
testl %eax, %eax
je 0x49e81
movl -0x28(%rbp), %ecx
leaq -0x430(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x4c45d
movl -0x24(%rbp), %ecx
leaq -0x230(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x4c4fb
movl %eax, 0x9f0bc(%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0x660, %rsp            # imm = 0x660
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm2(bamboo::rtcm_t*, int, int)
static int encode_msm2(rtcm_t *rtcm, int sys, int sync)
{
    double rrng[64],rrate[64],phrng[64],lock[64];
    unsigned char half[64];
    int i,nsat,ncell;
    
    trace(3,"encode_msm2: sys=%d sync=%d\n",sys,sync);
    
    /* encode msm header */
    if (!(i=encode_msm_head(2,rtcm,sys,sync,&nsat,&ncell,rrng,rrate,NULL,NULL,
                            phrng,NULL,lock,half,NULL))) {
        return 0;
    }
    /* encode msm satellite data */
    i=encode_msm_mod_rrng(rtcm,i,rrng ,nsat ); /* rough range modulo 1 ms */
    
    /* encode msm signal data */
    i=encode_msm_phrng   (rtcm,i,phrng,ncell); /* fine phase-range */
    i=encode_msm_lock    (rtcm,i,lock ,ncell); /* lock-time indicator */
    i=encode_msm_half_amb(rtcm,i,half ,ncell); /* half-cycle-amb indicator */
    
    rtcm->nbit=i;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x26779(%rip), %rsi     # 0x70631
xorl %r14d, %r14d
movl $0x3, %edi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4d55d
movq %r14, 0x40(%rsp)
leaq -0x80(%rbp), %rax
movq %rax, 0x38(%rsp)
leaq -0x280(%rbp), %rax
movq %rax, 0x30(%rsp)
movq %r14, 0x28(%rsp)
leaq -0x480(%rbp), %rax
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq -0x880(%rbp), %rax
movq %rax, 0x8(%rsp)
leaq -0x680(%rbp), %rax
movq %rax, (%rsp)
leaq -0x30(%rbp), %r8
leaq -0x2c(%rbp), %r9
movl $0x2, %edi
movq %rbx, %rsi
movl %r12d, %edx
movl %r15d, %ecx
callq 0x4b94e
testl %eax, %eax
je 0x49fc6
movl -0x30(%rbp), %ecx
leaq -0x680(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x4c45d
movslq -0x2c(%rbp), %r14
leaq -0x480(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4c727
leaq -0x280(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4c80e
movl %eax, %r15d
testq %r14, %r14
jle 0x49fb9
movq %rbx, -0x38(%rbp)
leaq 0x9f0c4(%rbx), %r12
movl %r15d, %ebx
xorl %r13d, %r13d
leal (%rbx,%r13), %esi
movzbl -0x80(%rbp,%r13), %ecx
movq %r12, %rdi
movl $0x1, %edx
callq 0x4da98
incq %r13
cmpq %r13, %r14
jne 0x49f93
addl %r13d, %r15d
movq -0x38(%rbp), %rbx
movl %r15d, 0x9f0bc(%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm3(bamboo::rtcm_t*, int, int)
static int encode_msm3(rtcm_t *rtcm, int sys, int sync)
{
    double rrng[64],rrate[64],psrng[64],phrng[64],lock[64];
    unsigned char half[64];
    int i,nsat,ncell;
    
    trace(3,"encode_msm3: sys=%d sync=%d\n",sys,sync);
    
    /* encode msm header */
    if (!(i=encode_msm_head(3,rtcm,sys,sync,&nsat,&ncell,rrng,rrate,NULL,psrng,
                            phrng,NULL,lock,half,NULL))) {
        return 0;
    }
    /* encode msm satellite data */
    i=encode_msm_mod_rrng(rtcm,i,rrng ,nsat ); /* rough range modulo 1 ms */
    
    /* encode msm signal data */
    i=encode_msm_psrng   (rtcm,i,psrng,ncell); /* fine pseudorange */
    i=encode_msm_phrng   (rtcm,i,phrng,ncell); /* fine phase-range */
    i=encode_msm_lock    (rtcm,i,lock ,ncell); /* lock-time indicator */
    i=encode_msm_half_amb(rtcm,i,half ,ncell); /* half-cycle-amb indicator */
    
    rtcm->nbit=i;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa58, %rsp            # imm = 0xA58
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x2667c(%rip), %rsi     # 0x7067b
xorl %r14d, %r14d
movl $0x3, %edi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4d55d
subq $0x8, %rsp
leaq -0x80(%rbp), %rax
leaq -0x280(%rbp), %r10
leaq -0x480(%rbp), %r11
leaq -0x680(%rbp), %r13
leaq -0x34(%rbp), %r8
leaq -0x30(%rbp), %r9
movl $0x3, %edi
movq %rbx, %rsi
movl %r12d, %edx
movl %r15d, %ecx
pushq %r14
pushq %rax
pushq %r10
pushq %r14
pushq %r11
pushq %r13
pushq %r14
leaq -0xa80(%rbp), %rax
pushq %rax
leaq -0x880(%rbp), %rax
pushq %rax
callq 0x4b94e
addq $0x50, %rsp
testl %eax, %eax
je 0x4a10f
movl -0x34(%rbp), %ecx
leaq -0x880(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x4c45d
movslq -0x30(%rbp), %r14
leaq -0x680(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4c4fb
leaq -0x480(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4c727
leaq -0x280(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4c80e
testq %r14, %r14
jle 0x4a103
leaq 0x9f0c4(%rbx), %r12
movl %eax, -0x2c(%rbp)
movl %eax, %r15d
xorl %r13d, %r13d
leal (%r15,%r13), %esi
movzbl -0x80(%rbp,%r13), %ecx
movq %r12, %rdi
movl $0x1, %edx
callq 0x4da98
incq %r13
cmpq %r13, %r14
jne 0x4a0de
movl -0x2c(%rbp), %eax
addl %r13d, %eax
movl %eax, 0x9f0bc(%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0xa58, %rsp            # imm = 0xA58
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm4(bamboo::rtcm_t*, int, int)
static int encode_msm4(rtcm_t *rtcm, int sys, int sync)
{
    double rrng[64],rrate[64],psrng[64],phrng[64],lock[64];
    float cnr[64];
    unsigned char half[64];
    int i,nsat,ncell;
    
    trace(3,"encode_msm4: sys=%d sync=%d\n",sys,sync);
    
    /* encode msm header */
    if (!(i=encode_msm_head(4,rtcm,sys,sync,&nsat,&ncell,rrng,rrate,NULL,psrng,
                            phrng,NULL,lock,half,cnr))) {
        return 0;
    }
    /* encode msm satellite data */
    i=encode_msm_int_rrng(rtcm,i,rrng ,nsat ); /* rough range integer ms */
    i=encode_msm_mod_rrng(rtcm,i,rrng ,nsat ); /* rough range modulo 1 ms */
    
    /* encode msm signal data */
    i=encode_msm_psrng   (rtcm,i,psrng,ncell); /* fine pseudorange */
    i=encode_msm_phrng   (rtcm,i,phrng,ncell); /* fine phase-range */
    i=encode_msm_lock    (rtcm,i,lock ,ncell); /* lock-time indicator */
    i=encode_msm_half_amb(rtcm,i,half ,ncell); /* half-cycle-amb indicator */
    i=encode_msm_cnr     (rtcm,i,cnr  ,ncell); /* signal cnr */
    rtcm->nbit=i;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb58, %rsp            # imm = 0xB58
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x26550(%rip), %rsi     # 0x70698
xorl %r14d, %r14d
movl $0x3, %edi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4d55d
subq $0x8, %rsp
leaq -0x180(%rbp), %rax
leaq -0x80(%rbp), %r10
leaq -0x380(%rbp), %r11
leaq -0x580(%rbp), %r13
leaq -0x34(%rbp), %r8
leaq -0x30(%rbp), %r9
movl $0x4, %edi
movq %rbx, %rsi
movl %r12d, %edx
movl %r15d, %ecx
pushq %rax
pushq %r10
pushq %r11
pushq %r14
pushq %r13
leaq -0x780(%rbp), %rax
pushq %rax
pushq %r14
leaq -0xb80(%rbp), %rax
pushq %rax
leaq -0x980(%rbp), %rax
pushq %rax
callq 0x4b94e
addq $0x50, %rsp
testl %eax, %eax
je 0x4a289
movl -0x34(%rbp), %r14d
leaq -0x980(%rbp), %r15
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x4c9b9
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x4c45d
movslq -0x30(%rbp), %r14
leaq -0x780(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4c4fb
leaq -0x580(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4c727
leaq -0x380(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4c80e
testq %r14, %r14
jle 0x4a269
leaq 0x9f0c4(%rbx), %r12
movl %eax, -0x2c(%rbp)
movl %eax, %r15d
xorl %r13d, %r13d
leal (%r15,%r13), %esi
movzbl -0x80(%rbp,%r13), %ecx
movq %r12, %rdi
movl $0x1, %edx
callq 0x4da98
incq %r13
cmpq %r13, %r14
jne 0x4a244
movl -0x2c(%rbp), %eax
addl %r13d, %eax
leaq -0x180(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4cab0
movl %eax, 0x9f0bc(%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0xb58, %rsp            # imm = 0xB58
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm6(bamboo::rtcm_t*, int, int)
static int encode_msm6(rtcm_t *rtcm, int sys, int sync)
{
    double rrng[64],rrate[64],psrng[64],phrng[64],lock[64];
    float cnr[64];
    unsigned char half[64];
    int i,nsat,ncell;
    
    trace(3,"encode_msm6: sys=%d sync=%d\n",sys,sync);
    
    /* encode msm header */
    if (!(i=encode_msm_head(6,rtcm,sys,sync,&nsat,&ncell,rrng,rrate,NULL,psrng,
                            phrng,NULL,lock,half,cnr))) {
        return 0;
    }
    /* encode msm satellite data */
    i=encode_msm_int_rrng(rtcm,i,rrng ,nsat ); /* rough range integer ms */
    i=encode_msm_mod_rrng(rtcm,i,rrng ,nsat ); /* rough range modulo 1 ms */
    
    /* encode msm signal data */
    i=encode_msm_psrng_ex(rtcm,i,psrng,ncell); /* fine pseudorange ext */
    i=encode_msm_phrng_ex(rtcm,i,phrng,ncell); /* fine phase-range ext */
    i=encode_msm_lock_ex (rtcm,i,lock ,ncell); /* lock-time indicator ext */
    i=encode_msm_half_amb(rtcm,i,half ,ncell); /* half-cycle-amb indicator */
    i=encode_msm_cnr_ex  (rtcm,i,cnr  ,ncell); /* signal cnr ext */
    rtcm->nbit=i;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb58, %rsp            # imm = 0xB58
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x262b4(%rip), %rsi     # 0x7075d
xorl %r14d, %r14d
movl $0x3, %edi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4d55d
subq $0x8, %rsp
leaq -0x180(%rbp), %rax
leaq -0x80(%rbp), %r10
leaq -0x380(%rbp), %r11
leaq -0x580(%rbp), %r13
leaq -0x34(%rbp), %r8
leaq -0x30(%rbp), %r9
movl $0x6, %edi
movq %rbx, %rsi
movl %r12d, %edx
movl %r15d, %ecx
pushq %rax
pushq %r10
pushq %r11
pushq %r14
pushq %r13
leaq -0x780(%rbp), %rax
pushq %rax
pushq %r14
leaq -0xb80(%rbp), %rax
pushq %rax
leaq -0x980(%rbp), %rax
pushq %rax
callq 0x4b94e
addq $0x50, %rsp
testl %eax, %eax
je 0x4a5ea
movl -0x34(%rbp), %r14d
leaq -0x980(%rbp), %r15
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x4c9b9
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x4c45d
movslq -0x30(%rbp), %r14
leaq -0x780(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4ccb7
leaq -0x580(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4cd9e
leaq -0x380(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4ce85
testq %r14, %r14
jle 0x4a5ca
leaq 0x9f0c4(%rbx), %r12
movl %eax, -0x2c(%rbp)
movl %eax, %r15d
xorl %r13d, %r13d
leal (%r15,%r13), %esi
movzbl -0x80(%rbp,%r13), %ecx
movq %r12, %rdi
movl $0x1, %edx
callq 0x4da98
incq %r13
cmpq %r13, %r14
jne 0x4a5a5
movl -0x2c(%rbp), %eax
addl %r13d, %eax
leaq -0x180(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %esi
movl %r14d, %ecx
callq 0x4d20c
movl %eax, 0x9f0bc(%rbx)
movl $0x1, %r14d
movl %r14d, %eax
addq $0xb58, %rsp            # imm = 0xB58
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_head(int, bamboo::rtcm_t*, int, int, int)
static int encode_head(int type, rtcm_t *rtcm, int sys, int sync, int nsat)
{
    double tow;
    int i=24,week,epoch;
    
    trace(4,"encode_head: type=%d sync=%d sys=%d nsat=%d\n",type,sync,sys,nsat);
    
    setbitu(rtcm->buff,i,12,type       ); i+=12; /* message no */
    setbitu(rtcm->buff,i,12,rtcm->staid); i+=12; /* ref station id */
    
    if (sys==SYS_GLO) {
        tow=time2gpst(timeadd(gpst2utc(rtcm->time),10800.0),&week);
        epoch=ROUND(fmod(tow,86400.0)/0.001);
        setbitu(rtcm->buff,i,27,epoch); i+=27; /* glonass epoch time */
    }
    else {
        tow=time2gpst(rtcm->time,&week);
        epoch=ROUND(tow/0.001);
        setbitu(rtcm->buff,i,30,epoch); i+=30; /* gps epoch time */
    }
    setbitu(rtcm->buff,i, 1,sync); i+= 1; /* synchronous gnss flag */
    setbitu(rtcm->buff,i, 5,nsat); i+= 5; /* no of satellites */
    setbitu(rtcm->buff,i, 1,0   ); i+= 1; /* smoothing indicator */
    setbitu(rtcm->buff,i, 3,0   ); i+= 3; /* smoothing interval */
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r9d
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %r13
movl %edi, %ebx
leaq 0x25674(%rip), %rsi     # 0x702d9
movl $0x4, %edi
movl %ebx, %edx
movl %r12d, %r8d
movl %r9d, -0x2c(%rbp)
xorl %eax, %eax
callq 0x4d55d
leaq 0x9f0c4(%r13), %r14
movq %r14, %rdi
movl $0x18, %esi
movl $0xc, %edx
movl %ebx, %ecx
callq 0x4da98
movl (%r13), %ecx
movq %r14, %rdi
movl $0x24, %esi
movl $0xc, %edx
callq 0x4da98
movq 0x10(%r13), %rdi
movsd 0x18(%r13), %xmm0
cmpl $0x4, %r12d
jne 0x4acf7
callq 0x4f9b0
movsd 0x1fde8(%rip), %xmm1    # 0x6aab0
movq %rax, %rdi
callq 0x4f4e7
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x4f2b1
movsd 0x1fbec(%rip), %xmm1    # 0x6a8d0
callq 0x8850
movl $0x4b, %r12d
movl $0x1b, %r13d
jmp 0x4ad0c
leaq -0x30(%rbp), %rsi
callq 0x4f2b1
movl $0x4e, %r12d
movl $0x1e, %r13d
divsd 0x21064(%rip), %xmm0    # 0x6bd78
addsd 0x20f5c(%rip), %xmm0    # 0x6bc78
callq 0x8ac0
cvttsd2si %xmm0, %ecx
movq %r14, %rdi
movl $0x30, %esi
movl %r13d, %edx
callq 0x4da98
movq %r14, %rdi
movl %r12d, %esi
movl $0x1, %edx
movl %r15d, %ecx
callq 0x4da98
leal 0x1(%r12), %esi
movq %r14, %rdi
movl $0x5, %edx
movl -0x2c(%rbp), %ecx
callq 0x4da98
leal 0x6(%r12), %esi
movq %r14, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4da98
leal 0x7(%r12), %esi
movq %r14, %rdi
movl $0x3, %edx
xorl %ecx, %ecx
callq 0x4da98
addl $0xa, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::to_lock(int)
static int to_lock(int lock)
{
    if (lock<0  ) return 0;
    if (lock<24 ) return lock;
    if (lock<72 ) return (lock+24  )/2;
    if (lock<168) return (lock+120 )/4;
    if (lock<360) return (lock+408 )/8;
    if (lock<744) return (lock+1176)/16;
    if (lock<937) return (lock+3096)/32;
    return 127;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
js 0x4b174
cmpl $0x18, %edi
jb 0x4b1c4
cmpl $0x47, %edi
ja 0x4b178
addl $0x18, %edi
shrl %edi
jmp 0x4b1c4
xorl %eax, %eax
jmp 0x4b1c6
cmpl $0xa7, %edi
ja 0x4b188
addl $0x78, %edi
shrl $0x2, %edi
jmp 0x4b1c4
cmpl $0x167, %edi            # imm = 0x167
ja 0x4b19b
addl $0x198, %edi            # imm = 0x198
shrl $0x3, %edi
jmp 0x4b1c4
cmpl $0x2e7, %edi            # imm = 0x2E7
ja 0x4b1ae
addl $0x498, %edi            # imm = 0x498
shrl $0x4, %edi
jmp 0x4b1c4
movl $0x7f, %eax
cmpl $0x3a8, %edi            # imm = 0x3A8
ja 0x4b1c6
addl $0xc18, %edi            # imm = 0xC18
shrl $0x5, %edi
movl %edi, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::set38bits(unsigned char*, int, double)
static void set38bits(unsigned char *buff, int pos, double value)
{
    int word_h=(int)floor(value/64.0);
    unsigned int word_l=(unsigned int)(value-word_h*64.0);
    setbits(buff,pos  ,32,word_h);
    setbitu(buff,pos+32,6,word_l);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movapd %xmm0, %xmm1
movsd %xmm0, -0x20(%rbp)
movl %esi, %ebx
movq %rdi, %r14
movsd 0x21b38(%rip), %xmm0    # 0x6cd20
mulsd %xmm1, %xmm0
callq 0x8ac0
cvttsd2si %xmm0, %ecx
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
mulsd 0x24f9b(%rip), %xmm0    # 0x701a0
addsd -0x20(%rbp), %xmm0
cvttsd2si %xmm0, %r15
movq %r14, %rdi
movl %ebx, %esi
movl $0x20, %edx
callq 0x4db0c
addl $0x20, %ebx
movq %r14, %rdi
movl %ebx, %esi
movl $0x6, %edx
movl %r15d, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4da98
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_mod_rrng(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_mod_rrng(rtcm_t *rtcm, int i, const double *rrng,
                               int nsat)
{
    unsigned int mod_ms;
    int j;
    
    for (j=0;j<nsat;j++) {
        if (rrng[j]<=0.0||rrng[j]>RANGE_MS*255.0) {
            mod_ms=0;
        }
        else {
            mod_ms=ROUND_U(rrng[j]/RANGE_MS/P2_10)&0x3FFu;
        }
        setbitu(rtcm->buff,i,10,mod_ms); i+=10;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %ecx, %ecx
jle 0x4c4ea
movq %rdx, %r14
movq %rdi, %r15
addq $0x9f0c4, %r15          # imm = 0x9F0C4
movl %ecx, %r12d
xorl %r13d, %r13d
movsd (%r14,%r13,8), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movl $0x0, %ecx
jae 0x4c4d0
ucomisd 0x23d17(%rip), %xmm0    # 0x701b8
movl $0x0, %ecx
ja 0x4c4d0
divsd 0x22950(%rip), %xmm0    # 0x6ee00
mulsd 0x23cf0(%rip), %xmm0    # 0x701a8
addsd 0x1f7b8(%rip), %xmm0    # 0x6bc78
callq 0x8ac0
cvttsd2si %xmm0, %rcx
andl $0x3ff, %ecx            # imm = 0x3FF
movq %r15, %rdi
movl %ebx, %esi
movl $0xa, %edx
callq 0x4da98
addl $0xa, %ebx
incq %r13
cmpq %r13, %r12
jne 0x4c484
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_psrng(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_psrng(rtcm_t *rtcm, int i, const double *psrng, int ncell)
{
    int j,psrng_val;
    
    for (j=0;j<ncell;j++) {
        if (psrng[j]==0.0) {
            psrng_val=-16384;
        }
        else if (fabs(psrng[j])>292.7) {
            trace(2,"msm fine pseudorange overflow %s psrng=%.3f\n",
                 time_str(rtcm->time,0),psrng[j]);
            psrng_val=-16384;
        }
        else {
            psrng_val=ROUND(psrng[j]/RANGE_MS/P2_24);
        }
        setbits(rtcm->buff,i,15,psrng_val); i+=15;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
testl %ecx, %ecx
jle 0x4c5d1
movq %rdx, %r14
movq %rdi, -0x30(%rbp)
leaq 0x9f0c4(%rdi), %r12
movl %ecx, %eax
movq %rax, -0x38(%rbp)
xorl %r15d, %r15d
movsd (%r14,%r15,8), %xmm0
movl $0xffffc000, %r13d      # imm = 0xFFFFC000
ucomisd 0x1e3c7(%rip), %xmm0    # 0x6a908
jne 0x4c545
jnp 0x4c5af
movapd %xmm0, %xmm1
andpd 0x1d3df(%rip), %xmm1    # 0x69930
ucomisd 0x23c67(%rip), %xmm1    # 0x701c0
jbe 0x4c58d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movsd 0x18(%rax), %xmm0
xorl %esi, %esi
callq 0x4fdbe
movsd (%r14,%r15,8), %xmm0
movl $0x2, %edi
leaq 0x24083(%rip), %rsi     # 0x70604
movq %rax, %rdx
movb $0x1, %al
callq 0x4d55d
jmp 0x4c5af
divsd 0x2286b(%rip), %xmm0    # 0x6ee00
mulsd 0x23c2b(%rip), %xmm0    # 0x701c8
addsd 0x1f6d3(%rip), %xmm0    # 0x6bc78
callq 0x8ac0
cvttsd2si %xmm0, %r13d
movq %r12, %rdi
movl %ebx, %esi
movl $0xf, %edx
movl %r13d, %ecx
callq 0x4db0c
addl $0xf, %ebx
incq %r15
cmpq %r15, -0x38(%rbp)
jne 0x4c52d
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::to_sigid(int, unsigned char, int*)
static int to_sigid(int sys, unsigned char code, int *freq)
{
    const char **msm_sig;
    char *sig;
    int i;
    
    /* signal conversion for undefined signal by rtcm */
    if (sys==SYS_GPS) {
        if      (code==CODE_L1Y) code=CODE_L1P;
        else if (code==CODE_L1M) code=CODE_L1P;
        else if (code==CODE_L1N) code=CODE_L1P;
        else if (code==CODE_L2D) code=CODE_L2P;
        else if (code==CODE_L2Y) code=CODE_L2P;
        else if (code==CODE_L2M) code=CODE_L2P;
        else if (code==CODE_L2N) code=CODE_L2P;
    }
    if (!*(sig=code2obs(code,freq))) return 0;
    
    switch (sys) {
        case SYS_GPS: msm_sig=msm_sig_gps; break;
        case SYS_GLO: msm_sig=msm_sig_glo; break;
        case SYS_GAL: msm_sig=msm_sig_gal; break;
        case SYS_QZS: msm_sig=msm_sig_qzs; break;
        case SYS_SBS: msm_sig=msm_sig_sbs; break;
        case SYS_CMP: msm_sig=msm_sig_cmp; break;
        default: return 0;
    }
    /* freqency index for beidou and galileo */
    if (sys==SYS_CMP) {
        if      (*freq==5) *freq=2; /* B2 */
        else if (*freq==4) *freq=3; /* B3 */
    }
    else if (sys==SYS_GAL) {
        if (*freq==5) *freq=2; /* E5b */
    }
    for (i=0;i<32;i++) {
        if (!strcmp(sig,msm_sig[i])) return i+1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %edi, %r15d
cmpl $0x1, %edi
jne 0x4c664
movzbl %sil, %eax
cmpl $0xe, %eax
jg 0x4c646
movb $0x2, %sil
leal -0x4(%rax), %ecx
cmpl $0x3, %ecx
jb 0x4c664
jmp 0x4c65a
cmpl $0x16, %eax
je 0x4c655
cmpl $0x15, %eax
je 0x4c655
cmpl $0xf, %eax
jne 0x4c65a
movb $0x13, %sil
jmp 0x4c664
cmpb $0x17, %al
movl $0x13, %esi
cmovnel %eax, %esi
movzbl %sil, %edi
movq %rbx, %rsi
callq 0x4d6a2
xorl %r12d, %r12d
cmpb $0x0, (%rax)
je 0x4c71b
movq %rax, %r14
leal -0x1(%r15), %eax
cmpl $0x7, %eax
ja 0x4c6a1
leaq 0x238bd(%rip), %rcx     # 0x6ff4c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x41fb1(%rip), %r15     # 0x8e650
jmp 0x4c6f7
cmpl $0x10, %r15d
je 0x4c6e8
cmpl $0x20, %r15d
jne 0x4c71b
movl (%rbx), %eax
leaq 0x4249a(%rip), %r15     # 0x8eb50
cmpl $0x4, %eax
je 0x4c6f1
cmpl $0x5, %eax
je 0x4c6ce
jmp 0x4c6f7
leaq 0x42187(%rip), %r15     # 0x8e850
cmpl $0x5, (%rbx)
jne 0x4c6f7
movl $0x2, (%rbx)
jmp 0x4c6f7
leaq 0x42373(%rip), %r15     # 0x8ea50
jmp 0x4c6f7
leaq 0x4206a(%rip), %r15     # 0x8e750
jmp 0x4c6f7
leaq 0x42261(%rip), %r15     # 0x8e950
jmp 0x4c6f7
movl $0x3, (%rbx)
xorl %r12d, %r12d
movq (%r15,%r12,8), %rsi
movq %r14, %rdi
callq 0x8880
testl %eax, %eax
je 0x4c718
incq %r12
cmpq $0x20, %r12
jne 0x4c6fa
xorl %r12d, %r12d
jmp 0x4c71b
incl %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_phrng(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_phrng(rtcm_t *rtcm, int i, const double *phrng, int ncell)
{
    int j,phrng_val;
    
    for (j=0;j<ncell;j++) {
        if (phrng[j]==0.0) {
            phrng_val=-2097152;
        }
        else if (fabs(phrng[j])>1171.0) {
            trace(2,"msm fine phase-range overflow %s phrng=%.3f\n",
                 time_str(rtcm->time,0),phrng[j]);
            phrng_val=-2097152;
        }
        else {
            phrng_val=ROUND(phrng[j]/RANGE_MS/P2_29);
        }
        setbits(rtcm->buff,i,22,phrng_val); i+=22;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
testl %ecx, %ecx
jle 0x4c7fd
movq %rdx, %r14
movq %rdi, -0x30(%rbp)
leaq 0x9f0c4(%rdi), %r12
movl %ecx, %eax
movq %rax, -0x38(%rbp)
xorl %r15d, %r15d
movsd (%r14,%r15,8), %xmm0
movl $0xffe00000, %r13d      # imm = 0xFFE00000
ucomisd 0x1e19b(%rip), %xmm0    # 0x6a908
jne 0x4c771
jnp 0x4c7db
movapd %xmm0, %xmm1
andpd 0x1d1b3(%rip), %xmm1    # 0x69930
ucomisd 0x23a2b(%rip), %xmm1    # 0x701b0
jbe 0x4c7b9
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movsd 0x18(%rax), %xmm0
xorl %esi, %esi
callq 0x4fdbe
movsd (%r14,%r15,8), %xmm0
movl $0x2, %edi
leaq 0x23ea1(%rip), %rsi     # 0x7064e
movq %rax, %rdx
movb $0x1, %al
callq 0x4d55d
jmp 0x4c7db
divsd 0x2263f(%rip), %xmm0    # 0x6ee00
mulsd 0x23977(%rip), %xmm0    # 0x70140
addsd 0x1f4a7(%rip), %xmm0    # 0x6bc78
callq 0x8ac0
cvttsd2si %xmm0, %r13d
movq %r12, %rdi
movl %ebx, %esi
movl $0x16, %edx
movl %r13d, %ecx
callq 0x4db0c
addl $0x16, %ebx
incq %r15
cmpq %r15, -0x38(%rbp)
jne 0x4c759
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_lock(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_lock(rtcm_t *rtcm, int i, const double *lock, int ncell)
{
    int j,lock_val;
    
    for (j=0;j<ncell;j++) {
        lock_val=to_msm_lock(lock[j]);
        setbitu(rtcm->buff,i,4,lock_val); i+=4;
    }
    return i;
}

// Assembly:
movl %esi, %eax
testl %ecx, %ecx
jle 0x4c9b8
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %r15
addq $0x9f0c4, %r15          # imm = 0x9F0C4
movl %ecx, %r12d
shlq $0x2, %r12
movl %eax, -0x2c(%rbp)
movl %eax, %ebx
xorl %r13d, %r13d
movsd (%r14,%r13,2), %xmm0
movsd 0x23980(%rip), %xmm1    # 0x701d0
ucomisd %xmm0, %xmm1
movl $0x0, %ecx
ja 0x4c986
movl $0x1, %ecx
movsd 0x1f524(%rip), %xmm1    # 0x6bd90
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0x2, %ecx
movsd 0x23955(%rip), %xmm1    # 0x701d8
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0x3, %ecx
movsd 0x23946(%rip), %xmm1    # 0x701e0
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0x4, %ecx
movsd 0x23937(%rip), %xmm1    # 0x701e8
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0x5, %ecx
movsd 0x23928(%rip), %xmm1    # 0x701f0
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0x6, %ecx
movsd 0x23919(%rip), %xmm1    # 0x701f8
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0x7, %ecx
movsd 0x2390a(%rip), %xmm1    # 0x70200
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0x8, %ecx
movsd 0x238fb(%rip), %xmm1    # 0x70208
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0x9, %ecx
movsd 0x238f0(%rip), %xmm1    # 0x70210
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0xa, %ecx
movsd 0x238e5(%rip), %xmm1    # 0x70218
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0xb, %ecx
movsd 0x238da(%rip), %xmm1    # 0x70220
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0xc, %ecx
movsd 0x238cf(%rip), %xmm1    # 0x70228
ucomisd %xmm0, %xmm1
ja 0x4c986
movl $0xd, %ecx
movsd 0x238c4(%rip), %xmm1    # 0x70230
ucomisd %xmm0, %xmm1
ja 0x4c986
xorl %ecx, %ecx
movsd 0x238bc(%rip), %xmm1    # 0x70238
ucomisd %xmm0, %xmm1
seta %cl
xorl $0xf, %ecx
leaq (%rbx,%r13), %rsi
movq %r15, %rdi
movl $0x4, %edx
callq 0x4da98
addq $0x4, %r13
cmpq %r13, %r12
jne 0x4c842
movl -0x2c(%rbp), %eax
addl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_int_rrng(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_int_rrng(rtcm_t *rtcm, int i, const double *rrng,
                               int nsat)
{
    unsigned int int_ms;
    int j;
    
    for (j=0;j<nsat;j++) {
        if (rrng[j]==0.0) {
            int_ms=255;
        }
        else if (rrng[j]<0.0||rrng[j]>RANGE_MS*255.0) {
            trace(2,"msm rough range overflow %s rrng=%.3f\n",
                 time_str(rtcm->time,0),rrng[j]);
            int_ms=255;
        }
        else {
            int_ms=ROUND_U(rrng[j]/RANGE_MS/P2_10)>>10;
        }
        setbitu(rtcm->buff,i,8,int_ms); i+=8;
    }
    return i;
}

// Assembly:
movl %esi, %eax
testl %ecx, %ecx
jle 0x4caaf
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, -0x38(%rbp)
leaq 0x9f0c4(%rdi), %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, %ebx
shlq $0x3, %rbx
movl %eax, -0x2c(%rbp)
movl %eax, %r12d
xorl %r15d, %r15d
xorpd %xmm1, %xmm1
movsd (%r14,%r15), %xmm0
movl $0xff, %r13d
ucomisd %xmm1, %xmm0
jne 0x4ca0d
jnp 0x4ca75
ucomisd %xmm0, %xmm1
ja 0x4ca45
ucomisd 0x2379d(%rip), %xmm0    # 0x701b8
ja 0x4ca45
divsd 0x223db(%rip), %xmm0    # 0x6ee00
mulsd 0x2377b(%rip), %xmm0    # 0x701a8
addsd 0x1f243(%rip), %xmm0    # 0x6bc78
callq 0x8ac0
cvttsd2si %xmm0, %r13
shrl $0xa, %r13d
jmp 0x4ca75
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movsd 0x18(%rax), %xmm0
xorl %esi, %esi
callq 0x4fdbe
movsd (%r14,%r15), %xmm0
movl $0x2, %edi
leaq 0x23c4a(%rip), %rsi     # 0x706b5
movq %rax, %rdx
movb $0x1, %al
callq 0x4d55d
leaq (%r12,%r15), %rsi
movq -0x40(%rbp), %rdi
movl $0x8, %edx
movl %r13d, %ecx
callq 0x4da98
addq $0x8, %r15
cmpq %r15, %rbx
xorpd %xmm1, %xmm1
jne 0x4c9f9
movl -0x2c(%rbp), %eax
addl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_cnr(bamboo::rtcm_t*, int, float const*, int)
static int encode_msm_cnr(rtcm_t *rtcm, int i, const float *cnr, int ncell)
{
    int j,cnr_val;
    
    for (j=0;j<ncell;j++) {
        cnr_val=ROUND(cnr[j]/1.0);
        setbitu(rtcm->buff,i,6,cnr_val); i+=6;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %ecx, %ecx
jle 0x4cb0b
movq %rdx, %r14
movq %rdi, %r15
addq $0x9f0c4, %r15          # imm = 0x9F0C4
movl %ecx, %r12d
xorl %r13d, %r13d
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r13,4), %xmm0
addsd 0x1f190(%rip), %xmm0    # 0x6bc78
callq 0x8ac0
cvttsd2si %xmm0, %ecx
movq %r15, %rdi
movl %ebx, %esi
movl $0x6, %edx
callq 0x4da98
addl $0x6, %ebx
incq %r13
cmpq %r13, %r12
jne 0x4cad7
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_rrate(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_rrate(rtcm_t *rtcm, int i, const double *rrate, int nsat)
{
    int j,rrate_val;
    
    for (j=0;j<nsat;j++) {
        if (fabs(rrate[j])>8191.0) {
            trace(2,"msm rough phase-range-rate overflow %s rrate=%.4f\n",
                 time_str(rtcm->time,0),rrate[j]);
            rrate_val=-8192;
        }
        else {
            rrate_val=ROUND(rrate[j]/1.0);
        }
        setbits(rtcm->buff,i,14,rrate_val); i+=14;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %ecx, %ecx
jle 0x4cbc7
movq %rdx, %r14
movq %rdi, %r15
leaq 0x9f0c4(%rdi), %rax
movq %rax, -0x30(%rbp)
movl %ecx, %r13d
xorl %r12d, %r12d
movsd (%r14,%r12,8), %xmm0
movapd %xmm0, %xmm1
andpd 0x1cdd3(%rip), %xmm1    # 0x69930
ucomisd 0x236db(%rip), %xmm1    # 0x70240
jbe 0x4cb9b
movq 0x10(%r15), %rdi
movsd 0x18(%r15), %xmm0
xorl %esi, %esi
callq 0x4fdbe
movsd (%r14,%r12,8), %xmm0
movl $0x2, %edi
leaq 0x23b6f(%rip), %rsi     # 0x706f9
movq %rax, %rdx
movb $0x1, %al
callq 0x4d55d
movl $0xffffe000, %ecx       # imm = 0xFFFFE000
jmp 0x4cbac
addsd 0x1f0d5(%rip), %xmm0    # 0x6bc78
callq 0x8ac0
cvttsd2si %xmm0, %ecx
movq -0x30(%rbp), %rdi
movl %ebx, %esi
movl $0xe, %edx
callq 0x4db0c
addl $0xe, %ebx
incq %r12
cmpq %r12, %r13
jne 0x4cb4b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq