LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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 %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x99a63
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
subq 0x28(%rcx), %rax
movl %eax, -0x24(%rbp)
jmp 0x99a9f
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x99a8a
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
subq 0x18(%rcx), %rax
movl %eax, -0x28(%rbp)
jmp 0x99a99
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x99af3
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
subq 0x18(%rcx), %rax
movl %eax, -0x24(%rbp)
jmp 0x99b2f
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x99b1a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
subq 0x8(%rcx), %rax
movl %eax, -0x28(%rbp)
jmp 0x99b29
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %edx
movl $0x5, %edi
leaq 0x2e64e(%rip), %rsi     # 0xc8320
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
cmpl $0x0, 0x81a74(%rax)
jne 0x99d25
movq -0x10(%rbp), %rdi
addq $0x81a90, %rdi          # imm = 0x81A90
movzbl -0x11(%rbp), %esi
callq 0x99e10
cmpl $0x0, %eax
jne 0x99d0b
movl $0x0, -0x4(%rbp)
jmp 0x99dff
movq -0x10(%rbp), %rax
movl $0x2, 0x81a74(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x99dff
movb -0x11(%rbp), %dl
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movl 0x81a74(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x81a74(%rsi)
movslq %ecx, %rcx
movb %dl, 0x81a90(%rax,%rcx)
movq -0x10(%rbp), %rax
cmpl $0x4, 0x81a74(%rax)
jne 0x99db9
movq -0x10(%rbp), %rdi
addq $0x81a90, %rdi          # imm = 0x81A90
addq $0x2, %rdi
callq 0x99e70
movzwl %ax, %eax
addl $0x7, %eax
movq -0x10(%rbp), %rcx
movl %eax, 0x81a78(%rcx)
cmpl $0x1000, %eax           # imm = 0x1000
jle 0x99db7
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x2, %edi
leaq 0x2e59d(%rip), %rsi     # 0xc8336
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
movl $0x0, 0x81a74(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x99dff
jmp 0x99db9
movq -0x10(%rbp), %rax
cmpl $0x4, 0x81a74(%rax)
jl 0x99ddc
movq -0x10(%rbp), %rax
movl 0x81a74(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x81a78(%rcx), %eax
jge 0x99de5
movl $0x0, -0x4(%rbp)
jmp 0x99dff
movq -0x10(%rbp), %rax
movl $0x0, 0x81a74(%rax)
movq -0x10(%rbp), %rdi
callq 0x99ed0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x4, %edi
leaq 0x2e22c(%rip), %rsi     # 0xc8358
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
cmpl $0x0, 0x81a74(%rax)
jne 0x9a1a5
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9b80
movl %eax, -0x20(%rbp)
cmpl $-0x1, %eax
jne 0x9a164
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9a2ab
movq -0x10(%rbp), %rdi
addq $0x81a90, %rdi          # imm = 0x81A90
movl -0x20(%rbp), %eax
movzbl %al, %esi
callq 0x99e10
cmpl $0x0, %eax
je 0x9a181
jmp 0x9a1a3
cmpl $0x1000, -0x1c(%rbp)    # imm = 0x1000
jl 0x9a196
movl $0x0, -0x4(%rbp)
jmp 0x9a2ab
jmp 0x9a198
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9a147
jmp 0x9a1a5
movq -0x10(%rbp), %rdi
addq $0x81a90, %rdi          # imm = 0x81A90
addq $0x2, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %esi
movl $0x2, %edx
callq 0x9af0
cmpq $0x2, %rax
jae 0x9a1d9
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9a2ab
movq -0x10(%rbp), %rax
movl $0x4, 0x81a74(%rax)
movq -0x10(%rbp), %rdi
addq $0x81a90, %rdi          # imm = 0x81A90
addq $0x2, %rdi
callq 0x99e70
movzwl %ax, %eax
addl $0x7, %eax
movq -0x10(%rbp), %rcx
movl %eax, 0x81a78(%rcx)
cmpl $0x1000, %eax           # imm = 0x1000
jle 0x9a246
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x2, %edi
leaq 0x2e10e(%rip), %rsi     # 0xc8336
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
movl $0x0, 0x81a74(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9a2ab
movq -0x10(%rbp), %rdi
addq $0x81a90, %rdi          # imm = 0x81A90
addq $0x4, %rdi
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %eax
subl $0x4, %eax
movslq %eax, %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x9af0
movq -0x10(%rbp), %rcx
movl 0x81a78(%rcx), %ecx
subl $0x4, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jae 0x9a291
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9a2ab
movq -0x10(%rbp), %rax
movl $0x0, 0x81a74(%rax)
movq -0x10(%rbp), %rdi
callq 0x99ed0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::checksum(unsigned char*, int)
static unsigned char checksum(unsigned char *buff, int len)
{
    unsigned char cs=0;
    int i;
    
    for (i=4;i<len-3;i++) {
        cs^=buff[i];
    }
    return cs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb $0x0, -0xd(%rbp)
movl $0x4, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jge 0x9aad3
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movzbl -0xd(%rbp), %eax
xorl %ecx, %eax
movb %al, -0xd(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9aaa6
movb -0xd(%rbp), %al
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x81a94, %rax          # imm = 0x81A94
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x81a78(%rax), %edx
leaq 0x2d938(%rip), %rsi     # 0xc8443
xorl %eax, %eax
movl $0x4, %edi
callq 0x8b980
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x81a7c(%rax)
movq -0x10(%rbp), %rdi
addq $0x2, %rdi
callq 0x99e70
movzwl %ax, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x4, %rdi
callq 0x9c8b0
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd 0x231f0(%rip), %xmm1    # 0xbdd48
mulsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x1c(%rbp), %edi
movsd -0x18(%rbp), %xmm0
callq 0x8e4a0
movq %rax, -0x30(%rbp)
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x81a8c(%rax)
je 0x9abcd
movq -0x8(%rbp), %rdi
addq $0x70e70, %rdi          # imm = 0x70E70
movq -0x8(%rbp), %rax
movl 0x81a78(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x81a7c(%rax), %ecx
movl -0x1c(%rbp), %r8d
movsd -0x18(%rbp), %xmm0
leaq 0x2d895(%rip), %rsi     # 0xc845b
movb $0x1, %al
callq 0x9150
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::decode_stqgps(bamboo::raw_t*)
static int decode_stqgps(raw_t *raw)
{
    int prn,sat,id;
    unsigned char *p=raw->buff+4;
    
    trace(4,"decode_stqgps: len=%d\n",raw->len);
    
    if (raw->len<40) {
        trace(2,"stq gps/qzss subframe length error: len=%d\n",raw->len);
        return -1;
    }
    if (raw->outtype) {
        sprintf(raw->msgtype,"SKYTRAQ GPSSF (%4d): prn=%2d id=%d",raw->len,
                U1(p+1),(p[8]>>2)&0x7);
    }
    prn=U1(p+1);
    if (!(sat=satno(MINPRNQZS<=prn&&prn<=MAXPRNQZS?SYS_QZS:SYS_GPS,prn))) {
        trace(2,"stq gps/qzss subframe satellite number error: prn=%d\n",prn);
        return -1;
    }
    id=save_subfrm(sat,raw);
    if (id==3) return decode_ephem(sat,raw);
    if (id==4) return decode_alm1 (sat,raw);
    if (id==5) return decode_alm2 (sat,raw);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x81a90, %rax          # imm = 0x81A90
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x4, %edi
leaq 0x2ca7b(%rip), %rsi     # 0xc859f
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
cmpl $0x28, 0x81a78(%rax)
jge 0x9bb61
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x2, %edi
leaq 0x2ca68(%rip), %rsi     # 0xc85b6
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9bc68
movq -0x10(%rbp), %rax
cmpl $0x0, 0x81a8c(%rax)
je 0x9bbaa
movq -0x10(%rbp), %rdi
addq $0x70e70, %rdi          # imm = 0x70E70
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movq -0x28(%rbp), %rax
movzbl 0x1(%rax), %ecx
movq -0x28(%rbp), %rax
movzbl 0x8(%rax), %r8d
sarl $0x2, %r8d
andl $0x7, %r8d
leaq 0x2ca3f(%rip), %rsi     # 0xc85e2
movb $0x0, %al
callq 0x9150
movq -0x28(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x14(%rbp)
xorl %eax, %eax
xorl %ecx, %ecx
cmpl -0x14(%rbp), %ecx
movb %al, -0x29(%rbp)
jg 0x9bbcb
cmpl $0x0, -0x14(%rbp)
setle %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %cl
movl $0x1, %edi
movl $0x10, %eax
testb $0x1, %cl
cmovnel %eax, %edi
movl -0x14(%rbp), %esi
callq 0x8b1b0
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
jne 0x9bc0d
movl -0x14(%rbp), %edx
movl $0x2, %edi
leaq 0x2ca08(%rip), %rsi     # 0xc8605
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9bc68
movl -0x18(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x9c9d0
movl %eax, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jne 0x9bc33
movl -0x18(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x9caf0
movl %eax, -0x4(%rbp)
jmp 0x9bc68
cmpl $0x4, -0x1c(%rbp)
jne 0x9bc4a
movl -0x18(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x9ccd0
movl %eax, -0x4(%rbp)
jmp 0x9bc68
cmpl $0x5, -0x1c(%rbp)
jne 0x9bc61
movl -0x18(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x9ce70
movl %eax, -0x4(%rbp)
jmp 0x9bc68
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x81a90, %rax          # imm = 0x81A90
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x4, %edi
leaq 0x2c743(%rip), %rsi     # 0xc8767
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
cmpl $0x32, 0x81a78(%rax)
jge 0x9c05e
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x2, %edi
leaq 0x2c6a2(%rip), %rsi     # 0xc86f0
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9c0cd
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %esi
movl $0x4, %edi
callq 0x8b1b0
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
jne 0x9c09d
movl -0x14(%rbp), %edx
movl $0x2, %edi
leaq 0x2c6f2(%rip), %rsi     # 0xc877f
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9c0cd
movq -0x20(%rbp), %rax
movsbl 0x2(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x1d88(%rax), %rax
movl -0x14(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x98, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x81a90, %rax          # imm = 0x81A90
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x4, %edi
leaq 0x2c135(%rip), %rsi     # 0xc8899
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
cmpl $0x9, 0x81a78(%rax)
jge 0x9c79e
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x2, %edi
leaq 0x2c122(%rip), %rsi     # 0xc88b0
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9c7dd
movq -0x10(%rbp), %rax
cmpl $0x0, 0x81a8c(%rax)
je 0x9c7d6
movq -0x10(%rbp), %rdi
addq $0x70e70, %rdi          # imm = 0x70E70
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %ecx
leaq 0x2c0ff(%rip), %rsi     # 0xc88ce
movb $0x0, %al
callq 0x9150
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x81a90, %rax          # imm = 0x81A90
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x4, %edi
leaq 0x2c0ca(%rip), %rsi     # 0xc88ee
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
cmpl $0x9, 0x81a78(%rax)
jge 0x9c85e
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x2, %edi
leaq 0x2c0b8(%rip), %rsi     # 0xc8906
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9c89d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x81a8c(%rax)
je 0x9c896
movq -0x10(%rbp), %rdi
addq $0x70e70, %rdi          # imm = 0x70E70
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %ecx
leaq 0x2c096(%rip), %rsi     # 0xc8925
movb $0x0, %al
callq 0x9150
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::save_subfrm(int, bamboo::raw_t*)
static int save_subfrm(int sat, raw_t *raw)
{
    unsigned char *p=raw->buff+7,*q;
    int i,id;
    
    trace(4,"save_subfrm: sat=%2d\n",sat);
    
    /* check navigation subframe preamble */
    if (p[0]!=0x8B) {
        trace(2,"stq subframe preamble error: 0x%02X\n",p[0]);
        return 0;
    }
    id=(p[5]>>2)&0x7;
    
    /* check subframe id */
    if (id<1||5<id) {
        trace(2,"stq subframe id error: id=%d\n",id);
        return 0;
    }
    q=raw->subfrm[sat-1]+(id-1)*30;
    
    for (i=0;i<30;i++) q[i]=p[i];
    
    return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x81a90, %rax          # imm = 0x81A90
addq $0x7, %rax
movq %rax, -0x18(%rbp)
movl -0x8(%rbp), %edx
movl $0x4, %edi
leaq 0x2bc3b(%rip), %rsi     # 0xc863b
movb $0x0, %al
callq 0x8b980
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8b, %eax
je 0x9ca3b
movq -0x18(%rbp), %rax
movzbl (%rax), %edx
movl $0x2, %edi
leaq 0x2bc29(%rip), %rsi     # 0xc8651
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x4(%rbp)
jmp 0x9cadf
movq -0x18(%rbp), %rax
movzbl 0x5(%rax), %eax
sarl $0x2, %eax
andl $0x7, %eax
movl %eax, -0x28(%rbp)
cmpl $0x1, -0x28(%rbp)
jl 0x9ca5c
movl $0x5, %eax
cmpl -0x28(%rbp), %eax
jge 0x9ca7b
movl -0x28(%rbp), %edx
movl $0x2, %edi
leaq 0x2bc0b(%rip), %rsi     # 0xc8676
movb $0x0, %al
callq 0x8b980
movl $0x0, -0x4(%rbp)
jmp 0x9cadf
movq -0x10(%rbp), %rax
addq $0x70f70, %rax          # imm = 0x70F70
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x17c, %rcx, %rcx      # imm = 0x17C
addq %rcx, %rax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
imull $0x1e, %ecx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x1e, -0x24(%rbp)
jge 0x9cad9
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x9cab2
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::decode_ephem(int, bamboo::raw_t*)
static int decode_ephem(int sat, raw_t *raw)
{
    eph_t eph={0};
    
    trace(4,"decode_ephem: sat=%2d\n",sat);
    
    if (decode_frame(raw->subfrm[sat-1]   ,&eph,NULL,NULL,NULL,NULL)!=1||
        decode_frame(raw->subfrm[sat-1]+30,&eph,NULL,NULL,NULL,NULL)!=2||
        decode_frame(raw->subfrm[sat-1]+60,&eph,NULL,NULL,NULL,NULL)!=3) return 0;
    
    if (!strstr(raw->opt,"-EPHALL")) {
        if (eph.iode==raw->nav.eph[sat-1].iode&&
            eph.iodc==raw->nav.eph[sat-1].iodc) return 0; /* unchanged */
    }
    eph.sat=sat;
    raw->nav.eph[sat-1]=eph;
    raw->ephsat=sat;
    return 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
movl $0x120, %edx            # imm = 0x120
callq 0x93d0
movl -0x8(%rbp), %edx
movl $0x4, %edi
leaq 0x2bb70(%rip), %rsi     # 0xc8694
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rdi
addq $0x70f70, %rdi          # imm = 0x70F70
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x17c, %rax, %rax      # imm = 0x17C
addq %rax, %rdi
leaq -0x130(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rdx
movq %r9, %rcx
movq %r9, %r8
callq 0x654d0
cmpl $0x1, %eax
jne 0x9cbeb
movq -0x10(%rbp), %rdi
addq $0x70f70, %rdi          # imm = 0x70F70
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x17c, %rax, %rax      # imm = 0x17C
addq %rax, %rdi
addq $0x1e, %rdi
leaq -0x130(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rdx
movq %r9, %rcx
movq %r9, %r8
callq 0x654d0
cmpl $0x2, %eax
jne 0x9cbeb
movq -0x10(%rbp), %rdi
addq $0x70f70, %rdi          # imm = 0x70F70
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x17c, %rax, %rax      # imm = 0x17C
addq %rax, %rdi
addq $0x3c, %rdi
leaq -0x130(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rdx
movq %r9, %rcx
movq %r9, %r8
callq 0x654d0
cmpl $0x3, %eax
je 0x9cbf7
movl $0x0, -0x4(%rbp)
jmp 0x9ccbc
movq -0x10(%rbp), %rdi
addq $0x82a90, %rdi          # imm = 0x82A90
leaq 0x21c56(%rip), %rsi     # 0xbe85f
callq 0x91b0
cmpq $0x0, %rax
jne 0x9cc71
movl -0x12c(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x1d80(%rcx), %rcx
movl -0x8(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x120, %rdx, %rdx      # imm = 0x120
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x9cc6f
movl -0x128(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x1d80(%rcx), %rcx
movl -0x8(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x120, %rdx, %rdx      # imm = 0x120
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x9cc6f
movl $0x0, -0x4(%rbp)
jmp 0x9ccbc
jmp 0x9cc71
movl -0x8(%rbp), %eax
movl %eax, -0x130(%rbp)
movq -0x10(%rbp), %rax
movq 0x1d80(%rax), %rdi
movl -0x8(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x120, %rax, %rax      # imm = 0x120
addq %rax, %rdi
leaq -0x130(%rbp), %rsi
movl $0x120, %edx            # imm = 0x120
callq 0x9610
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x70e40(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::decode_alm1(int, bamboo::raw_t*)
static int decode_alm1(int sat, raw_t *raw)
{
    int sys=satsys(sat,NULL);
    
    trace(4,"decode_alm1 : sat=%2d\n",sat);
    
    if (sys==SYS_GPS) {
        decode_frame(raw->subfrm[sat-1]+90,NULL,raw->nav.alm,raw->nav.ion_gps,
                     raw->nav.utc_gps,&raw->nav.leaps);
        adj_utcweek(raw->time,raw->nav.utc_gps);
    }
    else if (sys==SYS_QZS) {
        decode_frame(raw->subfrm[sat-1]+90,NULL,raw->nav.alm,raw->nav.ion_qzs,
                     raw->nav.utc_qzs,&raw->nav.leaps);
        adj_utcweek(raw->time,raw->nav.utc_qzs);
    }
    return 9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x8b3b0
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %edx
movl $0x4, %edi
leaq 0x2b9ae(%rip), %rsi     # 0xc86ab
movb $0x0, %al
callq 0x8b980
cmpl $0x1, -0x14(%rbp)
jne 0x9cdb1
movq -0x10(%rbp), %rdi
addq $0x70f70, %rdi          # imm = 0x70F70
movl -0x4(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x17c, %rax, %rax      # imm = 0x17C
addq %rax, %rdi
addq $0x5a, %rdi
movq -0x10(%rbp), %rax
movq 0x1da8(%rax), %rdx
movq -0x10(%rbp), %rcx
addq $0x1d40, %rcx           # imm = 0x1D40
addq $0x170, %rcx            # imm = 0x170
movq -0x10(%rbp), %r8
addq $0x1d40, %r8            # imm = 0x1D40
addq $0x90, %r8
movq -0x10(%rbp), %r9
addq $0x1d40, %r9            # imm = 0x1D40
addq $0x290, %r9             # imm = 0x290
xorl %eax, %eax
movl %eax, %esi
callq 0x654d0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
addq $0x1d40, %rsi           # imm = 0x1D40
addq $0x90, %rsi
movq -0x28(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
callq 0x9cfa0
jmp 0x9ce5b
cmpl $0x10, -0x14(%rbp)
jne 0x9ce59
movq -0x10(%rbp), %rdi
addq $0x70f70, %rdi          # imm = 0x70F70
movl -0x4(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x17c, %rax, %rax      # imm = 0x17C
addq %rax, %rdi
addq $0x5a, %rdi
movq -0x10(%rbp), %rax
movq 0x1da8(%rax), %rdx
movq -0x10(%rbp), %rcx
addq $0x1d40, %rcx           # imm = 0x1D40
addq $0x1d0, %rcx            # imm = 0x1D0
movq -0x10(%rbp), %r8
addq $0x1d40, %r8            # imm = 0x1D40
addq $0xf0, %r8
movq -0x10(%rbp), %r9
addq $0x1d40, %r9            # imm = 0x1D40
addq $0x290, %r9             # imm = 0x290
xorl %eax, %eax
movl %eax, %esi
callq 0x654d0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rsi
addq $0x1d40, %rsi           # imm = 0x1D40
addq $0xf0, %rsi
movq -0x38(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
callq 0x9cfa0
jmp 0x9ce5b
movl $0x9, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/skytraq.cpp
// Function: bamboo::decode_alm2(int, bamboo::raw_t*)
static int decode_alm2(int sat, raw_t *raw)
{
    int sys=satsys(sat,NULL);
    
    trace(4,"decode_alm2 : sat=%2d\n",sat);
    
    if (sys==SYS_GPS) {
        decode_frame(raw->subfrm[sat-1]+120,NULL,raw->nav.alm,NULL,NULL,NULL);
    }
    else if (sys==SYS_QZS) {
        decode_frame(raw->subfrm[sat-1]+120,NULL,raw->nav.alm,raw->nav.ion_qzs,
                     raw->nav.utc_qzs,&raw->nav.leaps);
        adj_utcweek(raw->time,raw->nav.utc_qzs);
    }
    return  0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x8b3b0
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %edx
movl $0x4, %edi
leaq 0x2b825(%rip), %rsi     # 0xc86c2
movb $0x0, %al
callq 0x8b980
cmpl $0x1, -0x14(%rbp)
jne 0x9ceee
movq -0x10(%rbp), %rdi
addq $0x70f70, %rdi          # imm = 0x70F70
movl -0x4(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x17c, %rax, %rax      # imm = 0x17C
addq %rax, %rdi
addq $0x78, %rdi
movq -0x10(%rbp), %rax
movq 0x1da8(%rax), %rdx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rsi
movq %r9, %rcx
movq %r9, %r8
callq 0x654d0
jmp 0x9cf98
cmpl $0x10, -0x14(%rbp)
jne 0x9cf96
movq -0x10(%rbp), %rdi
addq $0x70f70, %rdi          # imm = 0x70F70
movl -0x4(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x17c, %rax, %rax      # imm = 0x17C
addq %rax, %rdi
addq $0x78, %rdi
movq -0x10(%rbp), %rax
movq 0x1da8(%rax), %rdx
movq -0x10(%rbp), %rcx
addq $0x1d40, %rcx           # imm = 0x1D40
addq $0x1d0, %rcx            # imm = 0x1D0
movq -0x10(%rbp), %r8
addq $0x1d40, %r8            # imm = 0x1D40
addq $0xf0, %r8
movq -0x10(%rbp), %r9
addq $0x1d40, %r9            # imm = 0x1D40
addq $0x290, %r9             # imm = 0x290
xorl %eax, %eax
movl %eax, %esi
callq 0x654d0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
addq $0x1d40, %rsi           # imm = 0x1D40
addq $0xf0, %rsi
movq -0x28(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
callq 0x9cfa0
jmp 0x9cf98
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x20e02(%rip), %xmm1    # 0xbddc8
ucomisd %xmm1, %xmm0
jb 0x9cfd1
jmp 0x9d07d
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rdi
movsd -0x28(%rbp), %xmm0
leaq -0x1c(%rbp), %rsi
callq 0x8e540
movl -0x1c(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
shll $0x8, %eax
cvtsi2sd %eax, %xmm0
movq -0x18(%rbp), %rax
addsd 0x18(%rax), %xmm0
movsd %xmm0, 0x18(%rax)
movq -0x18(%rbp), %rax
movsd 0x18(%rax), %xmm1
movl -0x1c(%rbp), %eax
subl $0x80, %eax
cvtsi2sd %eax, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x9d046
movq -0x18(%rbp), %rax
movsd 0x20d8e(%rip), %xmm0    # 0xbddc8
addsd 0x18(%rax), %xmm0
movsd %xmm0, 0x18(%rax)
jmp 0x9d07d
movq -0x18(%rbp), %rax
movsd 0x18(%rax), %xmm0
movl -0x1c(%rbp), %eax
addl $0x80, %eax
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x9d07b
movq -0x18(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x20d56(%rip), %xmm1    # 0xbddc8
subsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rax)
jmp 0x9d07d
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x3, %edi
leaq 0x2b826(%rip), %rsi     # 0xc8b4e
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9ae0
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x460(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x12a60, %rsp          # imm = 0x12A60
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x12948(%rbp), %rdi
xorl %esi, %esi
movl $0x12928, %edx          # imm = 0x12928
callq 0x93d0
leaq -0x12a50(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0x2adfb(%rip), %rsi     # 0xc8e64
movb $0x0, %al
callq 0x95890
movl $0x12928, %edi          # imm = 0x12928
callq 0x99e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9e091
movq $0x0, -0x8(%rbp)
jmp 0x9e179
movq -0x20(%rbp), %rdi
leaq -0x12948(%rbp), %rsi
movl $0x12928, %edx          # imm = 0x12928
callq 0x9610
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
leaq -0x12a50(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rcx
movq %r9, %r8
movq $0x0, (%rsp)
callq 0x9d090
leaq -0x12a50(%rbp), %rdi
movq -0x20(%rbp), %rdx
addq $0x104, %rdx            # imm = 0x104
leaq 0x2ae10(%rip), %rsi     # 0xc8efa
movb $0x0, %al
callq 0x9750
cmpl $0x1, %eax
jge 0x9e13c
movq -0x18(%rbp), %rdi
leaq -0x12a50(%rbp), %rdx
leaq 0x2ad71(%rip), %rsi     # 0xc8e79
movb $0x0, %al
callq 0x9150
leaq -0x12a50(%rbp), %rdx
movl $0x1, %edi
leaq 0x2ad66(%rip), %rsi     # 0xc8e88
movb $0x0, %al
callq 0x95890
movq -0x20(%rbp), %rdi
callq 0x9900
movq $0x0, -0x8(%rbp)
jmp 0x9e179
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0xa4110
cmpl $0x0, %eax
jne 0x9e163
movq -0x20(%rbp), %rdi
callq 0x9900
movq $0x0, -0x8(%rbp)
jmp 0x9e179
movq -0x20(%rbp), %rax
movl $0x0, 0x11c(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x12a60, %rsp          # imm = 0x12A60
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x150(%rbp), %rdi
xorl %esi, %esi
movl $0x130, %edx            # imm = 0x130
callq 0x93d0
leaq -0x250(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0x2ae7c(%rip), %rsi     # 0xc9055
movb $0x0, %al
callq 0x95890
movl $0x130, %edi            # imm = 0x130
callq 0x99e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9e201
movq $0x0, -0x8(%rbp)
jmp 0x9e2e2
movq -0x20(%rbp), %rdi
leaq -0x150(%rbp), %rsi
movl $0x130, %edx            # imm = 0x130
callq 0x9610
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
leaq -0x250(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rcx
movq %r9, %r8
movq $0x0, (%rsp)
callq 0x9d090
leaq -0x250(%rbp), %rdi
movq -0x20(%rbp), %rdx
addq $0x104, %rdx            # imm = 0x104
leaq 0x2aca0(%rip), %rsi     # 0xc8efa
movb $0x0, %al
callq 0x9750
cmpl $0x1, %eax
jge 0x9e2ac
movq -0x18(%rbp), %rdi
leaq -0x250(%rbp), %rdx
leaq 0x2ac01(%rip), %rsi     # 0xc8e79
movb $0x0, %al
callq 0x9150
leaq -0x250(%rbp), %rdx
movl $0x1, %edi
leaq 0x2add8(%rip), %rsi     # 0xc906a
movb $0x0, %al
callq 0x95890
movq -0x20(%rbp), %rdi
callq 0x9900
movq $0x0, -0x8(%rbp)
jmp 0x9e2e2
movq -0x20(%rbp), %rax
movl $0x0, 0x11c(%rax)
movl 0x5b7ac(%rip), %ecx     # 0xf9a6c
movq -0x20(%rbp), %rax
movl %ecx, 0x128(%rax)
movl 0x5b7a0(%rip), %ecx     # 0xf9a70
movq -0x20(%rbp), %rax
movl %ecx, 0x12c(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
nop
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::openudpsvr(char const*, char*)
static udp_t *openudpsvr(const char *path, char *msg)
	{
		char sport[256] = "";
		int port;

		tracet(3, "openudpsvr: path=%s\n", path);

		decodetcppath(path, NULL, sport, NULL, NULL, NULL, NULL);

		if (sscanf(sport, "%d", &port) < 1) {
			sprintf(msg, "port error: %s", sport);
			tracet(1, "openudpsvr: port error port=%s\n", port);
			return NULL;
		}
		return genudp(0, port, "", msg);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0x2a93a(%rip), %rsi     # 0xc9110
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
leaq -0x120(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rsi
movq %r9, %rcx
movq %r9, %r8
movq $0x0, (%rsp)
callq 0x9d090
leaq -0x120(%rbp), %rdi
leaq 0x2a6e9(%rip), %rsi     # 0xc8efa
leaq -0x124(%rbp), %rdx
movb $0x0, %al
callq 0x9750
cmpl $0x1, %eax
jge 0x9e860
movq -0x18(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq 0x2a643(%rip), %rsi     # 0xc8e79
movb $0x0, %al
callq 0x9150
movl -0x124(%rbp), %edx
movl $0x1, %edi
leaq 0x2a8d6(%rip), %rsi     # 0xc9125
movb $0x0, %al
callq 0x95890
movq $0x0, -0x8(%rbp)
jmp 0x9e87c
movl -0x124(%rbp), %esi
movq -0x18(%rbp), %rcx
xorl %edi, %edi
leaq 0x1e494(%rip), %rdx     # 0xbcd07
callq 0xa45c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::openudpcli(char const*, char*)
static udp_t *openudpcli(const char *path, char *msg)
	{
		char sport[256] = "", saddr[256] = "";
		int port;

		tracet(3, "openudpsvr: path=%s\n", path);

		decodetcppath(path, saddr, sport, NULL, NULL, NULL, NULL);

		if (sscanf(sport, "%d", &port) < 1) {
			sprintf(msg, "port error: %s", sport);
			tracet(1, "openudpcli: port error port=%s\n", sport);
			return NULL;
		}
		return genudp(1, port, saddr, msg);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
leaq -0x220(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0x2a837(%rip), %rsi     # 0xc9110
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
leaq -0x220(%rbp), %rsi
leaq -0x120(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rcx
movq %r9, %r8
movq $0x0, (%rsp)
callq 0x9d090
leaq -0x120(%rbp), %rdi
leaq 0x2a5e2(%rip), %rsi     # 0xc8efa
leaq -0x224(%rbp), %rdx
movb $0x0, %al
callq 0x9750
cmpl $0x1, %eax
jge 0x9e968
movq -0x18(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq 0x2a53c(%rip), %rsi     # 0xc8e79
movb $0x0, %al
callq 0x9150
leaq -0x120(%rbp), %rdx
movl $0x1, %edi
leaq 0x2a8bf(%rip), %rsi     # 0xc9216
movb $0x0, %al
callq 0x95890
movq $0x0, -0x8(%rbp)
jmp 0x9e987
movl -0x224(%rbp), %esi
leaq -0x220(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %edi
callq 0xa45c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::openmembuf(char const*, char*)
static membuf_t *openmembuf(const char *path, char *msg)
	{
		membuf_t *membuf;
		int bufsize = DEFAULT_MEMBUF_SIZE;

		tracet(3, "openmembuf: path=%s\n", path);

		msg[0] = '\0';

		sscanf(path, "%d", &bufsize);

		if (!(membuf = (membuf_t *)malloc(sizeof(membuf_t)))) return NULL;
		membuf->state = 1;
		membuf->rp = 0;
		membuf->wp = 0;
		if (!(membuf->buf = (unsigned char *)malloc(bufsize))) {
			free(membuf);
			return NULL;
		}
		membuf->bufsize = bufsize;
		initlock(&membuf->lock);

		sprintf(msg, "membuf sizebuf=%d", bufsize);

		return membuf;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1000, -0x24(%rbp)    # imm = 0x1000
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0x2a86f(%rip), %rsi     # 0xc9236
movb $0x0, %al
callq 0x95890
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x2a51a(%rip), %rsi     # 0xc8efa
leaq -0x24(%rbp), %rdx
movb $0x0, %al
callq 0x9750
movl $0x40, %edi
callq 0x99e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9ea0c
movq $0x0, -0x8(%rbp)
jmp 0x9ea8e
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
movslq -0x24(%rbp), %rdi
callq 0x99e0
movq -0x20(%rbp), %rcx
movq %rax, 0x38(%rcx)
cmpq $0x0, %rax
jne 0x9ea56
movq -0x20(%rbp), %rdi
callq 0x9900
movq $0x0, -0x8(%rbp)
jmp 0x9ea8e
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9ae0
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x2a7cc(%rip), %rsi     # 0xc924b
movb $0x0, %al
callq 0x9150
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
movl $0x3, %edi
leaq 0x2a797(%rip), %rsi     # 0xc925d
movb $0x0, %al
callq 0x95890
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movl $0xe38, %edi            # imm = 0xE38
callq 0x99e0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x9eaf5
movq $0x0, -0x8(%rbp)
jmp 0x9ebba
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0xe30(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0xa0c(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0xc, %rsi
movq -0x28(%rbp), %rdx
addq $0x40c, %rdx            # imm = 0x40C
movq -0x28(%rbp), %rcx
addq $0x80c, %rcx            # imm = 0x80C
movq -0x28(%rbp), %r8
addq $0x90c, %r8             # imm = 0x90C
movq -0x28(%rbp), %r9
addq $0xe0c, %r9             # imm = 0xE0C
callq 0xa4930
callq 0x8e920
movq %rax, -0x48(%rbp)
movsd %xmm0, -0x40(%rbp)
movq -0x48(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
movsd 0x1e476(%rip), %xmm1    # 0xbd000
callq 0x8e860
movq %rax, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0xe20(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0xe28(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::openvrsconcli(char const*, char*)
static vrscon_cli_t* openvrsconcli(const char* path, char* msg) {
		vrscon_cli_t* vrscon_cli;
		char addr[256] = "", port[256] = "", tpath[MAXSTRPATH];
		if (!(vrscon_cli = (vrscon_cli_t*)calloc(1, sizeof(vrscon_cli_t)))) return NULL;
		vrscon_cli->state = 0;
		vrscon_cli->nb = 0;
		decodetcppath(path, addr, port, vrscon_cli->user, vrscon_cli->passwd, NULL, NULL);
		sprintf(tpath, "%s:%s", addr, port);
		if (!(vrscon_cli->tcp = opentcpcli(tpath, msg))) {
			tracet(1, "openntrip: opentcp error\n");
			free(vrscon_cli);
			return NULL;
		}
		return vrscon_cli;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x630, %rsp            # imm = 0x630
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
leaq -0x220(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
movl $0x1, %edi
movl $0x610, %esi            # imm = 0x610
callq 0x94f0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9ec2f
movq $0x0, -0x8(%rbp)
jmp 0x9eced
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x220(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %r8
addq $0x108, %r8             # imm = 0x108
xorl %eax, %eax
movl %eax, %r9d
movq $0x0, (%rsp)
callq 0x9d090
leaq -0x620(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq -0x220(%rbp), %rcx
leaq 0x2a40c(%rip), %rsi     # 0xc90a3
movb $0x0, %al
callq 0x9150
leaq -0x620(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9e190
movq -0x20(%rbp), %rcx
movq %rax, 0x608(%rcx)
cmpq $0x0, %rax
jne 0x9ece5
movl $0x1, %edi
leaq 0x2a3e8(%rip), %rsi     # 0xc90b3
movb $0x0, %al
callq 0x95890
movq -0x20(%rbp), %rdi
callq 0x9900
movq $0x0, -0x8(%rbp)
jmp 0x9eced
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x630, %rsp            # imm = 0x630
popq %rbp
retq
nopw (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::closeserial(bamboo::serial_t*)
static void closeserial(serial_t *serial)
	{
		tracet(3, "closeserial: dev=%d\n", serial->dev);

		if (!serial) return;
#ifdef WIN32
		serial->state = 0;
		WaitForSingleObject(serial->thread, 10000);
		CloseHandle(serial->dev);
		CloseHandle(serial->thread);
#else
		close(serial->dev);
#endif
		if (serial->tcpsvr) {
			closetcpsvr(serial->tcpsvr);
		}
		free(serial);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edx
movl $0x3, %edi
leaq 0x2a35e(%rip), %rsi     # 0xc929c
movb $0x0, %al
callq 0x95890
cmpq $0x0, -0x8(%rbp)
jne 0x9ef4e
jmp 0x9ef7a
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x9e90
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x9ef71
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x9efd0
movq -0x8(%rbp), %rdi
callq 0x9900
addq $0x10, %rsp
popq %rbp
retq
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::closefile(bamboo::file_t*)
static void closefile(file_t *file)
	{
		tracet(3, "closefile: fp=%d\n", file->fp);

		if (!file) return;
		closefile_(file);
		free(file);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x2a312(%rip), %rsi     # 0xc92b1
movb $0x0, %al
callq 0x95890
cmpq $0x0, -0x8(%rbp)
jne 0x9efaf
jmp 0x9efc1
movq -0x8(%rbp), %rdi
callq 0xa4b50
movq -0x8(%rbp), %rdi
callq 0x9900
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x3, %edi
leaq 0x2a2f0(%rip), %rsi     # 0xc92d8
movb $0x0, %al
callq 0x95890
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jge 0x9f04c
movq -0x8(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0xc(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
cmpl $0x0, (%rax)
je 0x9f03f
movq -0x8(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0xc(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %edi
callq 0x9e90
jmp 0x9f041
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9eff6
movq -0x8(%rbp), %rax
movl 0x118(%rax), %edi
callq 0x9e90
movq -0x8(%rbp), %rdi
callq 0x9900
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)