LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: DoubleString[P]RtConverter/src/Rtklib/rt17.cpp
// Function: bamboo::UnwrapRawdata(bamboo::rt17_t*, unsigned int*)
static void UnwrapRawdata(rt17_t *rt17, unsigned int *rif)
{
    unsigned char *p_in = rt17->MessageBuffer;
    unsigned char *p_out = p_in;
    unsigned int InputLength, InputLengthTotal = rt17->MessageLength;
    unsigned int OutputLength, OutputLengthTotal = 0;

    *rif = p_in[7];

    while (InputLengthTotal > 0)
    {
        if ((unsigned int)p_in[7] != *rif)
           tracet(2, "RT17: Inconsistent Record Interpretation Flags within a single RAWDATA message.\n");

        InputLength = p_in[3] + 6;
        OutputLength = p_in[3] - 4;
        memmove(p_out, p_in + 8, OutputLength);
        p_in += InputLength;
        p_out += OutputLength;
        OutputLengthTotal += OutputLength;
        InputLengthTotal -= InputLength;
    }
    rt17->MessageBytes = rt17->MessageLength = OutputLengthTotal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0x28(%rbp)
jbe 0x692ca
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
je 0x6925f
movl $0x2, %edi
leaq 0x56c1b(%rip), %rsi     # 0xbfe73
movb $0x0, %al
callq 0x95890
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
addl $0x6, %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
subl $0x4, %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0x9c00
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
jmp 0x69232
movl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rt17.cpp
// Function: bamboo::DecodeType29(bamboo::raw_t*)
static int DecodeType29(raw_t *Raw)
{
    rt17_t *rt17 = (rt17_t*) Raw->rcv_data;
    unsigned char *p = rt17->MessageBuffer;

    if (*p < 7)
        tracet(2, "RT17: Enhanced Position record block #1 length %d < 7 bytes. Record discarded.\n", *p);
    else
        SetWeek(Raw, I2(p+1), ((double) I4(p+3)) * 0.001);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x82ba0(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7, %eax
jge 0x69abe
movq -0x18(%rbp), %rax
movzbl (%rax), %edx
movl $0x2, %edi
leaq 0x56505(%rip), %rsi     # 0xbffba
movb $0x0, %al
callq 0x95890
jmp 0x69b00
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
callq 0x69090
cwtl
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
addq $0x3, %rdi
callq 0x690d0
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
cvtsi2sd %eax, %xmm0
movsd 0x54251(%rip), %xmm1    # 0xbdd48
mulsd %xmm1, %xmm0
callq 0x68f80
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rt17.cpp
// Function: bamboo::ReadU2(unsigned char*)
static unsigned short ReadU2(unsigned char *p)
{
    ENDIAN_TEST et;
    union U2 {unsigned short u2; unsigned char c[2];} u;

    memcpy(&u.u2, p, sizeof(u.u2)); 
 
    et.u2 = 0; et.c[0] = 1;  
    if (et.u2 == 1)
    {
        unsigned char t;
        t = u.c[0]; u.c[0] = u.c[1]; u.c[1] = t;
    }
    return u.u2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %ax
movw %ax, -0xc(%rbp)
movw $0x0, -0xa(%rbp)
movb $0x1, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
cmpl $0x1, %eax
jne 0x6a918
movb -0xc(%rbp), %al
movb %al, -0xd(%rbp)
movb -0xb(%rbp), %al
movb %al, -0xc(%rbp)
movb -0xd(%rbp), %al
movb %al, -0xb(%rbp)
movw -0xc(%rbp), %ax
popq %rbp
retq
nop
// File: 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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x3, %edi
leaq 0x554a5(%rip), %rsi     # 0xc043d
movb $0x0, %al
callq 0x8b980
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x9900
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x9900
movq -0x8(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x9900
movq -0x8(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x48(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %edx
movl $0x5, %edi
leaq 0x551e4(%rip), %rsi     # 0xc0486
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
cmpl $0x0, 0x9f0b8(%rax)
jne 0x6b2ff
movzbl -0x11(%rbp), %eax
cmpl $0xd3, %eax
je 0x6b2cd
movl $0x0, -0x4(%rbp)
jmp 0x6b417
movb -0x11(%rbp), %dl
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movl 0x9f0b8(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x9f0b8(%rsi)
movslq %ecx, %rcx
movb %dl, 0x9f0c4(%rax,%rcx)
movl $0x0, -0x4(%rbp)
jmp 0x6b417
movb -0x11(%rbp), %dl
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movl 0x9f0b8(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x9f0b8(%rsi)
movslq %ecx, %rcx
movb %dl, 0x9f0c4(%rax,%rcx)
movq -0x10(%rbp), %rax
cmpl $0x3, 0x9f0b8(%rax)
jne 0x6b35b
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl $0xe, %esi
movl $0xa, %edx
callq 0x8bfc0
movl %eax, %ecx
addl $0x3, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x9f0c0(%rax)
movq -0x10(%rbp), %rax
cmpl $0x3, 0x9f0b8(%rax)
jl 0x6b383
movq -0x10(%rbp), %rax
movl 0x9f0b8(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x9f0c0(%rcx), %ecx
addl $0x3, %ecx
cmpl %ecx, %eax
jge 0x6b38f
movl $0x0, -0x4(%rbp)
jmp 0x6b417
movq -0x10(%rbp), %rax
movl $0x0, 0x9f0b8(%rax)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movq -0x10(%rbp), %rax
movl 0x9f0c0(%rax), %esi
callq 0x8c2d0
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movq -0x10(%rbp), %rax
movl 0x9f0c0(%rax), %esi
shll $0x3, %esi
movl $0x18, %edx
callq 0x8bfc0
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
je 0x6b40b
movq -0x10(%rbp), %rax
movl 0x9f0c0(%rax), %edx
movl $0x2, %edi
leaq 0x550a3(%rip), %rsi     # 0xc049e
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x4(%rbp)
jmp 0x6b417
movq -0x10(%rbp), %rdi
callq 0x6db90
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %edx
movl $0x4, %edi
leaq 0x55074(%rip), %rsi     # 0xc04ba
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x1c(%rbp)
cmpl $0x1000, -0x1c(%rbp)    # imm = 0x1000
jge 0x6b4a3
movq -0x18(%rbp), %rdi
callq 0x9b80
movl %eax, -0x20(%rbp)
cmpl $-0x1, %eax
jne 0x6b477
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x6b4aa
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %eax
movzbl %al, %esi
callq 0x6b020
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x6b496
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6b4aa
jmp 0x6b498
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6b454
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %edx
movl $0x4, %edi
leaq 0x54fed(%rip), %rsi     # 0xc04d3
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x1c(%rbp)
cmpl $0x1000, -0x1c(%rbp)    # imm = 0x1000
jge 0x6b543
movq -0x18(%rbp), %rdi
callq 0x9b80
movl %eax, -0x20(%rbp)
cmpl $-0x1, %eax
jne 0x6b517
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x6b54a
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %eax
movzbl %al, %esi
callq 0x6b280
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x6b536
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6b54a
jmp 0x6b538
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6b4f4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm2.cpp
// Function: bamboo::adjhour(bamboo::rtcm_t*, double)
static void adjhour(rtcm_t *rtcm, double zcnt)
{
    double tow,hour,sec;
    int week;
    
    /* if no time, get cpu time */
    if (rtcm->time.time==0) rtcm->time=utc2gpst(timeget());
    tow=time2gpst(rtcm->time,&week);
    hour=floor(tow/3600.0);
    sec=tow-hour*3600.0;
    if      (zcnt<sec-1800.0) zcnt+=3600.0;
    else if (zcnt>sec+1800.0) zcnt-=3600.0;
    rtcm->time=gpst2time(week,hour*3600+zcnt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x6bbe5
callq 0x8e920
movq %rax, -0x50(%rbp)
movsd %xmm0, -0x48(%rbp)
movq -0x50(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
callq 0x8f0a0
movq %rax, -0x40(%rbp)
movsd %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x60(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rdi
movsd -0x58(%rbp), %xmm0
leaq -0x2c(%rbp), %rsi
callq 0x8e540
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd 0x511f3(%rip), %xmm1    # 0xbce10
divsd %xmm1, %xmm0
callq 0x9c90
movsd %xmm0, -0x20(%rbp)
movsd -0x18(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x511bc(%rip), %xmm2    # 0xbce10
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x10(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
movsd 0x548ed(%rip), %xmm2    # 0xc0560
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x6bc91
movsd 0x5118b(%rip), %xmm0    # 0xbce10
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x6bcc1
movsd -0x10(%rbp), %xmm0
movsd 0x548c2(%rip), %xmm1    # 0xc0560
addsd -0x28(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x6bcbf
movsd -0x10(%rbp), %xmm0
movsd 0x5115a(%rip), %xmm1    # 0xbce10
subsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x6bcc1
movl -0x2c(%rbp), %edi
movsd -0x20(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd 0x5113a(%rip), %xmm2    # 0xbce10
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8e4a0
movq %rax, -0x70(%rbp)
movsd %xmm0, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x30, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x9f0c0(%rax), %edx
movl $0x4, %edi
leaq 0x5477b(%rip), %rsi     # 0xc07b4
movb $0x0, %al
callq 0x8b980
movl -0x14(%rbp), %eax
addl $0x60, %eax
movq -0x10(%rbp), %rcx
movl 0x9f0c0(%rcx), %ecx
shll $0x3, %ecx
cmpl %ecx, %eax
jg 0x6c10b
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x14(%rbp), %esi
movl $0x20, %edx
callq 0x8c050
cvtsi2sd %eax, %xmm0
movsd 0x51709(%rip), %xmm1    # 0xbd788
mulsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x6f108(%rax)
movl -0x14(%rbp), %eax
addl $0x20, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x14(%rbp), %esi
movl $0x20, %edx
callq 0x8c050
cvtsi2sd %eax, %xmm0
movsd 0x516cc(%rip), %xmm1    # 0xbd788
mulsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x6f110(%rax)
movl -0x14(%rbp), %eax
addl $0x20, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x14(%rbp), %esi
movl $0x20, %edx
callq 0x8c050
cvtsi2sd %eax, %xmm0
movsd 0x5168f(%rip), %xmm1    # 0xbd788
mulsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x6f118(%rax)
jmp 0x6c131
movq -0x10(%rbp), %rax
movl 0x9f0c0(%rax), %edx
movl $0x2, %edi
leaq 0x546a9(%rip), %rsi     # 0xc07ca
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6c138
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl $0x30, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x9f0c0(%rax), %edx
leaq 0x54674(%rip), %rsi     # 0xc07e8
xorl %eax, %eax
movl $0x4, %edi
callq 0x8b980
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl $0x18, %esi
movl $0xd, %edx
callq 0x8bfc0
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x18, %eax
movq -0x10(%rbp), %rcx
movl 0x9f0c0(%rcx), %ecx
shll $0x3, %ecx
cmpl %ecx, %eax
jg 0x6c222
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x1c(%rbp), %esi
movl $0xa, %edx
callq 0x8bfc0
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0xa, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x1c(%rbp), %esi
movl $0x8, %edx
callq 0x8bfc0
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x1c(%rbp), %esi
movl $0x6, %edx
callq 0x8bfc0
movl %eax, -0x28(%rbp)
jmp 0x6c248
movq -0x10(%rbp), %rax
movl 0x9f0c0(%rax), %edx
movl $0x2, %edi
leaq 0x545c7(%rip), %rsi     # 0xc07ff
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6c2ae
movl -0x20(%rbp), %edi
callq 0x8f7e0
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edi
cvtsi2sdl -0x24(%rbp), %xmm0
movsd 0x542f5(%rip), %xmm1    # 0xc0558
mulsd -0x18(%rbp), %xmm1
movsd 0x50ba0(%rip), %xmm2    # 0xbce10
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8e4a0
movq %rax, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2d0(%rax)
movl $0x6, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x30, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x9f0c0(%rax), %edx
movl $0x4, %edi
leaq 0x5452e(%rip), %rsi     # 0xc081e
movb $0x0, %al
callq 0x8b980
movl -0xc(%rbp), %ecx
addl $0x8, %ecx
movq -0x8(%rbp), %rax
movl 0x9f0c0(%rax), %edx
shll $0x3, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x11(%rbp)
jg 0x6c31d
cmpl $0x5a, -0x10(%rbp)
setl %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x6c326
jmp 0x6c364
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl $0x8, %edx
callq 0x8bfc0
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
movslq %ecx, %rcx
movb %dl, 0x9b950(%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xc(%rbp)
jmp 0x6c2f7
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movb $0x0, 0x9b950(%rax,%rcx)
movq -0x8(%rbp), %rdx
addq $0x9b950, %rdx          # imm = 0x9B950
movl $0x3, %edi
leaq 0x544aa(%rip), %rsi     # 0xc0835
movb $0x0, %al
callq 0x8b980
movl $0x9, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm2.cpp
// Function: bamboo::obsindex(bamboo::obs_t*, bamboo::gtime_t, int)
static int obsindex(obs_t *obs, gtime_t time, int sat)
{
    int i,j;
    
    for (i=0;i<obs->n;i++) {
        if (obs->data[i].sat==sat) return i; /* field already exists */
    }
    if (i>=MAXOBS) return -1; /* overflow */
    
    /* add new field */
    obs->data[i].time=time;
    obs->data[i].sat=sat;
    for (j=0;j<NFREQ;j++) {
        obs->data[i].L[j]=obs->data[i].P[j]=0.0;
        obs->data[i].D[j]=0.0;
        obs->data[i].SNR[j]=obs->data[i].LLI[j]=obs->data[i].code[j]=0;
    }
    obs->n++;
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, -0x18(%rbp)
movsd %xmm0, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x6da4a
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movzbl 0x10(%rax), %eax
cmpl -0x24(%rbp), %eax
jne 0x6da3d
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6db7d
jmp 0x6da3f
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6da0b
cmpl $0x40, -0x28(%rbp)
jl 0x6da5c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6db7d
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x10(%rax)
movl $0x0, -0x2c(%rbp)
cmpl $0x3, -0x2c(%rbp)
jge 0x6db6c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x38(%rax,%rcx,8)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rax,%rcx,8)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, 0x50(%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, 0x18(%rax,%rcx)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, 0x15(%rax,%rcx)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, 0x12(%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6daa0
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::decode_msm0(bamboo::rtcm_t*, int)
static int decode_msm0(rtcm_t *rtcm, int sys)
{
    msm_h_t h={0};
    int i,sync,iod;
    if (decode_msm_head(rtcm,sys,&sync,&iod,&h,&i)<0) return -1;
    rtcm->obsflag=!sync;
    return sync?0:1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq -0xbc(%rbp), %rdi
xorl %esi, %esi
movl $0xa8, %edx
callq 0x93d0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0xc4(%rbp), %rdx
leaq -0xc8(%rbp), %rcx
leaq -0xbc(%rbp), %r8
leaq -0xc0(%rbp), %r9
callq 0x7b250
cmpl $0x0, %eax
jge 0x7797b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x779ac
cmpl $0x0, -0xc4(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x9bdd0(%rax)
movl -0xc4(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9fd48, %rdi          # imm = 0x9FD48
leaq 0x47283(%rip), %rsi     # 0xc11d4
callq 0x91b0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x79f91
movq -0x20(%rbp), %rdi
leaq 0x4726f(%rip), %rsi     # 0xc11da
leaq -0x28(%rbp), %rdx
movb $0x0, %al
callq 0x9750
cmpl $0x1, %eax
jne 0x79f91
movl -0x14(%rbp), %eax
cmpl -0x28(%rbp), %eax
je 0x79f8f
movl $0x0, -0x4(%rbp)
jmp 0x7a016
jmp 0x79f91
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x79fa7
movq -0x10(%rbp), %rax
cmpl $0x0, 0x9bdd0(%rax)
je 0x79fb2
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x7a00f
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
je 0x7a00d
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl $0x18, %esi
movl $0xc, %edx
callq 0x8bfc0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl (%rax), %r8d
movl $0x2, %edi
leaq 0x471ef(%rip), %rsi     # 0xc11e2
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7a016
jmp 0x7a00f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x7a075
callq 0x8e920
movq %rax, -0x40(%rbp)
movsd %xmm0, -0x38(%rbp)
movq -0x40(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0x8f0a0
movq %rax, -0x30(%rbp)
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x50(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
leaq -0x1c(%rbp), %rsi
callq 0x8e540
movsd %xmm0, -0x18(%rbp)
movsd -0x10(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
movsd 0x43cae(%rip), %xmm2    # 0xbdd60
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7a0d0
movsd 0x43ca4(%rip), %xmm0    # 0xbdd68
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x7a100
movsd -0x10(%rbp), %xmm0
movsd 0x43c83(%rip), %xmm1    # 0xbdd60
addsd -0x18(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7a0fe
movsd -0x10(%rbp), %xmm0
movsd 0x43c73(%rip), %xmm1    # 0xbdd68
subsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x7a100
movl -0x1c(%rbp), %edi
movsd -0x10(%rbp), %xmm0
callq 0x8e4a0
movq %rax, -0x60(%rbp)
movsd %xmm0, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x60, %rsp
popq %rbp
retq
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::adjcp(bamboo::rtcm_t*, int, int, double)
static double adjcp(rtcm_t *rtcm, int sat, int freq, double cp)
{
    if (rtcm->cp[sat-1][freq]==0.0) ;
    else if (cp<rtcm->cp[sat-1][freq]-750.0) cp+=1500.0;
    else if (cp>rtcm->cp[sat-1][freq]+750.0) cp-=1500.0;
    rtcm->cp[sat-1][freq]=cp;
    return cp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x9bdd8, %rax          # imm = 0x9BDD8
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7a316
jp 0x7a316
jmp 0x7a3b4
movsd -0x18(%rbp), %xmm1
movq -0x8(%rbp), %rax
addq $0x9bdd8, %rax          # imm = 0x9BDD8
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x4670a(%rip), %xmm2    # 0xc0a50
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7a364
movsd 0x46700(%rip), %xmm0    # 0xc0a58
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x7a3b2
movsd -0x18(%rbp), %xmm0
movq -0x8(%rbp), %rax
addq $0x9bdd8, %rax          # imm = 0x9BDD8
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movsd 0x466c1(%rip), %xmm1    # 0xc0a50
addsd (%rax,%rcx,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7a3b0
movsd -0x18(%rbp), %xmm0
movsd 0x466b1(%rip), %xmm1    # 0xc0a58
subsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x7a3b2
jmp 0x7a3b4
movsd -0x18(%rbp), %xmm0
movq -0x8(%rbp), %rax
addq $0x9bdd8, %rax          # imm = 0x9BDD8
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x18(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x7a7d8
callq 0x8e920
movq %rax, -0x58(%rbp)
movsd %xmm0, -0x50(%rbp)
movq -0x58(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
callq 0x8f0a0
movq %rax, -0x48(%rbp)
movsd %xmm0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x88(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rdi
movsd -0x80(%rbp), %xmm0
callq 0x8ef80
movq %rax, -0x78(%rbp)
movsd %xmm0, -0x70(%rbp)
movq -0x78(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
movsd 0x427d6(%rip), %xmm1    # 0xbcff0
callq 0x8e860
movq %rax, -0x68(%rbp)
movsd %xmm0, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x98(%rbp), %rdi
movsd -0x90(%rbp), %xmm0
leaq -0x34(%rbp), %rsi
callq 0x8e540
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x425a8(%rip), %xmm1    # 0xbce20
callq 0x99f0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x10(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
movsd 0x434c9(%rip), %xmm2    # 0xbdd70
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7a8c5
movsd 0x42567(%rip), %xmm0    # 0xbce20
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x7a8f5
movsd -0x10(%rbp), %xmm0
movsd 0x4349e(%rip), %xmm1    # 0xbdd70
addsd -0x30(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7a8f3
movsd -0x10(%rbp), %xmm0
movsd 0x42536(%rip), %xmm1    # 0xbce20
subsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x7a8f5
movl -0x34(%rbp), %edi
movsd -0x28(%rbp), %xmm0
addsd -0x10(%rbp), %xmm0
callq 0x8e4a0
movq %rax, -0xa8(%rbp)
movsd %xmm0, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd8(%rbp), %rdi
movsd -0xd0(%rbp), %xmm0
movsd 0x44557(%rip), %xmm1    # 0xbeeb0
callq 0x8e860
movq %rax, -0xc8(%rbp)
movsd %xmm0, -0xc0(%rbp)
movq -0xc8(%rbp), %rdi
movsd -0xc0(%rbp), %xmm0
callq 0x8f0a0
movq %rax, -0xb8(%rbp)
movsd %xmm0, -0xb0(%rbp)
movq -0x8(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0xb0(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x18, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x6f0f8(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x6ef38, %rdi          # imm = 0x6EF38
addq $0x80, %rdi
callq 0x92e0
cmpq $0x1f, %rax
jae 0x7edcd
movq -0x8(%rbp), %rdi
addq $0x6ef38, %rdi          # imm = 0x6EF38
addq $0x80, %rdi
callq 0x92e0
movq %rax, -0x28(%rbp)
jmp 0x7edd8
movl $0x1f, %eax
movq %rax, -0x28(%rbp)
jmp 0x7edd8
movq -0x28(%rbp), %rax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %edx
movl $0x3, %edi
leaq 0x438a8(%rip), %rsi     # 0xc2696
movb $0x0, %al
callq 0x8b980
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x10(%rbp), %esi
movl $0xc, %edx
movl $0x3ef, %ecx            # imm = 0x3EF
callq 0x8c0d0
movl -0x10(%rbp), %eax
addl $0xc, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x10(%rbp), %esi
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl $0xc, %edx
callq 0x8c0d0
movl -0x10(%rbp), %eax
addl $0xc, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x10(%rbp), %esi
movl -0x1c(%rbp), %ecx
movl $0x8, %edx
callq 0x8c0d0
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x7eeb1
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x10(%rbp), %esi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl 0x6efb8(%rax,%rcx), %ecx
movl $0x8, %edx
callq 0x8c0d0
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7ee6d
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0x10(%rbp), %esi
movl -0x18(%rbp), %ecx
movl $0x8, %edx
callq 0x8c0d0
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x9f0bc(%rax)
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbx
subq $0x678, %rsp            # imm = 0x678
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movl $0x3, %edi
leaq 0x3c69f(%rip), %rsi     # 0xc28d7
movb $0x0, %al
callq 0x8b980
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
leaq -0x220(%rbp), %r11
leaq -0x420(%rbp), %r10
leaq -0x620(%rbp), %rax
movl $0x1, %edi
leaq -0x628(%rbp), %r8
leaq -0x62c(%rbp), %r9
xorl %ebx, %ebx
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
callq 0x88ab0
movl %eax, -0x624(%rbp)
cmpl $0x0, %eax
jne 0x862d0
movl $0x0, -0xc(%rbp)
jmp 0x8632b
movq -0x18(%rbp), %rdi
movl -0x624(%rbp), %esi
leaq -0x220(%rbp), %rdx
movl -0x628(%rbp), %ecx
callq 0x891f0
movl %eax, -0x624(%rbp)
movq -0x18(%rbp), %rdi
movl -0x624(%rbp), %esi
leaq -0x620(%rbp), %rdx
movl -0x62c(%rbp), %ecx
callq 0x892d0
movl %eax, -0x624(%rbp)
movl -0x624(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x9f0bc(%rax)
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x678, %rsp            # imm = 0x678
popq %rbx
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movl %edx, -0x30(%rbp)
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl $0x3, %edi
leaq 0x3c5b5(%rip), %rsi     # 0xc2921
movb $0x0, %al
callq 0x8b980
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
leaq -0x230(%rbp), %r14
leaq -0x430(%rbp), %rbx
leaq -0x630(%rbp), %r11
leaq -0x830(%rbp), %r10
leaq -0x870(%rbp), %rax
movl $0x2, %edi
leaq -0x878(%rbp), %r8
leaq -0x87c(%rbp), %r9
xorl %r15d, %r15d
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
callq 0x88ab0
movl %eax, -0x874(%rbp)
cmpl $0x0, %eax
jne 0x8640e
movl $0x0, -0x1c(%rbp)
jmp 0x864ad
movq -0x28(%rbp), %rdi
movl -0x874(%rbp), %esi
leaq -0x230(%rbp), %rdx
movl -0x878(%rbp), %ecx
callq 0x891f0
movl %eax, -0x874(%rbp)
movq -0x28(%rbp), %rdi
movl -0x874(%rbp), %esi
leaq -0x630(%rbp), %rdx
movl -0x87c(%rbp), %ecx
callq 0x8a210
movl %eax, -0x874(%rbp)
movq -0x28(%rbp), %rdi
movl -0x874(%rbp), %esi
leaq -0x830(%rbp), %rdx
movl -0x87c(%rbp), %ecx
callq 0x8a350
movl %eax, -0x874(%rbp)
movq -0x28(%rbp), %rdi
movl -0x874(%rbp), %esi
leaq -0x870(%rbp), %rdx
movl -0x87c(%rbp), %ecx
callq 0x8a3d0
movl %eax, -0x874(%rbp)
movl -0x874(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x9f0bc(%rax)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: 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 %r12
pushq %rbx
subq $0xac0, %rsp            # imm = 0xAC0
movq %rdi, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movl %edx, -0x38(%rbp)
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
movl $0x3, %edi
leaq 0x3c47d(%rip), %rsi     # 0xc296b
movb $0x0, %al
callq 0x8b980
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
leaq -0x240(%rbp), %r15
leaq -0x440(%rbp), %r14
leaq -0x640(%rbp), %rbx
leaq -0x840(%rbp), %r11
leaq -0xa40(%rbp), %r10
leaq -0xa80(%rbp), %rax
movl $0x3, %edi
leaq -0xa88(%rbp), %r8
leaq -0xa8c(%rbp), %r9
xorl %r12d, %r12d
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
callq 0x88ab0
movl %eax, -0xa84(%rbp)
cmpl $0x0, %eax
jne 0x86593
movl $0x0, -0x24(%rbp)
jmp 0x86654
movq -0x30(%rbp), %rdi
movl -0xa84(%rbp), %esi
leaq -0x240(%rbp), %rdx
movl -0xa88(%rbp), %ecx
callq 0x891f0
movl %eax, -0xa84(%rbp)
movq -0x30(%rbp), %rdi
movl -0xa84(%rbp), %esi
leaq -0x640(%rbp), %rdx
movl -0xa8c(%rbp), %ecx
callq 0x892d0
movl %eax, -0xa84(%rbp)
movq -0x30(%rbp), %rdi
movl -0xa84(%rbp), %esi
leaq -0x840(%rbp), %rdx
movl -0xa8c(%rbp), %ecx
callq 0x8a210
movl %eax, -0xa84(%rbp)
movq -0x30(%rbp), %rdi
movl -0xa84(%rbp), %esi
leaq -0xa40(%rbp), %rdx
movl -0xa8c(%rbp), %ecx
callq 0x8a350
movl %eax, -0xa84(%rbp)
movq -0x30(%rbp), %rdi
movl -0xa84(%rbp), %esi
leaq -0xa80(%rbp), %rdx
movl -0xa8c(%rbp), %ecx
callq 0x8a3d0
movl %eax, -0xa84(%rbp)
movl -0xa84(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x9f0bc(%rax)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0xac0, %rsp            # imm = 0xAC0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x87d79
movl $0x0, -0x4(%rbp)
jmp 0x87e20
cmpl $0x18, -0x8(%rbp)
jge 0x87d8a
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x87e20
cmpl $0x48, -0x8(%rbp)
jge 0x87da3
movl -0x8(%rbp), %eax
addl $0x18, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
jmp 0x87e20
cmpl $0xa8, -0x8(%rbp)
jge 0x87dbf
movl -0x8(%rbp), %eax
addl $0x78, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
jmp 0x87e20
cmpl $0x168, -0x8(%rbp)      # imm = 0x168
jge 0x87ddd
movl -0x8(%rbp), %eax
addl $0x198, %eax            # imm = 0x198
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
jmp 0x87e20
cmpl $0x2e8, -0x8(%rbp)      # imm = 0x2E8
jge 0x87dfb
movl -0x8(%rbp), %eax
addl $0x498, %eax            # imm = 0x498
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
jmp 0x87e20
cmpl $0x3a9, -0x8(%rbp)      # imm = 0x3A9
jge 0x87e19
movl -0x8(%rbp), %eax
addl $0xc18, %eax            # imm = 0xC18
movl $0x20, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
jmp 0x87e20
movl $0x7f, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::to_code1_gps(unsigned char)
static int to_code1_gps(unsigned char code)
{
    switch (code) {
        case CODE_L1C: return 0; /* L1 C/A */
        case CODE_L1P:
        case CODE_L1W:
        case CODE_L1Y:
        case CODE_L1N: return 1; /* L1 P(Y) direct */
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %eax
movl %eax, -0xc(%rbp)
subl $0x1, %eax
je 0x87e5f
jmp 0x87e48
movl -0xc(%rbp), %eax
addl $-0x2, %eax
subl $0x3, %eax
jb 0x87e68
jmp 0x87e55
movl -0xc(%rbp), %eax
subl $0x6, %eax
je 0x87e68
jmp 0x87e71
movl $0x0, -0x4(%rbp)
jmp 0x87e78
movl $0x1, -0x4(%rbp)
jmp 0x87e78
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::to_code2_gps(unsigned char)
static int to_code2_gps(unsigned char code)
{
    switch (code) {
        case CODE_L2C:
        case CODE_L2S:
        case CODE_L2L:
        case CODE_L2X: return 0; /* L2 C/A or L2C */
        case CODE_L2P:
        case CODE_L2Y: return 1; /* L2 P(Y) direct */
        case CODE_L2D: return 2; /* L2 P(Y) cross-correlated */
        case CODE_L2W:
        case CODE_L2N: return 3; /* L2 correlated P/Y */
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %eax
addl $-0xe, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x9, %eax
ja 0x87ed4
movq -0x10(%rbp), %rax
leaq 0x3a389(%rip), %rcx     # 0xc2230
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x87edb
movl $0x1, -0x4(%rbp)
jmp 0x87edb
movl $0x2, -0x4(%rbp)
jmp 0x87edb
movl $0x3, -0x4(%rbp)
jmp 0x87edb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd 0x350c7(%rip), %xmm1    # 0xbcfc8
mulsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x1c(%rbp)
movsd -0x18(%rbp), %xmm0
cvtsi2sdl -0x1c(%rbp), %xmm1
movsd 0x38b45(%rip), %xmm2    # 0xc0a68
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x1c(%rbp), %ecx
movl $0x20, %edx
callq 0x8c1d0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x20, %esi
movl -0x20(%rbp), %ecx
movl $0x6, %edx
callq 0x8c0d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::to_code1_glo(unsigned char)
static int to_code1_glo(unsigned char code)
{
    switch (code) {
        case CODE_L1C: return 0; /* L1 C/A */
        case CODE_L1P: return 1; /* L1 P */
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %eax
movl %eax, -0xc(%rbp)
subl $0x1, %eax
je 0x88512
jmp 0x88508
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0x8851b
jmp 0x88524
movl $0x0, -0x4(%rbp)
jmp 0x8852b
movl $0x1, -0x4(%rbp)
jmp 0x8852b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::to_code2_glo(unsigned char)
static int to_code2_glo(unsigned char code)
{
    switch (code) {
        case CODE_L2C: return 0; /* L2 C/A */
        case CODE_L2P: return 1; /* L2 P */
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %eax
movl %eax, -0xc(%rbp)
subl $0xe, %eax
je 0x88552
jmp 0x88548
movl -0xc(%rbp), %eax
subl $0x13, %eax
je 0x8855b
jmp 0x88564
movl $0x0, -0x4(%rbp)
jmp 0x8856b
movl $0x1, -0x4(%rbp)
jmp 0x8856b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq