LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::antmodel(bamboo::pcv_t const*, double const*, double const*, int, double*)
extern void antmodel(const pcv_t *pcv, const double *del, const double *azel,
                     int opt, double *dant)
{
    double e[3],off[3],cosel=cos(azel[1]);
    int i,j;
    
    trace(4,"antmodel: azel=%6.1f %4.1f opt=%d\n",azel[0]*R2D,azel[1]*R2D,opt);
    
    e[0]=sin(azel[0])*cosel;
    e[1]=cos(azel[0])*cosel;
    e[2]=sin(azel[1]);
    
    for (i=0;i<NFREQ;i++) {
        for (j=0;j<3;j++) off[j]=pcv->off[i][j]+del[j];
        
        dant[i]=-rtk_dot(off,e,3)+(opt?interpvar(90.0-azel[1]*R2D,pcv->var[i]):0.0);
    }
    trace(5,"antmodel: dant=%6.3f %6.3f\n",dant[0],dant[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movsd 0x8(%rdx), %xmm0
callq 0x8bf0
movsd %xmm0, -0x30(%rbp)
movsd (%r15), %xmm0
callq 0x8150
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movsd (%r15), %xmm0
callq 0x8bf0
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd 0x8(%r15), %xmm0
callq 0x8150
movsd %xmm0, -0x40(%rbp)
leaq 0xa8(%r13), %rax
addq $0xf0, %r13
xorl %ecx, %ecx
movsd 0x1fd37(%rip), %xmm0    # 0x74e10
movsd 0x159df(%rip), %xmm1    # 0x6aac0
movsd 0x166df(%rip), %xmm2    # 0x6b7c8
movsd 0x1482f(%rip), %xmm3    # 0x69920
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm4
addsd (%r12,%rdx,8), %xmm4
movsd %xmm4, -0x70(%rbp,%rdx,8)
incq %rdx
cmpq $0x3, %rdx
jne 0x550f3
xorpd %xmm4, %xmm4
movl $0x4, %edx
movsd -0x80(%rbp,%rdx,8), %xmm5
mulsd -0x60(%rbp,%rdx,8), %xmm5
addsd %xmm5, %xmm4
decq %rdx
cmpq $0x1, %rdx
ja 0x55116
testl %r14d, %r14d
je 0x55167
movsd 0x8(%r15), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
imulq $0x98, %rcx, %rdx
addq %r13, %rdx
divsd %xmm2, %xmm5
cvttsd2si %xmm5, %esi
testl %esi, %esi
js 0x5516d
cmpl $0x12, %esi
jb 0x55173
movsd 0x90(%rdx), %xmm6
jmp 0x5519b
xorpd %xmm6, %xmm6
jmp 0x5519b
movsd (%rdx), %xmm6
jmp 0x5519b
movl %esi, %edi
movapd %xmm3, %xmm6
xorps %xmm7, %xmm7
cvtsi2sd %esi, %xmm7
subsd %xmm5, %xmm6
subsd %xmm7, %xmm5
mulsd 0x8(%rdx,%rdi,8), %xmm5
addsd %xmm7, %xmm6
mulsd (%rdx,%rdi,8), %xmm6
addsd %xmm5, %xmm6
subsd %xmm4, %xmm6
movsd %xmm6, (%rbx,%rcx,8)
incq %rcx
addq $0x18, %rax
cmpq $0x3, %rcx
jne 0x550f1
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::antmodel_s(bamboo::pcv_t const*, double, double*)
extern void antmodel_s(const pcv_t *pcv, double nadir, double *dant)
{
    int i;
    
    trace(4,"antmodel_s: nadir=%6.1f\n",nadir*R2D);
    
    for (i=0;i<NFREQ;i++) {
        dant[i]=interpvar(nadir*R2D*5.0,pcv->var[i]);
    }
    trace(5,"antmodel_s: dant=%6.3f %6.3f\n",dant[0],dant[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
mulsd 0x19c68(%rip), %xmm0    # 0x6ee38
movsd 0x165f0(%rip), %xmm1    # 0x6b7c8
mulsd %xmm1, %xmm0
addq $0xf0, %rdi
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movsd 0x1472d(%rip), %xmm1    # 0x69920
cvttpd2dq %xmm0, %xmm2
cvtdq2pd %xmm2, %xmm2
subsd %xmm0, %xmm1
addsd %xmm2, %xmm1
subsd %xmm2, %xmm0
xorl %ecx, %ecx
testl %eax, %eax
js 0x5521c
cmpl $0x12, %eax
jb 0x55222
movsd 0x90(%rdi), %xmm2
jmp 0x55239
movsd (%rdi), %xmm2
jmp 0x55239
movsd 0x8(%rdi,%rax,8), %xmm3
mulsd %xmm0, %xmm3
movsd (%rdi,%rax,8), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
movsd %xmm2, (%rsi,%rcx,8)
incq %rcx
addq $0x98, %rdi
cmpq $0x3, %rcx
jne 0x55209
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::addpcv(bamboo::pcv_t const*, bamboo::pcvs_t*)
static void addpcv(const pcv_t *pcv, pcvs_t *pcvs)
{
    pcv_t *pcvs_pcv;
    
    if (pcvs->nmax<=pcvs->n) {
        pcvs->nmax+=256;
        if (!(pcvs_pcv=(pcv_t *)realloc(pcvs->pcv,sizeof(pcv_t)*pcvs->nmax))) {
            trace(1,"addpcv: memory allocation error\n");
            free(pcvs->pcv); pcvs->pcv=NULL; pcvs->n=pcvs->nmax=0;
            return;
        }
        pcvs->pcv=pcvs_pcv;
    }
    pcvs->pcv[pcvs->n++]=*pcv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x4(%rsi), %rax
movl (%rsi), %ecx
cmpl %ecx, %eax
jle 0x55d2c
movq 0x8(%r14), %rax
jmp 0x55d52
addq $0x100, %rax            # imm = 0x100
movl %eax, 0x4(%r14)
movq 0x8(%r14), %rdi
imulq $0x2b8, %rax, %rsi      # imm = 0x2B8
callq 0x8a70
testq %rax, %rax
je 0x55d76
movq %rax, 0x8(%r14)
movl (%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movslq %ecx, %rcx
imulq $0x2b8, %rcx, %rdi      # imm = 0x2B8
addq %rax, %rdi
movl $0x2b8, %edx            # imm = 0x2B8
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x84f0
movq 0x8(%r14), %rdi
callq 0x87a0
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::decodef(char*, int, double*)
static int decodef(char *p, int n, double *v)
{
    int i;
    
    for (i=0;i<n;i++) v[i]=0.0;
    for (i=0,p=strtok(p," ");p&&i<n;p=strtok(NULL," ")) {
        v[i++]=atof(p)*1E-3;
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
testl %esi, %esi
jle 0x55e12
movq %rdx, %rbx
setle %r13b
movl %esi, %r12d
leaq (,%r12,8), %rdx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8390
leaq 0x1f709(%rip), %rsi     # 0x754cf
movq %r15, %rdi
callq 0x89b0
testq %rax, %rax
sete %cl
orb %r13b, %cl
jne 0x55e24
xorl %r14d, %r14d
leaq 0x1f6ec(%rip), %r15     # 0x754cf
movq %rax, %rdi
callq 0x87d0
mulsd 0x15f85(%rip), %xmm0    # 0x6bd78
movsd %xmm0, (%rbx,%r14,8)
incq %r14
xorl %edi, %edi
movq %r15, %rsi
callq 0x89b0
testq %rax, %rax
je 0x55e24
cmpq %r12, %r14
jb 0x55de3
jmp 0x55e24
leaq 0x1f6b6(%rip), %rsi     # 0x754cf
movq %r15, %rdi
callq 0x89b0
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::cmpeph(void const*, void const*)
static int cmpeph(const void *p1, const void *p2)
{
    eph_t *q1=(eph_t *)p1,*q2=(eph_t *)p2;
    return q1->ttr.time!=q2->ttr.time?(int)(q1->ttr.time-q2->ttr.time):
           (q1->toe.time!=q2->toe.time?(int)(q1->toe.time-q2->toe.time):
            q1->sat-q2->sat);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x40(%rdi), %rax
movq 0x40(%rsi), %rcx
cmpq %rcx, %rax
jne 0x55e5a
movq 0x20(%rdi), %rax
movq 0x20(%rsi), %rcx
cmpq %rcx, %rax
jne 0x55e5a
movl (%rdi), %eax
subl (%rsi), %eax
jmp 0x55e5c
subl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::cmpgeph(void const*, void const*)
static int cmpgeph(const void *p1, const void *p2)
{
    geph_t *q1=(geph_t *)p1,*q2=(geph_t *)p2;
    return q1->tof.time!=q2->tof.time?(int)(q1->tof.time-q2->tof.time):
           (q1->toe.time!=q2->toe.time?(int)(q1->toe.time-q2->toe.time):
            q1->sat-q2->sat);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rdi), %rax
movq 0x28(%rsi), %rcx
cmpq %rcx, %rax
jne 0x55e82
movq 0x18(%rdi), %rax
movq 0x18(%rsi), %rcx
cmpq %rcx, %rax
jne 0x55e82
movl (%rdi), %eax
subl (%rsi), %eax
jmp 0x55e84
subl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::cmpseph(void const*, void const*)
static int cmpseph(const void *p1, const void *p2)
{
    seph_t *q1=(seph_t *)p1,*q2=(seph_t *)p2;
    return q1->tof.time!=q2->tof.time?(int)(q1->tof.time-q2->tof.time):
           (q1->t0.time!=q2->t0.time?(int)(q1->t0.time-q2->t0.time):
            q1->sat-q2->sat);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rax
movq 0x18(%rsi), %rcx
cmpq %rcx, %rax
jne 0x55eaa
movq 0x8(%rdi), %rax
movq 0x8(%rsi), %rcx
cmpq %rcx, %rax
jne 0x55eaa
movl (%rdi), %eax
subl (%rsi), %eax
jmp 0x55eac
subl %ecx, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::input_stq(bamboo::raw_t*, unsigned char)
extern int input_stq(raw_t *raw, unsigned char data)
{
    trace(5,"input_stq: data=%02x\n",data);
    
    /* synchronize frame */
    if (raw->nbyte==0) {
        if (!sync_stq(raw->buff,data)) return 0;
        raw->nbyte=2;
        return 0;
    }
    raw->buff[raw->nbyte++]=data;
    
    if (raw->nbyte==4) {
        if ((raw->len=U2(raw->buff+2)+7)>MAXRAWLEN) {
            trace(2,"stq message length error: len=%d\n",raw->len);
            raw->nbyte=0;
            return -1;
        }
    }
    if (raw->nbyte<4||raw->nbyte<raw->len) return 0;
    raw->nbyte=0;
    
    /* decode skytraq raw message */
    return decode_stq(raw);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x1f6b1(%rip), %rsi     # 0x75578
xorl %r14d, %r14d
movl $0x5, %edi
movl %r15d, %edx
xorl %eax, %eax
callq 0x4d55d
movslq 0x81a74(%rbx), %rax
testq %rax, %rax
je 0x55f45
leal 0x1(%rax), %ecx
movl %ecx, 0x81a74(%rbx)
movb %r15b, 0x81a90(%rbx,%rax)
movl 0x81a74(%rbx), %eax
cmpl $0x4, %eax
jne 0x55f6f
movzwl 0x81a92(%rbx), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
leal 0x7(%rcx), %edx
movl %edx, 0x81a78(%rbx)
cmpl $0xffa, %ecx            # imm = 0xFFA
jb 0x55f77
leaq 0x1f667(%rip), %rsi     # 0x7558e
movl $0x2, %edi
xorl %eax, %eax
callq 0x4d55d
movl $0x0, 0x81a74(%rbx)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x55f7e
movb 0x81a91(%rbx), %al
movb %al, 0x81a90(%rbx)
movb %r15b, 0x81a91(%rbx)
xorb $-0x60, %al
xorb $-0x5f, %r15b
orb %al, %r15b
jne 0x55f7e
movl $0x2, 0x81a74(%rbx)
jmp 0x55f7e
jl 0x55f7b
movl 0x81a78(%rbx), %edx
cmpl %edx, %eax
jge 0x55f8c
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x81a74(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x55fa5
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::input_stqf(bamboo::raw_t*, _IO_FILE*)
extern int input_stqf(raw_t *raw, FILE *fp)
{
    int i,data;
    
    trace(4,"input_stqf:\n");
    
    /* synchronize frame */
    if (raw->nbyte==0) {
        for (i=0;;i++) {
            if ((data=fgetc(fp))==EOF) return -2;
            if (sync_stq(raw->buff,(unsigned char)data)) break;
            if (i>=4096) return 0;
        }
    }
    if (fread(raw->buff+2,1,2,fp)<2) return -2;
    raw->nbyte=4;
    
    if ((raw->len=U2(raw->buff+2)+7)>MAXRAWLEN) {
        trace(2,"stq message length error: len=%d\n",raw->len);
        raw->nbyte=0;
        return -1;
    }
    if (fread(raw->buff+4,1,raw->len-4,fp)<(size_t)(raw->len-4)) return -2;
    raw->nbyte=0;
    
    /* decode skytraq raw message */
    return decode_stq(raw);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1f40f(%rip), %rsi     # 0x755b0
movl $0x4, %edi
xorl %eax, %eax
callq 0x4d55d
cmpl $0x0, 0x81a74(%rbx)
je 0x56232
leaq 0x81a92(%rbx), %rdi
movl $0x1, %esi
movl $0x2, %edx
movq %r14, %rcx
callq 0x8920
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
cmpq $0x2, %rax
jb 0x562c2
movl $0x4, 0x81a74(%rbx)
movzwl 0x81a92(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %edx
leal 0x7(%rdx), %eax
movl %eax, 0x81a78(%rbx)
cmpl $0xffa, %edx            # imm = 0xFFA
jb 0x5627e
leaq 0x1f37f(%rip), %rsi     # 0x7558e
movl $0x2, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x4d55d
movl $0x0, 0x81a74(%rbx)
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x562c2
movq %r14, %rdi
callq 0x89c0
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
cmpl $-0x1, %eax
je 0x562c2
movl $0x1001, %r12d          # imm = 0x1001
movb 0x81a91(%rbx), %cl
movb %cl, 0x81a90(%rbx)
movb %al, 0x81a91(%rbx)
xorb $-0x60, %cl
xorb $-0x5f, %al
orb %cl, %al
je 0x561b6
decl %r12d
je 0x562bf
movq %r14, %rdi
callq 0x89c0
cmpl $-0x1, %eax
jne 0x5624b
jmp 0x562c2
leaq 0x81a94(%rbx), %rdi
addl $0x3, %edx
movl $0x1, %esi
movq %r14, %rcx
callq 0x8920
movslq 0x81a78(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
jb 0x562c2
movl $0x0, 0x81a74(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55fa5
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::decode_stqtime(bamboo::raw_t*)
static int decode_stqtime(raw_t *raw)
{
    unsigned char *p=raw->buff+4;
    double tow;
    int week;
    
    trace(4,"decode_stqtime: len=%d\n",raw->len);
    
    raw->iod=U1(p+1);
    week    =U2(p+2);
    tow     =U4(p+4)*0.001;
    raw->time=gpst2time(week,tow);
    
    if (raw->outtype) {
        sprintf(raw->msgtype,"SKYTRAQ EPOCH (%4d): iod=%d week=%d tow=%.3f",
                raw->len,raw->iod,week,tow);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x81a78(%rdi), %edx
leaq 0x1f039(%rip), %rsi     # 0x7569b
movl $0x4, %edi
xorl %eax, %eax
callq 0x4d55d
movzbl 0x81a95(%rbx), %eax
movl %eax, 0x81a7c(%rbx)
movzbl 0x81a96(%rbx), %r14d
movzbl 0x81a97(%rbx), %eax
movl $0x81a98, %ecx          # imm = 0x81A98
leaq -0x11(%rbp), %rdx
movb (%rbx,%rcx), %sil
movb %sil, (%rdx)
decq %rdx
incq %rcx
cmpl $0x81a9c, %ecx          # imm = 0x81A9C
jne 0x56693
shll $0x8, %r14d
orl %eax, %r14d
movl -0x14(%rbp), %eax
cvtsi2sd %rax, %xmm0
mulsd 0x156b9(%rip), %xmm0    # 0x6bd78
movl %r14d, %edi
movsd %xmm0, -0x20(%rbp)
callq 0x4f24a
movq %rax, (%rbx)
movsd %xmm0, 0x8(%rbx)
cmpl $0x0, 0x81a8c(%rbx)
je 0x5670e
leaq 0x70e70(%rbx), %rdi
movl 0x81a78(%rbx), %edx
movl 0x81a7c(%rbx), %ecx
leaq 0x1efbc(%rip), %rsi     # 0x756b3
movl %r14d, %r8d
movsd -0x20(%rbp), %xmm0
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x8120
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::decode_stqgloe(bamboo::raw_t*)
static int decode_stqgloe(raw_t *raw)
{
    int prn,sat;
    unsigned char *p=raw->buff+4;
    
    trace(4,"decode_stqgloe: len=%d\n",raw->len);
    
    if (raw->len<50) {
        trace(2,"stq glo string length error: len=%d\n",raw->len);
        return -1;
    }
    prn=U1(p+1);
    if (!(sat=satno(SYS_GLO,prn))) {
        trace(2,"stq gloe string satellite number error: prn=%d\n",prn);
        return -1;
    }
    /* set frequency channel number */
    raw->nav.geph[prn-1].frq=I1(p+2);
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x81a78(%rdi), %edx
leaq 0x1e3d5(%rip), %rsi     # 0x759bf
movl $0x4, %edi
xorl %eax, %eax
callq 0x4d55d
movl 0x81a78(%rbx), %edx
cmpl $0x31, %edx
jg 0x5760f
leaq 0x1e340(%rip), %rsi     # 0x75948
movl $0x2, %edi
jmp 0x5765a
movzbl 0x81a95(%rbx), %r14d
movl $0x4, %edi
movl %r14d, %esi
callq 0x4d28d
testl %eax, %eax
je 0x5764b
movsbl 0x81a96(%rbx), %eax
movq 0x1d88(%rbx), %rcx
movl %r14d, %edx
imulq $0x98, %rdx, %rdx
movl %eax, -0x90(%rcx,%rdx)
xorl %eax, %eax
jmp 0x57666
leaq 0x1e385(%rip), %rsi     # 0x759d7
movl $0x2, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x4d55d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::decode_stqack(bamboo::raw_t*)
static int decode_stqack(raw_t *raw)
{
    unsigned char *p=raw->buff+4;
    
    trace(4,"decode_stqack: len=%d\n",raw->len);
    
    if (raw->len<9) {
        trace(2,"stq ack length error: len=%d\n",raw->len);
        return -1;
    }
    if (raw->outtype) {
        sprintf(raw->msgtype,"SKYTRAQ ACK   (%4d): msg=0x%02X",raw->len,
                U1(p+1));
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl 0x81a78(%rdi), %edx
leaq 0x1e0b4(%rip), %rsi     # 0x75af1
xorl %ebx, %ebx
movl $0x4, %edi
xorl %eax, %eax
callq 0x4d55d
movl 0x81a78(%r14), %edx
cmpl $0x8, %edx
jg 0x57a71
leaq 0x1e0aa(%rip), %rsi     # 0x75b08
movl $0x2, %edi
xorl %eax, %eax
callq 0x4d55d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x57a9d
cmpl $0x0, 0x81a8c(%r14)
je 0x57a9d
movzbl 0x81a95(%r14), %ecx
addq $0x70e70, %r14          # imm = 0x70E70
leaq 0x1e095(%rip), %rsi     # 0x75b26
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::decode_stqnack(bamboo::raw_t*)
static int decode_stqnack(raw_t *raw)
{
    unsigned char *p=raw->buff+4;
    
    trace(4,"decode_stqnack: len=%d\n",raw->len);
    
    if (raw->len<9) {
        trace(2,"stq nack length error: len=%d\n",raw->len);
        return -1;
    }
    if (raw->outtype) {
        sprintf(raw->msgtype,"SKYTRAQ NACK  (%4d): msg=0x%02X",raw->len,
                U1(p+1));
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl 0x81a78(%rdi), %edx
leaq 0x1e08b(%rip), %rsi     # 0x75b46
xorl %ebx, %ebx
movl $0x4, %edi
xorl %eax, %eax
callq 0x4d55d
movl 0x81a78(%r14), %edx
cmpl $0x8, %edx
jg 0x57aef
leaq 0x1e082(%rip), %rsi     # 0x75b5e
movl $0x2, %edi
xorl %eax, %eax
callq 0x4d55d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x57b1b
cmpl $0x0, 0x81a8c(%r14)
je 0x57b1b
movzbl 0x81a95(%r14), %ecx
addq $0x70e70, %r14          # imm = 0x70E70
leaq 0x1e06e(%rip), %rsi     # 0x75b7d
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::adj_utcweek(bamboo::gtime_t, double*)
static void adj_utcweek(gtime_t time, double *utc)
{
    int week;
    
    if (utc[3]>=256.0) return;
    time2gpst(time,&week);
    utc[3]+=week/256*256;
    if      (utc[3]<week-128) utc[3]+=256.0;
    else if (utc[3]>week+128) utc[3]-=256.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd 0x18(%rsi), %xmm1
ucomisd 0x1862e(%rip), %xmm1    # 0x70168
jae 0x57bab
movq %rsi, %rbx
leaq -0x14(%rbp), %r14
movq %r14, %rsi
callq 0x4f2b1
movl (%r14), %eax
leal 0xff(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
addsd 0x18(%rbx), %xmm0
movsd %xmm0, 0x18(%rbx)
leal -0x80(%rax), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x57b8a
movsd 0x185e0(%rip), %xmm1    # 0x70168
jmp 0x57ba2
subl $-0x80, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x57bab
movsd 0x1d9ce(%rip), %xmm1    # 0x75570
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::decodetcppath(char const*, char*, char*, char*, char*, char*, char*)
void decodetcppath(const char *path, char *addr, char *port, char *user,
		char *passwd, char *mntpnt, char *str)
	{
		char buff[MAXSTRPATH], *p, *q;

		tracet(4, "decodetcpepath: path=%s\n", path);

		if (port) *port = '\0';
		if (user) *user = '\0';
		if (passwd) *passwd = '\0';
		if (mntpnt) *mntpnt = '\0';
		if (str) *str = '\0';

		strcpy(buff, path);

		if (!(p = strrchr(buff, '@'))) p = buff;

		if ((p = strchr(p, '/'))) {
			if ((q = strchr(p + 1, ':'))) {
				*q = '\0'; if (str) strcpy(str, q + 1);
			}
			*p = '\0'; if (mntpnt) strcpy(mntpnt, p + 1);
		}
		if ((p = strrchr(buff, '@'))) {
			*p++ = '\0';
			if ((q = strchr(buff, ':'))) {
				*q = '\0'; if (passwd) strcpy(passwd, q + 1);
			}
			if (user) strcpy(user, buff);
		}
		else p = buff;

		if ((q = strchr(p, ':'))) {
			*q = '\0'; if (port) strcpy(port, q + 1);
		}
		if (addr) strcpy(addr, p);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %r9, %rbx
movq %r8, %r13
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, -0x40(%rbp)
movq %rdi, %r14
leaq 0x1e1a6(%rip), %rsi     # 0x75d88
movl $0x4, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x5342c
testq %r12, %r12
je 0x57bfb
movb $0x0, (%r12)
testq %r15, %r15
je 0x57c04
movb $0x0, (%r15)
testq %r13, %r13
je 0x57c0e
movb $0x0, (%r13)
movq 0x10(%rbp), %rax
testq %rbx, %rbx
je 0x57c1a
movb $0x0, (%rbx)
movq %r13, -0x30(%rbp)
movq %r12, -0x38(%rbp)
testq %rax, %rax
je 0x57c2a
movb $0x0, (%rax)
leaq -0x440(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x85c0
movq %r13, %rdi
movl $0x40, %esi
callq 0x86a0
testq %rax, %rax
cmoveq %r13, %rax
movq %rax, %rdi
movl $0x2f, %esi
callq 0x8250
testq %rax, %rax
je 0x57ca8
movq %rax, %r14
movq %rax, %r12
incq %r12
movq %r12, %rdi
movl $0x3a, %esi
callq 0x8250
testq %rax, %rax
movq 0x10(%rbp), %rdi
je 0x57c94
movb $0x0, (%rax)
testq %rdi, %rdi
je 0x57c94
incq %rax
movq %rax, %rsi
callq 0x85c0
movb $0x0, (%r14)
testq %rbx, %rbx
je 0x57ca8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x85c0
movq %r13, %rdi
movl $0x40, %esi
callq 0x86a0
testq %rax, %rax
movq -0x38(%rbp), %r14
je 0x57d0b
movq %rax, %rbx
movb $0x0, (%rax)
leaq -0x440(%rbp), %rdi
movl $0x3a, %esi
callq 0x8250
testq %rax, %rax
movq -0x30(%rbp), %rdi
je 0x57cf1
movb $0x0, (%rax)
testq %rdi, %rdi
je 0x57cf1
incq %rax
movq %rax, %rsi
callq 0x85c0
incq %rbx
testq %r15, %r15
je 0x57d08
leaq -0x440(%rbp), %rsi
movq %r15, %rdi
callq 0x85c0
movq %rbx, %r13
movq %r13, %rdi
movl $0x3a, %esi
callq 0x8250
testq %rax, %rax
je 0x57d33
movb $0x0, (%rax)
testq %r14, %r14
je 0x57d33
incq %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x85c0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x57d44
movq %r13, %rsi
callq 0x85c0
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strinit(bamboo::stream_t*)
extern void strinit(stream_t *stream)
	{
		tracet(3, "strinit:\n");

		stream->type = 0;
		stream->mode = 0;
		stream->state = 0;
		stream->inb = stream->inr = stream->outb = stream->outr = 0;
		stream->tick_i = stream->tick_o = stream->tact = stream->inbt = stream->outbt = 0;
		initlock(&stream->lock);
		stream->port = NULL;
		stream->path[0] = '\0';
		stream->msg[0] = '\0';
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1e02f(%rip), %rsi     # 0x75dae
xorl %r14d, %r14d
movl $0x3, %edi
xorl %eax, %eax
callq 0x5342c
leaq 0x30(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %esi, %esi
callq 0x8910
movq $0x0, 0x58(%rbx)
movb %r14b, 0x60(%rbx)
movb %r14b, 0x460(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::opentcpsvr(char const*, char*)
static tcpsvr_t *opentcpsvr(const char *path, char *msg)
	{
		tcpsvr_t *tcpsvr, tcpsvr0 = { {0} };
		char port[256] = "";

		tracet(3, "opentcpsvr: path=%s\n", path);

		if (!(tcpsvr = (tcpsvr_t *)malloc(sizeof(tcpsvr_t)))) return NULL;
		*tcpsvr = tcpsvr0;
		decodetcppath(path, tcpsvr->svr.saddr, port, NULL, NULL, NULL, NULL);
		if (sscanf(port, "%d", &tcpsvr->svr.port) < 1) {
			sprintf(msg, "port error: %s", port);
			tracet(1, "opentcpsvr: port error port=%s\n", port);
			free(tcpsvr);
			return NULL;
		}
		if (!gentcp(&tcpsvr->svr, 0, msg)) {
			free(tcpsvr);
			return NULL;
		}
		tcpsvr->svr.tcon = 0;
		return tcpsvr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %r14
movq %rdi, %r15
leaq -0x120(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8390
leaq 0x1d8df(%rip), %rsi     # 0x76095
movl $0x3, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5342c
movl $0x1, %edi
movl $0x12928, %esi          # imm = 0x12928
callq 0x8440
testq %rax, %rax
je 0x5887b
movq %rax, %rbx
leaq 0x4(%rax), %rsi
movq $0x0, (%rsp)
leaq -0x120(%rbp), %r12
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x57bb4
movq %rbx, %rdx
addq $0x104, %rdx            # imm = 0x104
leaq 0x1d914(%rip), %rsi     # 0x7612b
movq %r12, %rdi
xorl %eax, %eax
callq 0x8610
testl %eax, %eax
jle 0x58842
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x5c2b4
testl %eax, %eax
je 0x58873
movl $0x0, 0x11c(%rbx)
jmp 0x5887d
leaq 0x1d861(%rip), %rsi     # 0x760aa
leaq -0x120(%rbp), %r15
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8120
leaq 0x1d855(%rip), %rsi     # 0x760b9
movl $0x1, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5342c
movq %rbx, %rdi
callq 0x87a0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::opentcpcli(char const*, char*)
static tcpcli_t *opentcpcli(const char *path, char *msg)
	{
		tcpcli_t *tcpcli, tcpcli0 = { {0} };
		char port[256] = "";

		tracet(3, "opentcpcli: path=%s\n", path);

		if (!(tcpcli = (tcpcli_t *)malloc(sizeof(tcpcli_t)))) return NULL;
		*tcpcli = tcpcli0;
		decodetcppath(path, tcpcli->svr.saddr, port, NULL, NULL, NULL, NULL);
		if (sscanf(port, "%d", &tcpcli->svr.port) < 1) {
			sprintf(msg, "port error: %s", port);
			tracet(1, "opentcp: port error port=%s\n", port);
			free(tcpcli);
			return NULL;
		}
		tcpcli->svr.tcon = 0;
		tcpcli->toinact = toinact;
		tcpcli->tirecon = ticonnect;
		return tcpcli;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %r14
movq %rdi, %r15
leaq -0x120(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8390
leaq 0x1d9c4(%rip), %rsi     # 0x76286
movl $0x3, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5342c
movl $0x1, %edi
movl $0x130, %esi            # imm = 0x130
callq 0x8440
testq %rax, %rax
je 0x5898e
movq %rax, %rbx
leaq 0x4(%rax), %rsi
movq $0x0, (%rsp)
leaq -0x120(%rbp), %r12
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x57bb4
movq %rbx, %rdx
addq $0x104, %rdx            # imm = 0x104
leaq 0x1d808(%rip), %rsi     # 0x7612b
movq %r12, %rdi
xorl %eax, %eax
callq 0x8610
testl %eax, %eax
jle 0x58955
movl $0x0, 0x11c(%rbx)
movl 0x3755b(%rip), %eax     # 0x8fe9c
movl %eax, 0x128(%rbx)
movl 0x37553(%rip), %eax     # 0x8fea0
movl %eax, 0x12c(%rbx)
jmp 0x58990
leaq 0x1d74e(%rip), %rsi     # 0x760aa
leaq -0x120(%rbp), %r15
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8120
leaq 0x1d924(%rip), %rsi     # 0x7629b
movl $0x1, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5342c
movq %rbx, %rdi
callq 0x87a0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::openftp(char const*, int, char*)
static ftp_t *openftp(const char *path, int type, char *msg)
	{
		ftp_t *ftp;

		tracet(3, "openftp: path=%s type=%d\n", path, type);

		msg[0] = '\0';

		if (!(ftp = (ftp_t *)malloc(sizeof(ftp_t)))) return NULL;

		ftp->state = 0;
		ftp->proto = type;
		ftp->error = 0;
		ftp->thread = 0;
		ftp->local[0] = '\0';

		/* decode ftp path */
		decodeftppath(path, ftp->addr, ftp->file, ftp->user, ftp->passwd, ftp->topts);

		/* set first download time */
		ftp->tnext = timeadd(timeget(), 10.0);

		return ftp;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r12
leaq 0x1d734(%rip), %rsi     # 0x7648e
xorl %r13d, %r13d
movl $0x3, %edi
movq %r12, %rdx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x5342c
movb $0x0, (%rbx)
movl $0xe38, %edi            # imm = 0xE38
callq 0x8840
movq %rax, %rbx
testq %rax, %rax
je 0x58efe
movl %r13d, (%rbx)
movl %r14d, 0x4(%rbx)
movl %r13d, 0x8(%rbx)
movq $0x0, 0xe30(%rbx)
movb %r13b, 0xa0c(%rbx)
leaq 0x40c(%rbx), %r15
leaq 0x1d6f5(%rip), %rsi     # 0x764a8
movl $0x4, %edi
movq %r12, %rdx
xorl %eax, %eax
callq 0x5342c
movb %r13b, 0x80c(%rbx)
movb %r13b, 0x90c(%rbx)
movsd 0x1cf98(%rip), %xmm0    # 0x75d70
movups %xmm0, 0xe0c(%rbx)
leaq -0x430(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x85c0
movq %r14, %rdi
movl $0x2f, %esi
callq 0x8250
testq %rax, %rax
je 0x58e60
movq %rax, %r12
leaq 0x1(%rax), %r13
leaq 0x1d1c4(%rip), %rsi     # 0x75fd5
movq %r13, %rdi
callq 0x8160
testq %rax, %rax
je 0x58e52
leaq 0xe0c(%rbx), %rdx
leaq 0xe10(%rbx), %rcx
leaq 0xe14(%rbx), %r8
leaq 0xe18(%rbx), %r9
movb $0x0, (%rax)
addq $0x2, %rax
leaq 0x1d677(%rip), %rsi     # 0x764bf
movq %rax, %rdi
xorl %eax, %eax
callq 0x8610
movq %r15, %rdi
movq %r13, %rsi
callq 0x85c0
movq %r12, %r15
leaq 0xc(%rbx), %r12
movb $0x0, (%r15)
movq %r14, %rdi
movl $0x40, %esi
callq 0x86a0
testq %rax, %rax
je 0x58ecf
movq %rax, %r15
leaq 0x80c(%rbx), %r14
movb $0x0, (%rax)
leaq -0x430(%rbp), %rdi
movl $0x3a, %esi
callq 0x8250
movq %rax, %r13
testq %rax, %rax
je 0x58eb5
movq %rbx, %rdi
addq $0x90c, %rdi            # imm = 0x90C
movq %r13, %rsi
incq %rsi
callq 0x85c0
incq %r15
movb $0x0, (%r13)
leaq -0x430(%rbp), %rsi
movq %r14, %rdi
callq 0x85c0
movq %r15, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x85c0
callq 0x4f542
movsd 0x11be1(%rip), %xmm1    # 0x6aac8
movq %rax, %rdi
callq 0x4f4e7
movq %rax, 0xe20(%rbx)
movsd %xmm0, 0xe28(%rbx)
movq %rbx, %rax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::closetcpsvr(bamboo::tcpsvr_tag*)
static void closetcpsvr(tcpsvr_t *tcpsvr)
	{
		int i;

		tracet(3, "closetcpsvr:\n");

		for (i = 0; i < MAXCLI; i++) {
			if (tcpsvr->cli[i].state) closesocket(tcpsvr->cli[i].sock);
		}
		closesocket(tcpsvr->svr.sock);
		free(tcpsvr);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1d3ed(%rip), %rsi     # 0x76509
movl $0x3, %edi
xorl %eax, %eax
callq 0x5342c
movl $0x240, %r14d           # imm = 0x240
cmpl $0x0, -0x118(%rbx,%r14)
je 0x59142
movl (%rbx,%r14), %edi
callq 0x8c40
addq $0x128, %r14            # imm = 0x128
cmpq $0x12a40, %r14          # imm = 0x12A40
jne 0x5912e
movl 0x118(%rbx), %edi
callq 0x8c40
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x87a0
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::closentripc(bamboo::ntripc_t*)
static void closentripc(ntripc_t *ntripc)
	{
		tracet(3, "closentripc: state=%d\n", ntripc->state);

		closetcpsvr(ntripc->tcp);
		free(ntripc->srctbl);
		free(ntripc);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edx
leaq 0x1d355(%rip), %rsi     # 0x76543
movl $0x3, %edi
xorl %eax, %eax
callq 0x5342c
movq 0x338(%rbx), %rdi
callq 0x5910b
movq 0x308(%rbx), %rdi
callq 0x87a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x87a0
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strsync(bamboo::stream_t*, bamboo::stream_t*)
extern void strsync(stream_t *stream1, stream_t *stream2)
	{
		file_t *file1, *file2;
		if (stream1->type != STR_FILE || stream2->type != STR_FILE) return;
		file1 = (file_t*)stream1->port;
		file2 = (file_t*)stream2->port;
		if (file1&&file2) syncfile(file1, file2);
	}

// Assembly:
cmpl $0x2, (%rdi)
jne 0x592c7
cmpl $0x2, (%rsi)
jne 0x592c7
movq 0x58(%rdi), %rcx
movq 0x58(%rsi), %rax
testq %rcx, %rcx
setne %dl
testq %rax, %rax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x592c7
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x8(%rcx)
je 0x592c6
cmpq $0x0, 0x8(%rax)
je 0x592c6
movl $0x0, 0x828(%rcx)
movl $0x1, 0x828(%rax)
movl 0x85c(%rcx), %ecx
subl 0x85c(%rax), %ecx
movl %ecx, 0x82c(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::readtcpcli(bamboo::tcpcli_t*, unsigned char*, int, char*)
static int readtcpcli(tcpcli_t *tcpcli, unsigned char *buff, int n, char *msg)
	{
		int nr, err;

		tracet(4, "readtcpcli: sock=%d\n", tcpcli->svr.sock);

		if (!waittcpcli(tcpcli, msg)) return 0;

		if ((nr = recv_nb(tcpcli->svr.sock, buff, n)) == -1) {
			if ((err = errsock())) {
				tracet(1, "readtcpcli: recv error sock=%d err=%d\n", tcpcli->svr.sock, err);
				sprintf(msg, "recv error (%d)", err);
			}
			else {
				sprintf(msg, "disconnected");
			}
			discontcp(&tcpcli->svr, tcpcli->tirecon);
			return 0;
		}
		if (nr > 0) tcpcli->svr.tact = tickget();
		tracet(5, "readtcpcli: exit sock=%d nr=%d\n", tcpcli->svr.sock, nr);
		return nr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
movl 0x118(%rdi), %edx
leaq 0x1ca52(%rip), %rsi     # 0x76730
xorl %r14d, %r14d
movl $0x4, %edi
xorl %eax, %eax
callq 0x5342c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5cd65
testl %eax, %eax
je 0x59db1
movl 0x118(%rbx), %edi
movq %r13, %rsi
movl %r12d, %edx
callq 0x5cb70
cmpl $-0x1, %eax
je 0x59d49
movl %eax, %r12d
testl %eax, %eax
jle 0x59d28
callq 0x4fece
movl %eax, 0x120(%rbx)
movl 0x118(%rbx), %edx
leaq 0x1ca54(%rip), %rsi     # 0x76789
movl $0x5, %edi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x5342c
movl %r12d, %r14d
jmp 0x59db1
callq 0x8070
movl (%rax), %r12d
testl %r12d, %r12d
je 0x59d88
movl 0x118(%rbx), %edx
leaq 0x1c9e2(%rip), %rsi     # 0x76745
movl $0x1, %edi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x5342c
leaq 0x1c9f3(%rip), %rsi     # 0x7676c
movq %r15, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x8120
jmp 0x59da3
movabsq $0x64657463656e6e, %rax # imm = 0x64657463656E6E
movq %rax, 0x5(%r15)
movabsq $0x656e6e6f63736964, %rax # imm = 0x656E6E6F63736964
movq %rax, (%r15)
movl 0x12c(%rbx), %esi
movq %rbx, %rdi
callq 0x5cc1d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::writetcpsvr(bamboo::tcpsvr_tag*, unsigned char*, int, char*)
static int writetcpsvr(tcpsvr_t *tcpsvr, unsigned char *buff, int n, char *msg)
	{
		int i, ns = 0, err;

		tracet(4, "writetcpsvr: state=%d n=%d\n", tcpsvr->svr.state, n);

		if (!waittcpsvr(tcpsvr, msg)) return 0;

		for (i = 0; i < MAXCLI; i++) {
			if (tcpsvr->cli[i].state != 2) continue;

			if ((ns = send_nb(tcpsvr->cli[i].sock, buff, n)) == -1) {
				if ((err = errsock())) {
					tracet(1, "writetcpsvr: send error i=%d sock=%d err=%d\n", i,
						tcpsvr->cli[i].sock, err);
				}
				discontcp(&tcpsvr->cli[i], ticonnect);
				updatetcpsvr(tcpsvr, msg);
				return 0;
			}
			if (ns > 0) tcpsvr->cli[i].tact = tickget();
		}
		return ns;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %r15
movl (%rdi), %edx
leaq 0x1c860(%rip), %rsi     # 0x77210
xorl %r14d, %r14d
movl $0x4, %edi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x5342c
movq %r15, -0x30(%rbp)
movq %r15, %rdi
movq %rbx, -0x38(%rbp)
movq %rbx, %rsi
callq 0x5c934
testl %eax, %eax
je 0x5aa79
movq -0x30(%rbp), %rax
leaq 0x128(%rax), %r15
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpl $0x2, (%r15)
jne 0x5aa1d
movl 0x118(%r15), %edi
movq %r13, %rsi
movl %r12d, %edx
callq 0x5e2a4
cmpl $-0x1, %eax
je 0x5aa32
movl %eax, %r14d
testl %eax, %eax
jle 0x5aa1d
callq 0x4fece
movl %eax, 0x120(%r15)
incq %rbx
addq $0x128, %r15            # imm = 0x128
cmpq $0x100, %rbx            # imm = 0x100
jne 0x5a9ed
jmp 0x5aa79
callq 0x8070
movl (%rax), %r8d
testl %r8d, %r8d
je 0x5aa5b
movl 0x118(%r15), %ecx
leaq 0x1c7df(%rip), %rsi     # 0x7722c
movl $0x1, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x5342c
movl 0x3543f(%rip), %esi     # 0x8fea0
movq %r15, %rdi
callq 0x5cc1d
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x5cc6f
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::writetcpcli(bamboo::tcpcli_t*, unsigned char*, int, char*)
static int writetcpcli(tcpcli_t *tcpcli, unsigned char *buff, int n, char *msg)
	{
		int ns, err;

		tracet(3, "writetcpcli: sock=%d state=%d n=%d\n", tcpcli->svr.sock, tcpcli->svr.state, n);

		if (!waittcpcli(tcpcli, msg)) return 0;

		if ((ns = send_nb(tcpcli->svr.sock, buff, n)) == -1) {
			if ((err = errsock())) {
				tracet(1, "writetcp: send error sock=%d err=%d\n", tcpcli->svr.sock, err);
				sprintf(msg, "send error (%d)", err);
			}
			else {
				sprintf(msg, "disconnected");
			}
			discontcp(&tcpcli->svr, tcpcli->tirecon);
			return 0;
		}
		if (ns > 0) tcpcli->svr.tact = tickget();
		tracet(5, "writetcpcli: exit sock=%d ns=%d\n", tcpcli->svr.sock, ns);
		return ns;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
movl (%rdi), %ecx
movl 0x118(%rdi), %edx
leaq 0x1c7a5(%rip), %rsi     # 0x77259
xorl %r14d, %r14d
movl $0x3, %edi
movl %r12d, %r8d
xorl %eax, %eax
callq 0x5342c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5cd65
testl %eax, %eax
je 0x5ab8a
movl 0x118(%rbx), %edi
movq %r13, %rsi
movl %r12d, %edx
callq 0x5e2a4
cmpl $-0x1, %eax
je 0x5ab22
movl %eax, %r12d
testl %eax, %eax
jle 0x5ab01
callq 0x4fece
movl %eax, 0x120(%rbx)
movl 0x118(%rbx), %edx
leaq 0x1c7a4(%rip), %rsi     # 0x772b2
movl $0x5, %edi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x5342c
movl %r12d, %r14d
jmp 0x5ab8a
callq 0x8070
movl (%rax), %r12d
testl %r12d, %r12d
je 0x5ab61
movl 0x118(%rbx), %edx
leaq 0x1c741(%rip), %rsi     # 0x7727d
movl $0x1, %edi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x5342c
leaq 0x1c750(%rip), %rsi     # 0x772a2
movq %r15, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x8120
jmp 0x5ab7c
movabsq $0x64657463656e6e, %rax # imm = 0x64657463656E6E
movq %rax, 0x5(%r15)
movabsq $0x656e6e6f63736964, %rax # imm = 0x656E6E6F63736964
movq %rax, (%r15)
movl 0x12c(%rbx), %esi
movq %rbx, %rdi
callq 0x5cc1d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strsetsel(bamboo::stream_t*, char const*)
extern int strsetsel(stream_t *stream, const char *sel)
	{
		if (!stream->port ||
			(stream->type != STR_NTRIPC_S && stream->type != STR_NTRIPC_C)) {
			return 0;
		}
		strlock(stream);

		strcpy(((ntripc_t *)stream->port)->mntpnt, sel);

		strunlock(stream);
		return 1;
	}

// Assembly:
xorl %eax, %eax
cmpq $0x0, 0x58(%rdi)
je 0x5abf2
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl (%rdi), %ecx
andl $-0x2, %ecx
cmpl $0xa, %ecx
jne 0x5abe8
movq %rsi, %rbx
leaq 0x30(%r14), %r15
movq %r15, %rdi
callq 0x8900
movq 0x58(%r14), %rdi
addq $0x8, %rdi
movq %rbx, %rsi
callq 0x85c0
movq %r15, %rdi
callq 0x84b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strgetsel(bamboo::stream_t*, char*)
extern int strgetsel(stream_t *stream, char *sel)
	{
		*sel = '\0';

		if (!stream->port ||
			(stream->type != STR_NTRIPC_S && stream->type != STR_NTRIPC_C)) {
			return 0;
		}
		strlock(stream);

		strcpy(sel, ((ntripc_t *)stream->port)->mntpnt);

		strunlock(stream);
		return 1;
	}

// Assembly:
movb $0x0, (%rsi)
xorl %eax, %eax
cmpq $0x0, 0x58(%rdi)
je 0x5ac4c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl (%rdi), %ecx
andl $-0x2, %ecx
cmpl $0xa, %ecx
jne 0x5ac42
movq %rsi, %rbx
leaq 0x30(%r14), %r15
movq %r15, %rdi
callq 0x8900
movq 0x58(%r14), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x85c0
movq %r15, %rdi
callq 0x84b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strgetmsgid(bamboo::stream_t*, int*)
extern int strgetmsgid(stream_t *stream, int *msgid) {
		if (!stream->port ||
			(stream->type != STR_NTRIPC_S && stream->type != STR_NTRIPC_C)) {
			return 0;
		}
		strlock(stream);
		*msgid = ((ntripc_t*)stream->port)->msgid;
		strunlock(stream);
		return 1;
	}

// Assembly:
xorl %eax, %eax
cmpq $0x0, 0x58(%rdi)
je 0x5ac9f
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl (%rdi), %ecx
andl $-0x2, %ecx
cmpl $0xa, %ecx
jne 0x5ac95
movq %rsi, %rbx
leaq 0x30(%r14), %r15
movq %r15, %rdi
callq 0x8900
movq 0x58(%r14), %rax
movl 0x820f40(%rax), %eax
movl %eax, (%rbx)
movq %r15, %rdi
callq 0x84b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strsetmsgid(bamboo::stream_t*, int)
extern int strsetmsgid(stream_t *stream, int msgid) {
		if (!stream->port ||
			(stream->type != STR_NTRIPC_S && stream->type != STR_NTRIPC_C)) {
			return 0;
		}
		strlock(stream);

		((ntripc_t*)stream->port)->msgid = msgid;
		strunlock(stream);
		return 1;
	}

// Assembly:
xorl %eax, %eax
cmpq $0x0, 0x58(%rdi)
je 0x5acef
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl (%rdi), %ecx
andl $-0x2, %ecx
cmpl $0xa, %ecx
jne 0x5ace5
movl %esi, %ebx
leaq 0x30(%r14), %r15
movq %r15, %rdi
callq 0x8900
movq 0x58(%r14), %rax
movl %ebx, 0x820f40(%rax)
movq %r15, %rdi
callq 0x84b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strstat(bamboo::stream_t*, char*)
extern int strstat(stream_t *stream, char *msg)
	{
		int state;

		tracet(4, "strstat:\n");

		strlock(stream);
		if (msg) {
			strncpy(msg, stream->msg, MAXSTRMSG - 1); msg[MAXSTRMSG - 1] = '\0';
		}
		if (!stream->port) {
			strunlock(stream);
			return stream->state;
		}
		switch (stream->type) {
		case STR_SERIAL: state = stateserial((serial_t *)stream->port); break;
		case STR_FILE: state = statefile((file_t   *)stream->port); break;
		case STR_TCPSVR: state = statetcpsvr((tcpsvr_t *)stream->port); break;
		case STR_TCPCLI: state = statetcpcli((tcpcli_t *)stream->port); break;
		case STR_NTRIPSVR:
		case STR_NTRIPCLI: state = statentrip((ntrip_t  *)stream->port); break;
		case STR_NTRIPC_C:
		case STR_NTRIPC_S: state = statentripc((ntripc_t *)stream->port); break;
		case STR_UDPSVR: state = stateudpsvr((udp_t    *)stream->port); break;
		case STR_UDPCLI: state = stateudpcli((udp_t    *)stream->port); break;
		case STR_MEMBUF: state = statemembuf((membuf_t *)stream->port); break;
		case STR_FTP: state = stateftp((ftp_t    *)stream->port); break;
		case STR_HTTP: state = stateftp((ftp_t    *)stream->port); break;
		default:
			strunlock(stream);
			return 0;
		}
		if (state == 2 && (int)(tickget() - stream->tact) <= TINTACT) state = 3;
		strunlock(stream);
		return state;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0x1b12f(%rip), %rsi     # 0x75e36
movl $0x4, %edi
xorl %eax, %eax
callq 0x5342c
leaq 0x30(%r14), %rbx
movq %rbx, %rdi
callq 0x8900
testq %r15, %r15
je 0x5ad40
leaq 0x460(%r14), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
movq %r15, %rdi
callq 0x8350
movb $0x0, 0x3ff(%r15)
movq 0x58(%r14), %rax
testq %rax, %rax
je 0x5ad93
movl (%r14), %ecx
decl %ecx
cmpl $0xd, %ecx
ja 0x5add8
leaq 0x1af42(%rip), %rdx     # 0x75ca0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl (%rax), %r15d
cmpl $0x2, %r15d
jne 0x5ad89
callq 0x4fece
subl 0x24(%r14), %eax
xorl %r15d, %r15d
cmpl $0xc9, %eax
setl %r15b
orl $0x2, %r15d
movq %rbx, %rdi
callq 0x84b0
jmp 0x5ad9f
movq %rbx, %rdi
callq 0x84b0
movl 0x8(%r14), %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl (%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
setl %cl
testl %edx, %edx
je 0x5ad70
movb %cl, %al
leal -0x1(,%rax,4), %r15d
jmp 0x5ad89
movl (%rax), %r15d
testl %r15d, %r15d
jne 0x5ad6a
movq 0x8510(%rax), %rax
jmp 0x5ad67
movq %rbx, %rdi
callq 0x84b0
xorl %r15d, %r15d
jmp 0x5ad9f
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x0, 0x4(%rax)
jne 0x5ad89
jmp 0x5ad70
// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strsum(bamboo::stream_t*, int*, int*, int*, int*)
extern void strsum(stream_t *stream, int *inb, int *inr, int *outb, int *outr)
	{
		tracet(4, "strsum:\n");

		strlock(stream);
		if (inb)  *inb = stream->inb;
		if (inr)  *inr = stream->inr;
		if (outb) *outb = stream->outb;
		if (outr) *outr = stream->outr;
		strunlock(stream);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, -0x30(%rbp)
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1a6b8(%rip), %rsi     # 0x75e4b
movl $0x4, %edi
xorl %eax, %eax
callq 0x5342c
leaq 0x30(%r14), %r12
movq %r12, %rdi
callq 0x8900
testq %rbx, %rbx
je 0x5b7b6
movl 0xc(%r14), %eax
movl %eax, (%rbx)
testq %r13, %r13
je 0x5b7c3
movl 0x10(%r14), %eax
movl %eax, (%r13)
testq %r15, %r15
movq -0x30(%rbp), %rcx
je 0x5b7d3
movl 0x14(%r14), %eax
movl %eax, (%r15)
testq %rcx, %rcx
je 0x5b7de
movl 0x18(%r14), %eax
movl %eax, (%rcx)
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x84b0