LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edx
movl $0x3, %edi
leaq 0x2a1e4(%rip), %rsi     # 0xc9312
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rax
movq 0x338(%rax), %rdi
callq 0x9efd0
movq -0x8(%rbp), %rax
movq 0x308(%rax), %rdi
callq 0x9900
movq -0x8(%rbp), %rdi
callq 0x9900
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x9f332
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
je 0x9f334
jmp 0x9f367
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9f367
cmpq $0x0, -0x20(%rbp)
je 0x9f367
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x9f370
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::syncfile(bamboo::file_t*, bamboo::file_t*)
static void syncfile(file_t *file1, file_t *file2)
	{
		if (!file1->fp_tag || !file2->fp_tag) return;
		file1->repmode = 0;
		file2->repmode = 1;
		file2->offset = (int)(file1->tick_f - file2->tick_f);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x9f392
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x9f394
jmp 0x9f3ce
movq -0x8(%rbp), %rax
movl $0x0, 0x828(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x828(%rax)
movq -0x8(%rbp), %rax
movl 0x85c(%rax), %ecx
movq -0x10(%rbp), %rax
subl 0x85c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x82c(%rax)
popq %rbp
retq
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::readserial(bamboo::serial_t*, unsigned char*, int, char*)
static int readserial(serial_t *serial, unsigned char *buff, int n, char *msg)
	{
		char msg_tcp[128];
#ifdef WIN32
		DWORD nr;
#else
		int nr;
#endif
		tracet(4, "readserial: dev=%d n=%d\n", serial->dev, n);
		if (!serial) return 0;
#ifdef WIN32
		if (!ReadFile(serial->dev, buff, n, &nr, NULL)) return 0;
#else
		if ((nr = read(serial->dev, buff, n)) < 0) return 0;
#endif
		tracet(5, "readserial: exit dev=%d nr=%d\n", serial->dev, nr);

		/* write received stream to tcp server port */
		if (serial->tcpsvr&&nr > 0) {
			writetcpsvr(serial->tcpsvr, buff, (int)nr, msg_tcp);
		}
		return nr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edx
movl -0x1c(%rbp), %ecx
movl $0x4, %edi
leaq 0x29cc8(%rip), %rsi     # 0xc9377
movb $0x0, %al
callq 0x95890
cmpq $0x0, -0x10(%rbp)
jne 0x9f6c9
movl $0x0, -0x4(%rbp)
jmp 0x9f74a
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x9aa0
movl %eax, -0xb4(%rbp)
cmpl $0x0, %eax
jge 0x9f6f0
movl $0x0, -0x4(%rbp)
jmp 0x9f74a
movq -0x10(%rbp), %rax
movl (%rax), %edx
movl -0xb4(%rbp), %ecx
movl $0x5, %edi
leaq 0x29c88(%rip), %rsi     # 0xc9390
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x9f741
cmpl $0x0, -0xb4(%rbp)
jle 0x9f741
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0xb4(%rbp), %edx
leaq -0xb0(%rbp), %rcx
callq 0xa10f0
movl -0xb4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::readtcpsvr(bamboo::tcpsvr_tag*, unsigned char*, int, char*)
static int readtcpsvr(tcpsvr_t *tcpsvr, unsigned char *buff, int n, char *msg)
	{
		int i, nr, err;

		tracet(4, "readtcpsvr: state=%d\n", tcpsvr->svr.state);

		if (!waittcpsvr(tcpsvr, msg)) return 0;

		for (i = 0; i < MAXCLI; i++) {
			if (tcpsvr->cli[i].state != 2) continue;

			if ((nr = recv_nb(tcpsvr->cli[i].sock, buff, n)) == -1) {
				if ((err = errsock())) {
					tracet(1, "readtcpsvr: recv error sock=%d err=%d\n",
						tcpsvr->cli[i].sock, err);
				}
				discontcp(&tcpsvr->cli[i], ticonnect);
				updatetcpsvr(tcpsvr, msg);
				return 0;
			}
			if (nr > 0) {
				tcpsvr->cli[i].tact = tickget();
				return nr;
			}
		}
		return 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edx
movl $0x4, %edi
leaq 0x29792(%rip), %rsi     # 0xc93eb
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa4c10
cmpl $0x0, %eax
jne 0x9fc7e
movl $0x0, -0x4(%rbp)
jmp 0x9fdab
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp)     # imm = 0x100
jge 0x9fda4
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
cmpl $0x2, (%rax)
je 0x9fcb4
jmp 0x9fd96
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %edi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xa4ca0
movl %eax, -0x30(%rbp)
cmpl $-0x1, %eax
jne 0x9fd61
callq 0xa43f0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x9fd27
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %edx
movl -0x34(%rbp), %ecx
movl $0x1, %edi
leaq 0x296e1(%rip), %rsi     # 0xc9401
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
movslq -0x2c(%rbp), %rax
imulq $0x128, %rax, %rax      # imm = 0x128
addq %rax, %rdi
movl 0x59d2a(%rip), %esi     # 0xf9a70
callq 0xa4dd0
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa4e40
movl $0x0, -0x4(%rbp)
jmp 0x9fdab
cmpl $0x0, -0x30(%rbp)
jle 0x9fd94
callq 0x8f860
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rdx
imulq $0x128, %rdx, %rdx      # imm = 0x128
addq %rdx, %rax
movl %ecx, 0x120(%rax)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x9fdab
jmp 0x9fd96
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9fc85
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movl $0x4, %edi
leaq 0x29716(%rip), %rsi     # 0xc9503
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa5340
cmpl $0x0, %eax
jne 0x9fe12
movl $0x0, -0x4(%rbp)
jmp 0x9fedf
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xa4ca0
movl %eax, -0x2c(%rbp)
cmpl $-0x1, %eax
jne 0x9fea2
callq 0xa43f0
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
je 0x9fe74
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movl -0x30(%rbp), %ecx
movl $0x1, %edi
leaq 0x296c2(%rip), %rsi     # 0xc9518
movb $0x0, %al
callq 0x95890
movq -0x28(%rbp), %rdi
movl -0x30(%rbp), %edx
leaq 0x296d4(%rip), %rsi     # 0xc953f
movb $0x0, %al
callq 0x9150
jmp 0x9fe86
movq -0x28(%rbp), %rdi
leaq 0x296d0(%rip), %rsi     # 0xc954f
movb $0x0, %al
callq 0x9150
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x12c(%rax), %esi
callq 0xa4dd0
movl $0x0, -0x4(%rbp)
jmp 0x9fedf
cmpl $0x0, -0x2c(%rbp)
jle 0x9feb9
callq 0x8f860
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x120(%rax)
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movl -0x2c(%rbp), %ecx
movl $0x5, %edi
leaq 0x2968a(%rip), %rsi     # 0xc955c
movb $0x0, %al
callq 0x95890
movl -0x2c(%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/stream.cpp
// Function: bamboo::readntrip(bamboo::ntrip_t*, unsigned char*, int, char*)
static int readntrip(ntrip_t *ntrip, unsigned char *buff, int n, char *msg)
	{
		int nb;

		tracet(4, "readntrip:\n");

		if (!waitntrip(ntrip, msg)) return 0;

		if (ntrip->nb > 0) { /* read response buffer first */
			nb = ntrip->nb <= n ? ntrip->nb : n;
			memcpy(buff, ntrip->buff + ntrip->nb - nb, nb);
			ntrip->nb = 0;
			return nb;
		}
		return readtcpcli(ntrip->tcp, buff, n, msg);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x4, %edi
leaq 0x29733(%rip), %rsi     # 0xc9646
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa5790
cmpl $0x0, %eax
jne 0x9ff38
movl $0x0, -0x4(%rbp)
jmp 0x9ffc6
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x9ffa8
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x1c(%rbp), %eax
jg 0x9ff5a
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x30(%rbp)
jmp 0x9ff60
movl -0x1c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50c, %rsi            # imm = 0x50C
movq -0x10(%rbp), %rax
movslq 0x8(%rax), %rax
addq %rax, %rsi
movslq -0x2c(%rbp), %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movslq -0x2c(%rbp), %rdx
callq 0x9610
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x9ffc6
movq -0x10(%rbp), %rax
movq 0x8510(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x9fdc0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::readudpsvr(bamboo::udp_t*, unsigned char*, int, char*)
static int readudpsvr(udp_t *udpsvr, unsigned char *buff, int n, char *msg)
	{
		struct timeval tv = { 0 };
		fd_set rs;
		int ret, nr;

		tracet(4, "readudpsvr: sock=%d n=%d\n", udpsvr->sock, n);

		FD_ZERO(&rs); FD_SET(udpsvr->sock, &rs);
		ret = select(udpsvr->sock + 1, &rs, NULL, NULL, &tv);
		if (ret <= 0) return ret;
		nr = recvfrom(udpsvr->sock, (char *)buff, n, 0, NULL, NULL);
		return nr <= 0 ? -1 : nr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x93d0
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %edx
movl -0x1c(%rbp), %ecx
movl $0x4, %edi
leaq 0x29b48(%rip), %rsi     # 0xc9d1b
movb $0x0, %al
callq 0x95890
leaq -0xb8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl $0x0, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpq $0x10, %rax
jae 0xa0224
movq -0xd0(%rbp), %rax
movl -0xc4(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0xa01f2
jmp 0xa0226
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0xb8(%rbp,%rax,8), %rcx
movq %rcx, -0xb8(%rbp,%rax,8)
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %edi
addl $0x1, %edi
leaq -0xb8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x38(%rbp), %r8
movq %rcx, %rdx
callq 0x9710
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0xbc(%rbp)
jg 0xa02a9
movl -0xbc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa02fb
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x95c0
movl %eax, -0xc0(%rbp)
cmpl $0x0, -0xc0(%rbp)
jg 0xa02e6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xd4(%rbp)
jmp 0xa02f2
movl -0xc0(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::readmembuf(bamboo::membuf_t*, unsigned char*, int, char*)
static int readmembuf(membuf_t *membuf, unsigned char *buff, int n, char *msg)
	{
		int i, nr = 0;

		tracet(4, "readmembuf: n=%d\n", n);

		if (!membuf) return 0;

		lock(&membuf->lock);

		for (i = membuf->rp; i != membuf->wp&&nr < n; i++) {
			if (i >= membuf->bufsize) i = 0;
			buff[nr++] = membuf->buf[i];
		}
		membuf->rp = i;
		unlock(&membuf->lock);
		return nr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x1c(%rbp), %edx
movl $0x4, %edi
leaq 0x299f8(%rip), %rsi     # 0xc9d35
movb $0x0, %al
callq 0x95890
cmpq $0x0, -0x10(%rbp)
jne 0xa0357
movl $0x0, -0x4(%rbp)
jmp 0xa03f3
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x9ad0
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpl 0x4(%rdx), %ecx
movb %al, -0x31(%rbp)
je 0xa038b
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setl %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xa0394
jmp 0xa03d6
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0xa03a7
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa036e
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x95a0
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::readvrsconcli(bamboo::vrscon_cli_t*, unsigned char*, int, char*)
static int readvrsconcli(vrscon_cli_t* vrscon_cli, unsigned char* buff, int n, char* msg) {
		int nb,i;
		char*p, *q;
		if (!waitvrsconcli(vrscon_cli, msg)) return 0;
		if (vrscon_cli->nb > 0) { /* read response buffer first */
			nb = vrscon_cli->nb <= n ? vrscon_cli->nb : n;
			memcpy(buff, vrscon_cli->buff + vrscon_cli->nb - nb, nb);
			vrscon_cli->nb = vrscon_cli->nb - nb;
			p = (char*)vrscon_cli->buff;
			q = (char*)vrscon_cli->buff + nb;
			for (i = 0; i < vrscon_cli->nb; i++) *p++ = *q++;
			return nb;
		}
		return readtcpcli(vrscon_cli->tcp, buff, n, msg);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa8030
cmpl $0x0, %eax
jne 0xa0765
movl $0x0, -0x4(%rbp)
jmp 0xa0860
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jle 0xa0842
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x1c(%rbp), %eax
jg 0xa078b
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0xa0791
movl -0x1c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x208, %rsi            # imm = 0x208
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rax
addq %rax, %rsi
movslq -0x2c(%rbp), %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movslq -0x2c(%rbp), %rdx
callq 0x9610
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
subl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
addq $0x208, %rax            # imm = 0x208
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $0x208, %rax            # imm = 0x208
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0xa083a
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb (%rax), %cl
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movb %cl, (%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa0801
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa0860
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x9fdc0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::readvrsconsvr(bamboo::vrscon_svr_t*, unsigned char*, int, char*)
static int readvrsconsvr(vrscon_svr_t* vrscon_svr, unsigned char* buff, int n, char* msg) {
		int i, nr, err;
		waitvrsconsvr(vrscon_svr, msg);
		for (i = 0; i < MAXCLI; i++) {
			if (!vrscon_svr->con[i].state) continue;
			nr = recv_nb(vrscon_svr->tcp->cli[i].sock, buff, n);
			if (nr < 0) {
				if ((err = errsock())) {
					tracet(1, "readntripc: recv error i=%d sock=%d err=%d\n", i,
						vrscon_svr->tcp->cli[i].sock, err);
				}
				discon_vrsconsvr(vrscon_svr, i);
			}
			else if (nr > 0) {
				vrscon_svr->tcp->cli[i].tact = tickget();
				return nr;
			}
		}
		return 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa8190
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp)     # imm = 0x100
jge 0xa09aa
movq -0x10(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movslq -0x2c(%rbp), %rcx
imulq $0x408, %rcx, %rcx      # imm = 0x408
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0xa08ca
jmp 0xa099c
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %edi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xa4ca0
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0xa095e
callq 0xa43f0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0xa0950
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %edi
leaq 0x290a6(%rip), %rsi     # 0xc99ef
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xa8390
jmp 0xa099a
cmpl $0x0, -0x30(%rbp)
jle 0xa0998
callq 0x8f860
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rdx
imulq $0x128, %rdx, %rdx      # imm = 0x128
addq %rdx, %rax
movl %ecx, 0x120(%rax)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa09b1
jmp 0xa099a
jmp 0xa099c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa089b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::writeserial(bamboo::serial_t*, unsigned char*, int, char*)
static int writeserial(serial_t *serial, unsigned char *buff, int n, char *msg)
	{
		int ns;

		tracet(3, "writeserial: dev=%d n=%d\n", serial->dev, n);

		if (!serial) return 0;
#ifdef WIN32
		if ((ns = writeseribuff(serial, buff, n)) < n) serial->error = 1;
#else
		if (write(serial->dev, buff, n) < 0) {
			serial->error = 1;
			ns = 0;
		}
#endif
		tracet(5, "writeserial: exit dev=%d ns=%d\n", serial->dev, ns);
		return ns;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edx
movl -0x1c(%rbp), %ecx
movl $0x3, %edi
leaq 0x292b8(%rip), %rsi     # 0xc9f24
movb $0x0, %al
callq 0x95890
cmpq $0x0, -0x10(%rbp)
jne 0xa0c83
movl $0x0, -0x4(%rbp)
jmp 0xa0cd0
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x9260
cmpq $0x0, %rax
jge 0xa0cae
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edx
movl -0x2c(%rbp), %ecx
movl $0x5, %edi
leaq 0x2927b(%rip), %rsi     # 0xc9f3e
movb $0x0, %al
callq 0x95890
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edx
movl -0x1c(%rbp), %ecx
movl $0x4, %edi
leaq 0x28ec8(%rip), %rsi     # 0xc9feb
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa4c10
cmpl $0x0, %eax
jne 0xa1148
movl $0x0, -0x4(%rbp)
jmp 0xa1270
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp)     # imm = 0x100
jge 0xa126a
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
cmpl $0x2, (%rax)
je 0xa117e
jmp 0xa125c
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %edi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xa76b0
movl %eax, -0x30(%rbp)
cmpl $-0x1, %eax
jne 0xa122f
callq 0xa43f0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0xa11f5
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %edi
leaq 0x28e19(%rip), %rsi     # 0xca007
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
movslq -0x2c(%rbp), %rax
imulq $0x128, %rax, %rax      # imm = 0x128
addq %rax, %rdi
movl 0x5885c(%rip), %esi     # 0xf9a70
callq 0xa4dd0
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa4e40
movl $0x0, -0x4(%rbp)
jmp 0xa1270
cmpl $0x0, -0x30(%rbp)
jle 0xa125a
callq 0x8f860
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rdx
imulq $0x128, %rdx, %rdx      # imm = 0x128
addq %rdx, %rax
movl %ecx, 0x120(%rax)
jmp 0xa125c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa114f
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movl -0x1c(%rbp), %r8d
movl $0x3, %edi
leaq 0x28d7d(%rip), %rsi     # 0xca034
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa5340
cmpl $0x0, %eax
jne 0xa12dc
movl $0x0, -0x4(%rbp)
jmp 0xa13a9
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xa76b0
movl %eax, -0x2c(%rbp)
cmpl $-0x1, %eax
jne 0xa136c
callq 0xa43f0
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
je 0xa133e
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movl -0x30(%rbp), %ecx
movl $0x1, %edi
leaq 0x28d38(%rip), %rsi     # 0xca058
movb $0x0, %al
callq 0x95890
movq -0x28(%rbp), %rdi
movl -0x30(%rbp), %edx
leaq 0x28d48(%rip), %rsi     # 0xca07d
movb $0x0, %al
callq 0x9150
jmp 0xa1350
movq -0x28(%rbp), %rdi
leaq 0x28206(%rip), %rsi     # 0xc954f
movb $0x0, %al
callq 0x9150
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x12c(%rax), %esi
callq 0xa4dd0
movl $0x0, -0x4(%rbp)
jmp 0xa13a9
cmpl $0x0, -0x2c(%rbp)
jle 0xa1383
callq 0x8f860
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x120(%rax)
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movl -0x2c(%rbp), %ecx
movl $0x5, %edi
leaq 0x28cf1(%rip), %rsi     # 0xca08d
movb $0x0, %al
callq 0x95890
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::writemembuf(bamboo::membuf_t*, unsigned char*, int, char*)
static int writemembuf(membuf_t *membuf, unsigned char *buff, int n, char *msg)
	{
		int i;

		tracet(3, "writemembuf: n=%d\n", n);

		if (!membuf) return 0;

		lock(&membuf->lock);

		for (i = 0; i < n; i++) {
			membuf->buf[membuf->wp++] = buff[i];
			if (membuf->wp >= membuf->bufsize) membuf->wp = 0;
			if (membuf->wp == membuf->rp) {
				strcpy(msg, "mem-buffer overflow");
				membuf->state = -1;
				unlock(&membuf->lock);
				return i + 1;
			}
		}
		unlock(&membuf->lock);
		return i;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl -0x1c(%rbp), %edx
movl $0x3, %edi
leaq 0x28a85(%rip), %rsi     # 0xca11b
movb $0x0, %al
callq 0x95890
cmpq $0x0, -0x10(%rbp)
jne 0xa16b0
movl $0x0, -0x4(%rbp)
jmp 0xa1778
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x9ad0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xa1765
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x4(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x4(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0xa1713
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0xa1755
movq -0x28(%rbp), %rdi
leaq 0x28a00(%rip), %rsi     # 0xca12e
callq 0x96f0
movq -0x10(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x95a0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa1778
jmp 0xa1757
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa16c4
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x95a0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::writevrsconsvr(bamboo::vrscon_svr_t*, unsigned char*, int, char*)
static int writevrsconsvr(vrscon_svr_t* vrscon_svr, unsigned char* buff, int n, char* msg) {
		int i, ns = 0, err,nsd;
		waitvrsconsvr(vrscon_svr, msg);
		for (i = 0; i < MAXCLI; i++) {
			if (!vrscon_svr->con[i].state) continue;
			nsd = 0;
			while(nsd < n){
				if((ns = send_block(vrscon_svr->tcp->cli[i].sock, buff + nsd, n - nsd)) == -1){
					if ((err = errsock())) {
						tracet(1, "writentripc: send error i=%d sock=%d err=%d\n", i,
							vrscon_svr->tcp->cli[i].sock, err);
					}
					discon_vrsconsvr(vrscon_svr, i);
					return 0;
				}
				else {
					vrscon_svr->tcp->cli[i].tact = tickget();
				}
				nsd = nsd + ns;
			}
		}
		return ns;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xa8190
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp)     # imm = 0x100
jge 0xa1952
movq -0x10(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movslq -0x2c(%rbp), %rcx
imulq $0x408, %rcx, %rcx      # imm = 0x408
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0xa1851
jmp 0xa1944
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xa1942
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x38(%rbp), %rax
addq %rax, %rsi
movl -0x1c(%rbp), %edx
subl -0x38(%rbp), %edx
callq 0xa8630
movl %eax, -0x30(%rbp)
cmpl $-0x1, %eax
jne 0xa1908
callq 0xa43f0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0xa18f3
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
movl 0x118(%rax), %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %edi
leaq 0x287e7(%rip), %rsi     # 0xca0d3
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xa8390
movl $0x0, -0x4(%rbp)
jmp 0xa1958
callq 0x8f860
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x2c(%rbp), %rdx
imulq $0x128, %rdx, %rdx      # imm = 0x128
addq %rdx, %rax
movl %ecx, 0x120(%rax)
movl -0x38(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0xa1858
jmp 0xa1944
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa1822
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xa199d
movq -0x10(%rbp), %rax
cmpl $0xa, (%rax)
je 0xa19a6
movq -0x10(%rbp), %rax
cmpl $0xb, (%rax)
je 0xa19a6
movl $0x0, -0x4(%rbp)
jmp 0xa19d4
movq -0x10(%rbp), %rdi
callq 0x9ef00
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0x96f0
movq -0x10(%rbp), %rdi
callq 0x9f2f0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xa1a14
movq -0x10(%rbp), %rax
cmpl $0xa, (%rax)
je 0xa1a1d
movq -0x10(%rbp), %rax
cmpl $0xb, (%rax)
je 0xa1a1d
movl $0x0, -0x4(%rbp)
jmp 0xa1a4b
movq -0x10(%rbp), %rdi
callq 0x9ef00
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
addq $0x8, %rsi
callq 0x96f0
movq -0x10(%rbp), %rdi
callq 0x9f2f0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xa1a8d
movq -0x10(%rbp), %rax
cmpl $0xa, (%rax)
je 0xa1a96
movq -0x10(%rbp), %rax
cmpl $0xb, (%rax)
je 0xa1a96
movl $0x0, -0x4(%rbp)
jmp 0xa1ac3
movq -0x10(%rbp), %rdi
callq 0x9ef00
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x820f40(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x9f2f0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xa1afc
movq -0x10(%rbp), %rax
cmpl $0xa, (%rax)
je 0xa1b05
movq -0x10(%rbp), %rax
cmpl $0xb, (%rax)
je 0xa1b05
movl $0x0, -0x4(%rbp)
jmp 0xa1b2f
movq -0x10(%rbp), %rdi
callq 0x9ef00
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl %ecx, 0x820f40(%rax)
movq -0x10(%rbp), %rdi
callq 0x9f2f0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::statexserial(bamboo::serial_t*, char*)
static int statexserial(serial_t *serial, char *msg)
	{
		char *p = msg;
		int state = !serial ? 0 : (serial->error ? -1 : 2);

		p += sprintf(p, "serial:\n");
		p += sprintf(p, "  state   = %d\n", state);
		if (!state) return 0;
		p += sprintf(p, "  dev     = %d\n", (int)serial->dev);
		p += sprintf(p, "  error   = %d\n", serial->error);
#ifdef WIN32
		p += sprintf(p, "  buffsize= %d\n", serial->buffsize);
		p += sprintf(p, "  wp      = %d\n", serial->wp);
		p += sprintf(p, "  rp      = %d\n", serial->rp);
#endif
		return state;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa2126
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0xa2140
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
movl $0x2, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x27ff1(%rip), %rsi     # 0xca142
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x27fd5(%rip), %rsi     # 0xca14b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xa219c
movl $0x0, -0x4(%rbp)
jmp 0xa21f3
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0x27fae(%rip), %rsi     # 0xca15b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x27f95(%rip), %rsi     # 0xca16b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::statextcpsvr(bamboo::tcpsvr_tag*, char*)
static int statextcpsvr(tcpsvr_t *tcpsvr, char *msg)
	{
		char *p = msg;
		int i, state = tcpsvr ? tcpsvr->svr.state : 0;

		p += sprintf(p, "tcpsvr:\n");
		p += sprintf(p, "  state   = %d\n", state);
		if (!state) return 0;
		p += sprintf(p, "  svr:\n");
		p += statextcp(&tcpsvr->svr, p);
		for (i = 0; i < MAXCLI; i++) {
			if (!tcpsvr->cli[i].state) continue;
			p += sprintf(p, "  cli#%d:\n", i);
			p += statextcp(tcpsvr->cli + i, p);
		}
		return state;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa256a
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0xa2571
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa2571
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x26d5b(%rip), %rsi     # 0xc92dd
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %edx
leaq 0x27ba4(%rip), %rsi     # 0xca14b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0xa25d0
movl $0x0, -0x4(%rbp)
jmp 0xa26ad
movq -0x20(%rbp), %rdi
leaq 0x27c7d(%rip), %rsi     # 0xca258
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa8680
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x100, -0x24(%rbp)     # imm = 0x100
jge 0xa26a7
movq -0x10(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x24(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0xa2642
jmp 0xa2699
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x27c10(%rip), %rsi     # 0xca260
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
movslq -0x24(%rbp), %rax
imulq $0x128, %rax, %rax      # imm = 0x128
addq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0xa8680
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa2616
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::statexudpsvr(bamboo::udp_t*, char*)
static int statexudpsvr(udp_t *udpsvr, char *msg)
	{
		char *p = msg;
		int state = udpsvr ? udpsvr->state : 0;

		p += sprintf(p, "udpsvr:\n");
		p += sprintf(p, "  state   = %d\n", state);
		if (!state) return 0;
		p += sprintf(p, "  type    = %d\n", udpsvr->type);
		p += sprintf(p, "  sock    = %d\n", (int)udpsvr->sock);
		p += sprintf(p, "  port    = %d\n", udpsvr->port);
		return state;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa2c7a
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0xa2c81
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0xa2c81
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x276b9(%rip), %rsi     # 0xca34b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x27494(%rip), %rsi     # 0xca14b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xa2ce0
movl $0x0, -0x4(%rbp)
jmp 0xa2d64
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x275b9(%rip), %rsi     # 0xca2ab
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %edx
leaq 0x27636(%rip), %rsi     # 0xca354
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x2761d(%rip), %rsi     # 0xca364
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::statexudpcli(bamboo::udp_t*, char*)
static int statexudpcli(udp_t *udpcli, char *msg)
	{
		char *p = msg;
		int state = udpcli ? udpcli->state : 0;

		p += sprintf(p, "udpsvr:\n");
		p += sprintf(p, "  state   = %d\n", state);
		if (!state) return 0;
		p += sprintf(p, "  type    = %d\n", udpcli->type);
		p += sprintf(p, "  sock    = %d\n", (int)udpcli->sock);
		p += sprintf(p, "  addr    = %s\n", udpcli->saddr);
		p += sprintf(p, "  port    = %d\n", udpcli->port);
		return state;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa2d9a
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0xa2da1
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0xa2da1
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x27599(%rip), %rsi     # 0xca34b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x27374(%rip), %rsi     # 0xca14b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xa2e00
movl $0x0, -0x4(%rbp)
jmp 0xa2eae
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x27499(%rip), %rsi     # 0xca2ab
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %edx
leaq 0x27516(%rip), %rsi     # 0xca354
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0xc, %rdx
leaq 0x2750c(%rip), %rsi     # 0xca374
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x274d3(%rip), %rsi     # 0xca364
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::statexmembuf(bamboo::membuf_t*, char*)
static int statexmembuf(membuf_t *membuf, char *msg)
	{
		char *p = msg;
		int state = !membuf ? 0 : membuf->state;

		p += sprintf(p, "membuf:\n");
		p += sprintf(p, "  state   = %d\n", state);
		if (!state) return 0;
		p += sprintf(p, "  buffsize= %d\n", membuf->bufsize);
		p += sprintf(p, "  wp      = %d\n", membuf->wp);
		p += sprintf(p, "  rp      = %d\n", membuf->rp);
		return state;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa2ee6
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0xa2eef
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x27484(%rip), %rsi     # 0xca384
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x27226(%rip), %rsi     # 0xca14b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xa2f4e
movl $0x0, -0x4(%rbp)
jmp 0xa2fcf
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
leaq 0x2742d(%rip), %rsi     # 0xca38d
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x27414(%rip), %rsi     # 0xca39d
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x273fb(%rip), %rsi     # 0xca3ad
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%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/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x4, %edi
leaq 0x25b83(%rip), %rsi     # 0xc8beb
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rdi
callq 0x9ef00
cmpq $0x0, -0x10(%rbp)
je 0xa308c
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x18(%rbp)
je 0xa30a0
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0xa30b4
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0xa30c8
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x9f2f0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)