LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x892c4
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
xorps %xmm0, %xmm0
ucomisd (%rax,%rcx,8), %xmm0
jae 0x89246
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x38b98(%rip), %xmm1    # 0xc1dd8
ucomisd %xmm1, %xmm0
jbe 0x8924f
movl $0x0, -0x20(%rbp)
jmp 0x89292
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x3777c(%rip), %xmm1    # 0xc09e0
divsd %xmm1, %xmm0
movsd 0x38b70(%rip), %xmm1    # 0xc1de0
mulsd %xmm1, %xmm0
movsd 0x33c04(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %rax
andl $0x3ff, %eax            # imm = 0x3FF
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x20(%rbp), %ecx
movl $0xa, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0xa, %eax
movl %eax, -0xc(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8920d
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x89404
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8931d
jp 0x8931d
movl $0xffffc000, -0x24(%rbp) # imm = 0xFFFFC000
jmp 0x893d2
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x33eef(%rip), %xmm1    # 0xbd220
pand %xmm1, %xmm0
movsd 0x38aab(%rip), %xmm1    # 0xc1de8
ucomisd %xmm1, %xmm0
jbe 0x89393
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
xorl %esi, %esi
callq 0x8f6d0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl $0x2, %edi
leaq 0x39571(%rip), %rsi     # 0xc28f4
movb $0x1, %al
callq 0x8b980
movl $0xffffc000, -0x24(%rbp) # imm = 0xFFFFC000
jmp 0x893d0
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x37638(%rip), %xmm1    # 0xc09e0
divsd %xmm1, %xmm0
movsd 0x35b14(%rip), %xmm1    # 0xbeec8
divsd %xmm1, %xmm0
movsd 0x33ac0(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
jmp 0x893d2
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0xf, %edx
callq 0x8c1d0
movl -0xc(%rbp), %eax
addl $0xf, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x892ed
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::to_satid(int, int)
static int to_satid(int sys, int sat)
{
    int prn;
    
    if (satsys(sat,&prn)!=sys) return 0;
    
    if      (sys==SYS_QZS) prn-=MINPRNQZS-1;
    else if (sys==SYS_SBS) prn-=MINPRNSBS-1;
    
    return prn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %edi
leaq -0x10(%rbp), %rsi
callq 0x8b3b0
cmpl -0x8(%rbp), %eax
je 0x89f78
movl $0x0, -0x4(%rbp)
jmp 0x89fa0
cmpl $0x10, -0x8(%rbp)
jne 0x89f89
movl -0x10(%rbp), %eax
subl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x89f9a
cmpl $0x2, -0x8(%rbp)
jne 0x89f98
movl -0x10(%rbp), %eax
subl $0x77, %eax
movl %eax, -0x10(%rbp)
jmp 0x89f9a
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8a344
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8a25d
jp 0x8a25d
movl $0xffe00000, -0x24(%rbp) # imm = 0xFFE00000
jmp 0x8a312
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x32faf(%rip), %xmm1    # 0xbd220
pand %xmm1, %xmm0
movsd 0x37b73(%rip), %xmm1    # 0xc1df0
ucomisd %xmm1, %xmm0
jbe 0x8a2d3
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
xorl %esi, %esi
callq 0x8f6d0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl $0x2, %edi
leaq 0x3867b(%rip), %rsi     # 0xc293e
movb $0x1, %al
callq 0x8b980
movl $0xffe00000, -0x24(%rbp) # imm = 0xFFE00000
jmp 0x8a310
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x366f8(%rip), %xmm1    # 0xc09e0
divsd %xmm1, %xmm0
movsd 0x34b7c(%rip), %xmm1    # 0xbee70
divsd %xmm1, %xmm0
movsd 0x32b80(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
jmp 0x8a312
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0x16, %edx
callq 0x8c1d0
movl -0xc(%rbp), %eax
addl $0x16, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8a22d
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8a3b9
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x8a440
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0x4, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0x4, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8a36d
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_half_amb(bamboo::rtcm_t*, int, unsigned char const*, int)
static int encode_msm_half_amb(rtcm_t *rtcm, int i, const unsigned char *half,
                               int ncell)
{
    int j;
    
    for (j=0;j<ncell;j++) {
        setbitu(rtcm->buff,i,1,half[j]); i+=1;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8a42d
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movl $0x1, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8a3ed
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::to_msm_lock(double)
static int to_msm_lock(double lock)
{
    if (lock<0.032  ) return 0;
    if (lock<0.064  ) return 1;
    if (lock<0.128  ) return 2;
    if (lock<0.256  ) return 3;
    if (lock<0.512  ) return 4;
    if (lock<1.024  ) return 5;
    if (lock<2.048  ) return 6;
    if (lock<4.096  ) return 7;
    if (lock<8.192  ) return 8;
    if (lock<16.384 ) return 9;
    if (lock<32.768 ) return 10;
    if (lock<65.536 ) return 11;
    if (lock<131.072) return 12;
    if (lock<262.144) return 13;
    if (lock<524.288) return 14;
    return 15;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd %xmm0, -0x10(%rbp)
movsd 0x36127(%rip), %xmm0    # 0xc0578
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a464
movl $0x0, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x33954(%rip), %xmm0    # 0xbddc0
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a47f
movl $0x1, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x37971(%rip), %xmm0    # 0xc1df8
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a49a
movl $0x2, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x3795e(%rip), %xmm0    # 0xc1e00
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a4b5
movl $0x3, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x3794b(%rip), %xmm0    # 0xc1e08
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a4d0
movl $0x4, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x37938(%rip), %xmm0    # 0xc1e10
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a4eb
movl $0x5, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x37925(%rip), %xmm0    # 0xc1e18
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a506
movl $0x6, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x37912(%rip), %xmm0    # 0xc1e20
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a521
movl $0x7, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x378ff(%rip), %xmm0    # 0xc1e28
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a53c
movl $0x8, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x378ec(%rip), %xmm0    # 0xc1e30
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a554
movl $0x9, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x378dc(%rip), %xmm0    # 0xc1e38
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a56c
movl $0xa, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x378cc(%rip), %xmm0    # 0xc1e40
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a584
movl $0xb, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x378bc(%rip), %xmm0    # 0xc1e48
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a59c
movl $0xc, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x378ac(%rip), %xmm0    # 0xc1e50
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a5b4
movl $0xd, -0x4(%rbp)
jmp 0x8a5d3
movsd 0x3789c(%rip), %xmm0    # 0xc1e58
ucomisd -0x10(%rbp), %xmm0
jbe 0x8a5cc
movl $0xe, -0x4(%rbp)
jmp 0x8a5d3
movl $0xf, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8a71f
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8a62d
jp 0x8a62d
movl $0xff, -0x20(%rbp)
jmp 0x8a6ed
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
xorps %xmm0, %xmm0
ucomisd (%rax,%rcx,8), %xmm0
ja 0x8a65a
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x37784(%rip), %xmm1    # 0xc1dd8
ucomisd %xmm1, %xmm0
jbe 0x8a6aa
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
xorl %esi, %esi
callq 0x8f6d0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl $0x2, %edi
leaq 0x3830b(%rip), %rsi     # 0xc29a5
movb $0x1, %al
callq 0x8b980
movl $0xff, -0x20(%rbp)
jmp 0x8a6eb
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x36321(%rip), %xmm1    # 0xc09e0
divsd %xmm1, %xmm0
movsd 0x37715(%rip), %xmm1    # 0xc1de0
mulsd %xmm1, %xmm0
movsd 0x327a9(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %rax
shrl $0xa, %eax
movl %eax, -0x20(%rbp)
jmp 0x8a6ed
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x20(%rbp), %ecx
movl $0x8, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8a5fd
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8a7b9
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x316f2(%rip), %xmm1    # 0xbbe60
divsd %xmm1, %xmm0
movsd 0x32706(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0x6, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0x6, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8a74d
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_info(bamboo::rtcm_t*, int, unsigned char const*, int)
static int encode_msm_info(rtcm_t *rtcm, int i, const unsigned char *info,
                           int nsat)
{
    int j;
    
    for (j=0;j<nsat;j++) {
        setbitu(rtcm->buff,i,4,info[j]); i+=4;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8a82d
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movl $0x4, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0x4, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8a7ed
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8a942
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x329a3(%rip), %xmm1    # 0xbd220
pand %xmm1, %xmm0
movsd 0x375d7(%rip), %xmm1    # 0xc1e60
ucomisd %xmm1, %xmm0
jbe 0x8a8df
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
xorl %esi, %esi
callq 0x8f6d0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl $0x2, %edi
leaq 0x3811a(%rip), %rsi     # 0xc29e9
movb $0x1, %al
callq 0x8b980
movl $0xffffe000, -0x24(%rbp) # imm = 0xFFFFE000
jmp 0x8a910
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x3156c(%rip), %xmm1    # 0xbbe60
divsd %xmm1, %xmm0
movsd 0x32580(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0xe, %edx
callq 0x8c1d0
movl -0xc(%rbp), %eax
addl $0xe, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8a85d
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_rate(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_rate(rtcm_t *rtcm, int i, const double *rate, int ncell)
{
    int j,rate_val;
    
    for (j=0;j<ncell;j++) {
        if (rate[j]==0.0) {
            rate_val=-16384;
        }
        else if (fabs(rate[j])>1.6384) {
            trace(2,"msm fine phase-range-rate overflow %s rate=%.3f\n",
                 time_str(rtcm->time,0),rate[j]);
            rate_val=-16384;
        }
        else {
            rate_val=ROUND(rate[j]/0.0001);
        }
        setbitu(rtcm->buff,i,15,rate_val); i+=15;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8aa78
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8a99d
jp 0x8a99d
movl $0xffffc000, -0x24(%rbp) # imm = 0xFFFFC000
jmp 0x8aa46
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x3286f(%rip), %xmm1    # 0xbd220
pand %xmm1, %xmm0
movsd 0x374ab(%rip), %xmm1    # 0xc1e68
ucomisd %xmm1, %xmm0
jbe 0x8aa13
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
xorl %esi, %esi
callq 0x8f6d0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl $0x2, %edi
leaq 0x38019(%rip), %rsi     # 0xc2a1c
movb $0x1, %al
callq 0x8b980
movl $0xffffc000, -0x24(%rbp) # imm = 0xFFFFC000
jmp 0x8aa44
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x32440(%rip), %xmm1    # 0xbce68
divsd %xmm1, %xmm0
movsd 0x3244c(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
jmp 0x8aa46
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0xf, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0xf, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8a96d
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_psrng_ex(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_psrng_ex(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=-524288;
        }
        else if (fabs(psrng[j])>292.7) {
            trace(2,"msm fine pseudorange ext overflow %s psrng=%.3f\n",
                 time_str(rtcm->time,0),psrng[j]);
            psrng_val=-524288;
        }
        else {
            psrng_val=ROUND(psrng[j]/RANGE_MS/P2_29);
        }
        setbits(rtcm->buff,i,20,psrng_val); i+=20;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8abc4
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8aadd
jp 0x8aadd
movl $0xfff80000, -0x24(%rbp) # imm = 0xFFF80000
jmp 0x8ab92
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x3272f(%rip), %xmm1    # 0xbd220
pand %xmm1, %xmm0
movsd 0x372eb(%rip), %xmm1    # 0xc1de8
ucomisd %xmm1, %xmm0
jbe 0x8ab53
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
xorl %esi, %esi
callq 0x8f6d0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl $0x2, %edi
leaq 0x37f27(%rip), %rsi     # 0xc2a6a
movb $0x1, %al
callq 0x8b980
movl $0xfff80000, -0x24(%rbp) # imm = 0xFFF80000
jmp 0x8ab90
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x35e78(%rip), %xmm1    # 0xc09e0
divsd %xmm1, %xmm0
movsd 0x342fc(%rip), %xmm1    # 0xbee70
divsd %xmm1, %xmm0
movsd 0x32300(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
jmp 0x8ab92
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0x14, %edx
callq 0x8c1d0
movl -0xc(%rbp), %eax
addl $0x14, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8aaad
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_phrng_ex(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_phrng_ex(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=-8388608;
        }
        else if (fabs(phrng[j])>1171.0) {
            trace(2,"msm fine phase-range ext overflow %s phrng=%.3f\n",
                 time_str(rtcm->time,0),phrng[j]);
            phrng_val=-8388608;
        }
        else {
            phrng_val=ROUND(phrng[j]/RANGE_MS/P2_31);
        }
        setbits(rtcm->buff,i,24,phrng_val); i+=24;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8ad04
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x8ac1d
jp 0x8ac1d
movl $0xff800000, -0x24(%rbp) # imm = 0xFF800000
jmp 0x8acd2
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x325ef(%rip), %xmm1    # 0xbd220
pand %xmm1, %xmm0
movsd 0x371b3(%rip), %xmm1    # 0xc1df0
ucomisd %xmm1, %xmm0
jbe 0x8ac93
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
xorl %esi, %esi
callq 0x8f6d0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl $0x2, %edi
leaq 0x37e18(%rip), %rsi     # 0xc2a9b
movb $0x1, %al
callq 0x8b980
movl $0xff800000, -0x24(%rbp) # imm = 0xFF800000
jmp 0x8acd0
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x35d38(%rip), %xmm1    # 0xc09e0
divsd %xmm1, %xmm0
movsd 0x32324(%rip), %xmm1    # 0xbcfd8
divsd %xmm1, %xmm0
movsd 0x321c0(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
jmp 0x8acd2
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0x18, %edx
callq 0x8c1d0
movl -0xc(%rbp), %eax
addl $0x18, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8abed
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_lock_ex(bamboo::rtcm_t*, int, double const*, int)
static int encode_msm_lock_ex(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_ex(lock[j]);
        setbitu(rtcm->buff,i,10,lock_val); i+=10;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8ad79
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x8ae30
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0xa, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0xa, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8ad2d
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_msm_cnr_ex(bamboo::rtcm_t*, int, float const*, int)
static int encode_msm_cnr_ex(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]/0.0625);
        setbitu(rtcm->buff,i,10,cnr_val); i+=10;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8ae19
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x35c6a(%rip), %xmm1    # 0xc0a38
divsd %xmm1, %xmm0
movsd 0x320a6(%rip), %xmm1    # 0xbce80
addsd %xmm1, %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xc(%rbp), %esi
movl -0x24(%rbp), %ecx
movl $0xa, %edx
callq 0x8c0d0
movl -0xc(%rbp), %eax
addl $0xa, %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8adad
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satsys(int, int*)
extern int satsys(int sat, int *prn)
{
    int sys=SYS_NONE;
    if (sat<=0||MAXRTKSAT<sat) sat=0;
    else if (sat<=NSATGPS) {
        sys=SYS_GPS; sat+=MINPRNGPS-1;
    }
    else if ((sat-=NSATGPS)<=NSATGLO) {
        sys=SYS_GLO; sat+=MINPRNGLO-1;
    }
    else if ((sat-=NSATGLO)<=NSATGAL) {
        sys=SYS_GAL; sat+=MINPRNGAL-1;
    }
    else if ((sat-=NSATGAL)<=NSATQZS) {
        sys=SYS_QZS; sat+=MINPRNQZS-1; 
    }
    else if ((sat-=NSATQZS)<=NSATCMP) {
        sys=SYS_CMP; sat+=MINPRNCMP-1; 
    }
    else if ((sat-=NSATCMP)<=NSATIRN) {
        sys=SYS_IRN; sat+=MINPRNIRN-1; 
    }
    else if ((sat-=NSATIRN)<=NSATLEO) {
        sys=SYS_LEO; sat+=MINPRNLEO-1; 
    }
    else if ((sat-=NSATLEO)<=NSATSBS) {
        sys=SYS_SBS; sat+=MINPRNSBS-1; 
    }
    else sat=0;
    if (prn) *prn=sat;
    return sys;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0x4(%rbp)
jle 0x8b3d2
movl $0x9b, %eax
cmpl -0x4(%rbp), %eax
jge 0x8b3de
movl $0x0, -0x4(%rbp)
jmp 0x8b4f9
cmpl $0x20, -0x4(%rbp)
jg 0x8b3f9
movl $0x1, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b4f7
movl -0x4(%rbp), %eax
subl $0x20, %eax
movl %eax, -0x4(%rbp)
cmpl $0x1b, %eax
jg 0x8b41c
movl $0x4, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b4f5
movl -0x4(%rbp), %eax
subl $0x1b, %eax
movl %eax, -0x4(%rbp)
cmpl $0x24, %eax
jg 0x8b43f
movl $0x8, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b4f3
movl -0x4(%rbp), %eax
subl $0x24, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
jg 0x8b462
movl $0x10, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b4f1
movl -0x4(%rbp), %eax
subl $0x0, %eax
movl %eax, -0x4(%rbp)
cmpl $0x25, %eax
jg 0x8b482
movl $0x20, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b4ef
movl -0x4(%rbp), %eax
subl $0x25, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
jg 0x8b4a2
movl $0x40, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b4ed
movl -0x4(%rbp), %eax
subl $0x0, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
jg 0x8b4c2
movl $0x80, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b4eb
movl -0x4(%rbp), %eax
subl $0x0, %eax
movl %eax, -0x4(%rbp)
cmpl $0x17, %eax
jg 0x8b4e2
movl $0x2, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $0x77, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b4e9
movl $0x0, -0x4(%rbp)
jmp 0x8b4eb
jmp 0x8b4ed
jmp 0x8b4ef
jmp 0x8b4f1
jmp 0x8b4f3
jmp 0x8b4f5
jmp 0x8b4f7
jmp 0x8b4f9
cmpq $0x0, -0x10(%rbp)
je 0x8b509
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
popq %rbp
retq
nop
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satid2no(char const*)
extern int satid2no(const char *id)
{
    int sys,prn;
    char code;
    
    if (sscanf(id,"%d",&prn)==1) {
        if      (MINPRNGPS<=prn&&prn<=MAXPRNGPS) sys=SYS_GPS;
        else if (MINPRNSBS<=prn&&prn<=MAXPRNSBS) sys=SYS_SBS;
        else if (MINPRNQZS<=prn&&prn<=MAXPRNQZS) sys=SYS_QZS;
        else return 0;
        return satno(sys,prn);
    }
    if (sscanf(id,"%c%d",&code,&prn)<2) return 0;
    
    switch (code) {
        case 'G': sys=SYS_GPS; prn+=MINPRNGPS-1; break;
        case 'R': sys=SYS_GLO; prn+=MINPRNGLO-1; break;
        case 'E': sys=SYS_GAL; prn+=MINPRNGAL-1; break;
        case 'J': sys=SYS_QZS; prn+=MINPRNQZS-1; break;
        case 'C': sys=SYS_CMP; prn+=MINPRNCMP-1; break;
        case 'I': sys=SYS_IRN; prn+=MINPRNIRN-1; break;
        case 'L': sys=SYS_LEO; prn+=MINPRNLEO-1; break;
        case 'S': sys=SYS_SBS; prn+=100; break;
        default: return 0;
    }
    return satno(sys,prn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x3d9d3(%rip), %rsi     # 0xc8efa
leaq -0x18(%rbp), %rdx
movb $0x0, %al
callq 0x9750
cmpl $0x1, %eax
jne 0x8b5a5
movl $0x1, %eax
cmpl -0x18(%rbp), %eax
jg 0x8b550
cmpl $0x20, -0x18(%rbp)
jg 0x8b550
movl $0x1, -0x14(%rbp)
jmp 0x8b592
movl $0x78, %eax
cmpl -0x18(%rbp), %eax
jg 0x8b56c
cmpl $0x8e, -0x18(%rbp)
jg 0x8b56c
movl $0x2, -0x14(%rbp)
jmp 0x8b590
xorl %eax, %eax
cmpl -0x18(%rbp), %eax
jg 0x8b582
cmpl $0x0, -0x18(%rbp)
jg 0x8b582
movl $0x10, -0x14(%rbp)
jmp 0x8b58e
movl $0x0, -0x4(%rbp)
jmp 0x8b6a4
jmp 0x8b590
jmp 0x8b592
movl -0x14(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x8b1b0
movl %eax, -0x4(%rbp)
jmp 0x8b6a4
movq -0x10(%rbp), %rdi
leaq 0x3c281(%rip), %rsi     # 0xc7831
leaq -0x19(%rbp), %rdx
leaq -0x18(%rbp), %rcx
movb $0x0, %al
callq 0x9750
cmpl $0x2, %eax
jge 0x8b5d0
movl $0x0, -0x4(%rbp)
jmp 0x8b6a4
movsbl -0x19(%rbp), %eax
addl $-0x43, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x10, %eax
ja 0x8b68d
movq -0x28(%rbp), %rax
leaq 0x3751f(%rip), %rcx     # 0xc2b10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b696
movl $0x4, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b696
movl $0x8, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b696
movl $0x10, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b696
movl $0x20, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b696
movl $0x40, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b696
movl $0x80, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b696
movl $0x2, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x64, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b696
movl $0x0, -0x4(%rbp)
jmp 0x8b6a4
movl -0x14(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x8b1b0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satno2id(int, char*)
extern void satno2id(int sat, char *id)
{
    int prn;
    switch (satsys(sat,&prn)) {
        case SYS_GPS: sprintf(id,"G%02d",prn-MINPRNGPS+1); return;
        case SYS_GLO: sprintf(id,"R%02d",prn-MINPRNGLO+1); return;
        case SYS_GAL: sprintf(id,"E%02d",prn-MINPRNGAL+1); return;
        case SYS_QZS: sprintf(id,"J%02d",prn-MINPRNQZS+1); return;
        case SYS_CMP: sprintf(id,"C%02d",prn-MINPRNCMP+1); return;
        case SYS_IRN: sprintf(id,"I%02d",prn-MINPRNIRN+1); return;
        case SYS_LEO: sprintf(id,"L%02d",prn-MINPRNLEO+1); return;
        case SYS_SBS: sprintf(id,"%03d" ,prn); return;
    }
    strcpy(id,"");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %edi
leaq -0x14(%rbp), %rsi
callq 0x8b3b0
movl %eax, %ecx
movl %ecx, -0x18(%rbp)
subl $0x1, %eax
je 0x8b736
jmp 0x8b6d7
movl -0x18(%rbp), %eax
subl $0x2, %eax
je 0x8b80a
jmp 0x8b6e5
movl -0x18(%rbp), %eax
subl $0x4, %eax
je 0x8b756
jmp 0x8b6ef
movl -0x18(%rbp), %eax
subl $0x8, %eax
je 0x8b776
jmp 0x8b6f9
movl -0x18(%rbp), %eax
subl $0x10, %eax
je 0x8b796
jmp 0x8b707
movl -0x18(%rbp), %eax
subl $0x20, %eax
je 0x8b7b3
jmp 0x8b715
movl -0x18(%rbp), %eax
subl $0x40, %eax
je 0x8b7d0
jmp 0x8b723
movl -0x18(%rbp), %eax
subl $0x80, %eax
je 0x8b7ed
jmp 0x8b821
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
subl $0x1, %edx
addl $0x1, %edx
leaq 0x3c0ec(%rip), %rsi     # 0xc7836
movb $0x0, %al
callq 0x9150
jmp 0x8b831
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
subl $0x1, %edx
addl $0x1, %edx
leaq 0x3c0d2(%rip), %rsi     # 0xc783c
movb $0x0, %al
callq 0x9150
jmp 0x8b831
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
subl $0x1, %edx
addl $0x1, %edx
leaq 0x3c0b8(%rip), %rsi     # 0xc7842
movb $0x0, %al
callq 0x9150
jmp 0x8b831
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
subl $0x0, %edx
addl $0x1, %edx
leaq 0x3c09e(%rip), %rsi     # 0xc7848
movb $0x0, %al
callq 0x9150
jmp 0x8b831
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
subl $0x1, %edx
addl $0x1, %edx
leaq 0x3c087(%rip), %rsi     # 0xc784e
movb $0x0, %al
callq 0x9150
jmp 0x8b831
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
subl $0x0, %edx
addl $0x1, %edx
leaq 0x3c070(%rip), %rsi     # 0xc7854
movb $0x0, %al
callq 0x9150
jmp 0x8b831
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
subl $0x0, %edx
addl $0x1, %edx
leaq 0x3c059(%rip), %rsi     # 0xc785a
movb $0x0, %al
callq 0x9150
jmp 0x8b831
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x3c048(%rip), %rsi     # 0xc7860
movb $0x0, %al
callq 0x9150
jmp 0x8b831
movq -0x10(%rbp), %rdi
leaq 0x314db(%rip), %rsi     # 0xbcd07
callq 0x96f0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::satexclude(int, double, int, bamboo::prcopt_t const*)
extern int satexclude(int sat, double var, int svh, const prcopt_t *opt)
{
    int sys=satsys(sat,NULL);
    
    if (svh<0) return 1; /* ephemeris unavailable */
    
    if (opt) {
        if (opt->exsats[sat-1]==1) return 1; /* excluded satellite */
        if (opt->exsats[sat-1]==2) return 0; /* included satellite */
        if (!(sys&opt->navsys)) return 1; /* unselected sat sys */
    }
    if (sys==SYS_QZS) svh&=0xFE; /* mask QZSS LEX health */
    if (svh) {
        trace(3,"unhealthy satellite: sat=%3d svh=%02X\n",sat,svh);
        return 1;
    }
    if (var>MAX_VAR_EPH) {
        trace(3,"invalid ura satellite: sat=%3d ura=%.2f\n",sat,sqrt(var));
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x8(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x8b3b0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x8b878
movl $0x1, -0x4(%rbp)
jmp 0x8b96a
cmpq $0x0, -0x20(%rbp)
je 0x8b8e8
movq -0x20(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl 0x8a8(%rax,%rcx), %eax
cmpl $0x1, %eax
jne 0x8b8a5
movl $0x1, -0x4(%rbp)
jmp 0x8b96a
movq -0x20(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl 0x8a8(%rax,%rcx), %eax
cmpl $0x2, %eax
jne 0x8b8cb
movl $0x0, -0x4(%rbp)
jmp 0x8b96a
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
andl 0xc(%rcx), %eax
cmpl $0x0, %eax
jne 0x8b8e6
movl $0x1, -0x4(%rbp)
jmp 0x8b96a
jmp 0x8b8e8
cmpl $0x10, -0x24(%rbp)
jne 0x8b8f9
movl -0x14(%rbp), %eax
andl $0xfe, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x8b921
movl -0x8(%rbp), %edx
movl -0x14(%rbp), %ecx
movl $0x3, %edi
leaq 0x3bf54(%rip), %rsi     # 0xc7865
movb $0x0, %al
callq 0x8b980
movl $0x1, -0x4(%rbp)
jmp 0x8b96a
movsd -0x10(%rbp), %xmm0
movsd 0x3ba8a(%rip), %xmm1    # 0xc73b8
ucomisd %xmm1, %xmm0
jbe 0x8b963
movl -0x8(%rbp), %eax
movl %eax, -0x28(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x95e0
movl -0x28(%rbp), %edx
movl $0x3, %edi
leaq 0x3bf39(%rip), %rsi     # 0xc788c
movb $0x1, %al
callq 0x8b980
movl $0x1, -0x4(%rbp)
jmp 0x8b96a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::testsnr(int, int, double, double, bamboo::snrmask_t const*)
extern int testsnr(int base, int freq, double el, double snr,
                   const snrmask_t *mask)
{
    double minsnr,a;
    int i;
    
    if (!mask->ena[base]||freq<0||freq>=NFREQ) return 0;
    
    a=(el*R2D+5.0)/10.0;
    i=(int)floor(a); a-=i;
    if      (i<1) minsnr=mask->mask[freq][0];
    else if (i>8) minsnr=mask->mask[freq][8];
    else minsnr=(1.0-a)*mask->mask[freq][i-1]+a*mask->mask[freq][i];
    
    return snr<minsnr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x8(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x8b9c6
cmpl $0x0, -0xc(%rbp)
jl 0x8b9c6
cmpl $0x3, -0xc(%rbp)
jl 0x8b9d2
movl $0x0, -0x4(%rbp)
jmp 0x8bae7
movsd -0x18(%rbp), %xmm0
movsd 0x35011(%rip), %xmm1    # 0xc09f0
mulsd %xmm1, %xmm0
movsd 0x31d85(%rip), %xmm1    # 0xbd770
addsd %xmm1, %xmm0
movsd 0x31609(%rip), %xmm1    # 0xbd000
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
callq 0x9c90
cvttsd2si %xmm0, %eax
movl %eax, -0x3c(%rbp)
cvtsi2sdl -0x3c(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
cmpl $0x1, -0x3c(%rbp)
jge 0x8ba4b
movq -0x28(%rbp), %rax
addq $0x8, %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x8bace
cmpl $0x8, -0x3c(%rbp)
jle 0x8ba70
movq -0x28(%rbp), %rax
addq $0x8, %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x8bacc
movsd 0x303e8(%rip), %xmm0    # 0xbbe60
subsd -0x38(%rbp), %xmm0
movq -0x28(%rbp), %rax
addq $0x8, %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x38(%rbp), %xmm1
movq -0x28(%rbp), %rax
addq $0x8, %rax
movslq -0xc(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x8bace
movsd -0x20(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::obs2code(char const*, int*)
extern unsigned char obs2code(const char *obs, int *freq)
{
    int i;
    if (freq) *freq=0;
    for (i=1;*obscodes[i];i++) {
        if (strcmp(obscodes[i],obs)) continue;
        if (freq) *freq=obsfreqs[i];
        return (unsigned char)i;
    }
    return CODE_NONE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8bb11
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl $0x1, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x6cb7d(%rip), %rax     # 0xf86a0
movq (%rax,%rcx,8), %rax
cmpb $0x0, (%rax)
je 0x8bb7a
movslq -0x1c(%rbp), %rcx
leaq 0x6cb69(%rip), %rax     # 0xf86a0
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
callq 0x9a60
cmpl $0x0, %eax
je 0x8bb4b
jmp 0x8bb6f
cmpq $0x0, -0x18(%rbp)
je 0x8bb67
movslq -0x1c(%rbp), %rcx
leaq 0x6cd23(%rip), %rax     # 0xf8880
movzbl (%rax,%rcx), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
movb %al, -0x1(%rbp)
jmp 0x8bb7e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8bb18
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::code2obs(unsigned char, int*)
extern char *code2obs(unsigned char code, int *freq)
{
    if (freq) *freq=0;
    if (code<=CODE_NONE||MAXCODE<code) return "";
    if (freq) *freq=obsfreqs[code];
    return obscodes[code];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8bbaf
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movzbl -0x9(%rbp), %eax
cmpl $0x0, %eax
jle 0x8bbc5
movzbl -0x9(%rbp), %ecx
movl $0x37, %eax
cmpl %ecx, %eax
jge 0x8bbd2
leaq 0x3113b(%rip), %rax     # 0xbcd07
movq %rax, -0x8(%rbp)
jmp 0x8bc05
cmpq $0x0, -0x18(%rbp)
je 0x8bbf0
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0x6cc9a(%rip), %rax     # 0xf8880
movzbl (%rax,%rcx), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0x6caa3(%rip), %rax     # 0xf86a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::setcodepri(int, int, char const*)
extern void setcodepri(int sys, int freq, const char *pri)
{
    trace(3,"setcodepri:sys=%d freq=%d pri=%s\n",sys,freq,pri);
    
    if (freq<=0||MAXRTKFREQ<freq) return;
    if (sys&SYS_GPS) strcpy(codepris[0][freq-1],pri);
    if (sys&SYS_GLO) strcpy(codepris[1][freq-1],pri);
    if (sys&SYS_GAL) strcpy(codepris[2][freq-1],pri);
    if (sys&SYS_QZS) strcpy(codepris[3][freq-1],pri);
    if (sys&SYS_SBS) strcpy(codepris[4][freq-1],pri);
    if (sys&SYS_CMP) strcpy(codepris[5][freq-1],pri);
    if (sys&SYS_IRN) strcpy(codepris[6][freq-1],pri);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %r8
movl $0x3, %edi
leaq 0x3bc7d(%rip), %rsi     # 0xc78b5
movb $0x0, %al
callq 0x8b980
cmpl $0x0, -0x8(%rbp)
jle 0x8bc4f
movl $0x7, %eax
cmpl -0x8(%rbp), %eax
jge 0x8bc54
jmp 0x8bda1
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8bc7e
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x6cc52(%rip), %rdi     # 0xf88c0
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x96f0
movl -0x4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x8bcac
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x6cc28(%rip), %rdi     # 0xf88c0
addq $0x70, %rdi
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x96f0
movl -0x4(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x8bcdd
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x6cbfa(%rip), %rdi     # 0xf88c0
addq $0xe0, %rdi
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x96f0
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x8bd0e
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x6cbc9(%rip), %rdi     # 0xf88c0
addq $0x150, %rdi            # imm = 0x150
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x96f0
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x8bd3f
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x6cb98(%rip), %rdi     # 0xf88c0
addq $0x1c0, %rdi            # imm = 0x1C0
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x96f0
movl -0x4(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x8bd70
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x6cb67(%rip), %rdi     # 0xf88c0
addq $0x230, %rdi            # imm = 0x230
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x96f0
movl -0x4(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x8bda1
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x6cb36(%rip), %rdi     # 0xf88c0
addq $0x2a0, %rdi            # imm = 0x2A0
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x96f0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::setbitu(unsigned char*, int, int, unsigned int)
extern void setbitu(unsigned char *buff, int pos, int len, unsigned int data)
{
    unsigned int mask=1u<<(len-1);
    int i;
    if (len<=0||32<len) return;
    for (i=pos;i<pos+len;i++,mask>>=1) {
        if (data&mask) buff[i/8]|=1u<<(7-i%8); else buff[i/8]&=~(1u<<(7-i%8));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x10(%rbp)
jle 0x8c101
movl $0x20, %eax
cmpl -0x10(%rbp), %eax
jge 0x8c106
jmp 0x8c1c1
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0xc(%rbp), %ecx
addl -0x10(%rbp), %ecx
cmpl %ecx, %eax
jge 0x8c1c1
movl -0x14(%rbp), %eax
andl -0x18(%rbp), %eax
cmpl $0x0, %eax
je 0x8c168
movl -0x1c(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl $0x7, %ecx
subl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0x8c1a9
movl -0x1c(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl $0x7, %ecx
subl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
xorl $-0x1, %esi
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
andl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0x8c1ab
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
shrl %eax
movl %eax, -0x18(%rbp)
jmp 0x8c10c
popq %rbp
retq
nopw %cs:(%rax,%rax)