LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::updatetcpsvr(bamboo::tcpsvr_tag*, char*)
static void updatetcpsvr(tcpsvr_t *tcpsvr, char *msg)
	{
		char saddr[256] = "";
		int i, n = 0;

		tracet(4, "updatetcpsvr: state=%d\n", tcpsvr->svr.state);

		if (tcpsvr->svr.state == 0) return;

		for (i = 0; i < MAXCLI; i++) {
			if (!tcpsvr->cli[i].state) continue;
			strcpy(saddr, tcpsvr->cli[i].saddr);
			n++;
		}
		if (n == 0) {
			tcpsvr->svr.state = 1;
			sprintf(msg, "waiting...");
			return;
		}
		tcpsvr->svr.state = 2;
		if (n == 1) sprintf(msg, "%s", saddr); else sprintf(msg, "%d clients", n);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x130(%rbp), %rdi
xorl %r14d, %r14d
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8390
movl (%r15), %edx
leaq 0x18bf8(%rip), %rsi     # 0x6c742
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x4acf2
cmpl $0x0, (%r15)
je 0x53bf4
movq %rbx, -0x30(%rbp)
leaq 0x12c(%r15), %r13
leaq -0x130(%rbp), %r12
xorl %ebx, %ebx
cmpq $0x12800, %rbx          # imm = 0x12800
je 0x53b9e
cmpl $0x0, 0x128(%r15,%rbx)
je 0x53b95
leaq (%rbx,%r13), %rsi
movq %r12, %rdi
callq 0x85c0
incl %r14d
addq $0x128, %rbx            # imm = 0x128
jmp 0x53b72
testl %r14d, %r14d
je 0x53bc2
movl $0x2, (%r15)
cmpl $0x1, %r14d
movq -0x30(%rbp), %rdi
jne 0x53be3
leaq -0x130(%rbp), %rsi
callq 0x85c0
jmp 0x53bf4
movl $0x1, (%r15)
movabsq $0x2e676e6974696177, %rax # imm = 0x2E676E6974696177
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
movl $0x2e2e2e, 0x7(%rcx)    # imm = 0x2E2E2E
jmp 0x53bf4
leaq 0x18b7b(%rip), %rsi     # 0x6c765
movl %r14d, %edx
xorl %eax, %eax
callq 0x8110
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::encbase64(char*, unsigned char const*, int)
static int encbase64(char *str, const unsigned char *byte, int n)
	{
		const char table[] =
			"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
		int i, j, k, b;

		tracet(4, "encbase64: n=%d\n", n);

		for (i = j = 0; i / 8 < n;) {
			for (k = b = 0; k < 6; k++, i++) {
				b <<= 1; if (i / 8 < n) b |= (byte[i / 8] >> (7 - i % 8)) & 0x1;
			}
			str[j++] = table[b];
		}
		while (j & 0x3) str[j++] = '=';
		str[j] = '\0';
		tracet(5, "encbase64: str=%s\n", str);
		return j;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
leaq 0x18487(%rip), %rsi     # 0x6ca42
xorl %ebx, %ebx
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x4acf2
pushq $0x8
popq %rsi
leaq 0x1906f(%rip), %rdi     # 0x6d640
xorl %ecx, %ecx
movl %ecx, %eax
cltd
idivl %esi
cmpl %r15d, %eax
jge 0x54635
xorl %r9d, %r9d
xorl %r8d, %r8d
cmpl $0x6, %r9d
je 0x5461b
leal (%rcx,%r9), %eax
cltd
idivl %esi
addl %r8d, %r8d
cmpl %r15d, %eax
jge 0x54616
cltq
movzbl (%r12,%rax), %eax
movb $0x7, %r10b
subb %dl, %r10b
movzbl %r10b, %edx
xorl %r10d, %r10d
btl %edx, %eax
setb %r10b
orl %r10d, %r8d
incl %r9d
jmp 0x545e3
addl $0x6, %ecx
movslq %r8d, %rax
movb (%rax,%rdi), %al
movb %al, (%r14,%rbx)
incq %rbx
jmp 0x545d3
movb $0x3d, (%r14,%rbx)
incq %rbx
testb $0x3, %bl
jne 0x5462d
movl %ebx, %eax
andl $-0x4, %eax
movb $0x0, (%r14,%rax)
leaq 0x18408(%rip), %rsi     # 0x6ca53
pushq $0x5
popq %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4acf2
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::discon_ntripc(bamboo::ntripc_t*, int)
static void discon_ntripc(ntripc_t *ntripc, int i)
	{
		tracet(3, "discon_ntripc: i=%d\n", i);

		discontcp(&ntripc->tcp->cli[i], ticonnect);
		ntripc->con[i].nb = 0;
		ntripc->con[i].buff[0] = '\0';
		ntripc->con[i].state = 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x18074(%rip), %rsi     # 0x6cf6b
pushq $0x3
popq %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x4acf2
movslq %ebx, %rbx
imulq $0x128, %rbx, %rdi      # imm = 0x128
addq 0x338(%r14), %rdi
addq $0x128, %rdi            # imm = 0x128
movl 0x32f8f(%rip), %esi     # 0x87eb0
callq 0x53ac3
imulq $0x820c, %rbx, %rax     # imm = 0x820C
andl $0x0, 0x544(%r14,%rax)
movb $0x0, 0x548(%r14,%rax)
andl $0x0, 0x340(%r14,%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::test_mntpnt(bamboo::ntripc_t*, char const*)
static int test_mntpnt(ntripc_t *ntripc, const char *mntpnt)
	{
		char *p, str[256];

		lock(&ntripc->lock_srctbl);

		if (!ntripc->srctbl) {
			unlock(&ntripc->lock_srctbl);
			return 1;
		}
		for (p = ntripc->srctbl; (p = strstr(p, "STR;")); p++) {
			if (sscanf(p, "STR;%255[^;]", str) && !strcmp(str, mntpnt)) break;
		}
		unlock(&ntripc->lock_srctbl);

		return p != NULL;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x310(%rdi), %r12
movq %r12, %rdi
callq 0x8900
movq 0x308(%rbx), %r15
testq %r15, %r15
je 0x54fe9
movq %r12, -0x30(%rbp)
leaq 0x17e5c(%rip), %r12     # 0x6cde9
leaq 0x17e5a(%rip), %r13     # 0x6cdee
leaq -0x130(%rbp), %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x8170
movq %rax, %r15
testq %rax, %rax
je 0x54fd6
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x8600
testl %eax, %eax
je 0x54fd1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8890
testl %eax, %eax
je 0x54fd6
incq %r15
jmp 0x54f9b
xorl %ebx, %ebx
testq %r15, %r15
setne %bl
movq -0x30(%rbp), %rdi
callq 0x84b0
jmp 0x54ff4
movq %r12, %rdi
callq 0x84b0
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::send_nb(int, unsigned char*, int)
static int send_nb(socket_t sock, unsigned char *buff, int n)
	{
		struct timeval tv = { 0 };
		fd_set ws;
		int ret, ns;

		FD_ZERO(&ws); FD_SET(sock, &ws);
		ret = select(sock + 1, NULL, &ws, NULL, &tv);
		if (ret <= 0) return ret;
		ns = send(sock, (char *)buff, n, 0);
		return ns < n ? -1 : ns;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %r15d
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x10, %rax
je 0x5503e
andq $0x0, -0xb0(%rbp,%rax,8)
incq %rax
jmp 0x5502a
pushq $0x40
popq %rcx
movl %r15d, %eax
cltd
idivl %ecx
movslq %eax, %rdx
shll $0x6, %eax
movl %r15d, %ecx
subl %eax, %ecx
pushq $0x1
popq %rax
shlq %cl, %rax
orq %rax, -0xb0(%rbp,%rdx,8)
leal 0x1(%r15), %edi
leaq -0xb0(%rbp), %rdx
leaq -0x30(%rbp), %r8
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x85e0
testl %eax, %eax
jle 0x5509b
movslq %r14d, %r14
movl %r15d, %edi
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x8330
movq %rax, %rcx
cmpl %r14d, %ecx
pushq $-0x1
popq %rax
cmovgel %ecx, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::nextdltime(int const*, int)
static gtime_t nextdltime(const int *topts, int stat)
	{
		gtime_t time;
		double tow;
		int week, tint;

		tracet(3, "nextdltime: topts=%d %d %d %d stat=%d\n", topts[0], topts[1],
			topts[2], topts[3], stat);

		/* current time (gpst) */
		time = utc2gpst(timeget());
		tow = time2gpst(time, &week);

		/* next retry time */
		if (stat == 0 && topts[3] > 0) {
			tow = (floor((tow - topts[2]) / topts[3]) + 1.0)*topts[3] + topts[2];
			return gpst2time(week, tow);
		}
		/* next interval time */
		tint = topts[1] <= 0 ? 3600 : topts[1];
		tow = (floor((tow - topts[2]) / tint) + 1.0)*tint + topts[2];
		time = gpst2time(week, tow);

		return time;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movl (%rdi), %edx
movl 0x4(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0xc(%rdi), %r9d
movl %esi, (%rsp)
leaq 0x17c35(%rip), %rsi     # 0x6d162
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x4acf2
callq 0x47349
movq %rax, %rdi
callq 0x477da
leaq -0x14(%rbp), %rsi
movq %rax, %rdi
callq 0x470f1
testl %r14d, %r14d
je 0x5557f
movl 0x4(%rbx), %eax
testl %eax, %eax
jle 0x55562
cvtsi2sd %eax, %xmm1
jmp 0x5556a
movsd 0xb346(%rip), %xmm1     # 0x608b0
movsd %xmm1, -0x20(%rbp)
cvtsi2sdl 0x8(%rbx), %xmm2
movsd %xmm2, -0x28(%rbp)
subsd %xmm2, %xmm0
jmp 0x5559d
movl 0xc(%rbx), %eax
testl %eax, %eax
jle 0x55555
cvtsi2sdl 0x8(%rbx), %xmm1
movsd %xmm1, -0x28(%rbp)
subsd %xmm1, %xmm0
cvtsi2sd %eax, %xmm1
movsd %xmm1, -0x20(%rbp)
divsd %xmm1, %xmm0
callq 0x8ac0
addsd 0xa372(%rip), %xmm0     # 0x5f920
mulsd -0x20(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movl -0x14(%rbp), %edi
callq 0x4708a
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::waitvrsconcli(bamboo::vrscon_cli_t*, char*)
static int waitvrsconcli(vrscon_cli_t* vrscon_cli, char* msg) {
		int n;
		char *p;
		if (vrscon_cli->state < 0) return 0;
		if (vrscon_cli->tcp->svr.state < 2) vrscon_cli->state = 0; /* tcp disconnected */
		if (vrscon_cli->state == 0) { /* send request */
			if (!reqvrscon_c(vrscon_cli, msg)) return 0;
		}
		if (vrscon_cli->state == 1) { /* read response */
			p = (char*)vrscon_cli->buff + vrscon_cli->nb;
			if ((n = readtcpcli(vrscon_cli->tcp, (unsigned char *)p, sizeof(vrscon_cli->buff) - vrscon_cli->nb - 1, msg)) == 0) {
				tracet(5, "waitntrip: readtcp n=%d\n", n);
				return 0;
			}
			vrscon_cli->nb += n; vrscon_cli->buff[vrscon_cli->nb] = '\0';
			return rspvrscon_c(vrscon_cli,msg);
		}
		return 1;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl (%rdi), %eax
xorl %ebx, %ebx
testl %eax, %eax
js 0x5562f
movq %rdi, %r14
movq 0x608(%rdi), %rdi
cmpl $0x1, (%rdi)
jg 0x555ed
andl $0x0, (%r14)
jmp 0x5562c
cmpl $0x1, %eax
jne 0x5562c
movq %rsi, %rcx
movslq 0x4(%r14), %rax
leaq (%r14,%rax), %rsi
addq $0x208, %rsi            # imm = 0x208
movl $0x3ff, %edx            # imm = 0x3FF
subl %eax, %edx
callq 0x50d8f
testl %eax, %eax
je 0x55636
movslq 0x4(%r14), %rcx
cltq
addq %rcx, %rax
movl %eax, 0x4(%r14)
movb $0x0, 0x208(%r14,%rax)
jmp 0x5562f
pushq $0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x17295(%rip), %rsi     # 0x6c8d2
xorl %ebx, %ebx
pushq $0x5
popq %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4acf2
jmp 0x5562f
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::waitvrsconsvr(bamboo::vrscon_svr_t*, char*)
static void waitvrsconsvr(vrscon_svr_t* vrscon_svr, char* msg) {
		/* wait for authentication */
		unsigned char *buff;
		int i, n, nmax, err;
		tracet(4, "wait_ntripc\n");
		vrscon_svr->state = vrscon_svr->tcp->svr.state;
		if (!waittcpsvr(vrscon_svr->tcp, msg)) return;
		for (i = 0; i < MAXCLI; i++) {
			if (vrscon_svr->tcp->cli[i].state != 2 || vrscon_svr->con[i].state) continue;
			/* receive ntrip-caster request */
			buff = vrscon_svr->con[i].buff + vrscon_svr->con[i].nb;
			nmax = sizeof(vrscon_svr->con[i].buff) - vrscon_svr->con[i].nb - 1;

			if ((n = recv_nb(vrscon_svr->tcp->cli[i].sock, buff, nmax)) == -1) {
				if ((err = errsock())) {
					tracet(1, "accept_ntripc: recv error sock=%d err=%d\n",
						vrscon_svr->tcp->cli[i].sock, err);
				}
				discon_vrsconsvr(vrscon_svr, i);
				continue;
			}
			if (n <= 0) continue;

			/* test ntrip-caster request */
			vrscon_svr->con[i].nb += n;
			rsp_vrscon_s(vrscon_svr,i);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x17618(%rip), %rsi     # 0x6cc80
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x4acf2
movq 0x608(%rbx), %rdi
movl (%rdi), %eax
movl %eax, (%rbx)
movq %r14, %rsi
callq 0x53819
testl %eax, %eax
je 0x55739
leaq 0x618(%rbx), %r13
pushq $0x1
popq %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
cmpq $0x100, %r12            # imm = 0x100
je 0x55739
movq 0x608(%rbx), %rax
cmpl $0x2, 0x128(%rax,%r14)
jne 0x556c4
cmpl $0x0, -0x8(%r13)
je 0x556d7
incq %r12
addq $0x408, %r13            # imm = 0x408
addq $0x128, %r14            # imm = 0x128
jmp 0x5569e
movslq -0x4(%r13), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
subl %esi, %edx
addq %r13, %rsi
movl 0x240(%rax,%r14), %edi
callq 0x53a26
cmpl $-0x1, %eax
je 0x55701
testl %eax, %eax
jle 0x556c4
addl %eax, -0x4(%r13)
jmp 0x556c4
callq 0x533ff
testl %eax, %eax
je 0x5572c
movq 0x608(%rbx), %rcx
movl 0x240(%rcx,%r14), %edx
movl %r15d, %edi
leaq 0x1756a(%rip), %rsi     # 0x6cc8d
movl %eax, %ecx
xorl %eax, %eax
callq 0x4acf2
movq %rbx, %rdi
movl %r12d, %esi
callq 0x55748
jmp 0x556c4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::discon_vrsconsvr(bamboo::vrscon_svr_t*, int)
static void discon_vrsconsvr(vrscon_svr_t* vrscon_svr, int i) {
		discontcp(&vrscon_svr->tcp->cli[i], ticonnect);
		vrscon_svr->con[i].nb = 0;
		vrscon_svr->con[i].buff[0] = '\0';
		vrscon_svr->con[i].state = 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq %esi, %r14
imulq $0x128, %r14, %rdi      # imm = 0x128
addq 0x608(%rbx), %rdi
addq $0x128, %rdi            # imm = 0x128
movl 0x32740(%rip), %esi     # 0x87eb0
callq 0x53ac3
imulq $0x408, %r14, %rax      # imm = 0x408
movb $0x0, 0x618(%rbx,%rax)
andq $0x0, 0x610(%rbx,%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::statextcp(bamboo::tcp_t*, char*)
static int statextcp(tcp_t *tcp, char *msg)
	{
		char *p = msg;

		p += sprintf(p, "    state = %d\n", tcp->state);
		p += sprintf(p, "    saddr = %s\n", tcp->saddr);
		p += sprintf(p, "    port  = %d\n", tcp->port);
		p += sprintf(p, "    sock  = %d\n", (int)tcp->sock);
#if 0
		p += sprintf(p, "    tcon  = %d\n", tcp->tcon);
		p += sprintf(p, "    tact  = %u\n", tcp->tact);
		p += sprintf(p, "    tdis  = %u\n", tcp->tdis);
#endif
		return (int)(p - msg);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %edx
leaq 0x17d1c(%rip), %rsi     # 0x6d4c8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r15
addq %rbx, %r15
leaq 0x4(%r14), %rdx
leaq 0x17d11(%rip), %rsi     # 0x6d4d8
movq %r15, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r12
addq %r15, %r12
movl 0x104(%r14), %edx
leaq 0x17d03(%rip), %rsi     # 0x6d4e8
movq %r12, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r15
addq %r12, %r15
movl 0x118(%r14), %edx
leaq 0x17cf5(%rip), %rsi     # 0x6d4f8
movq %r15, %rdi
xorl %eax, %eax
callq 0x8110
addl %r15d, %eax
subl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/ublox.cpp
// Function: bamboo::input_ubx(bamboo::raw_t*, unsigned char)
extern int input_ubx(raw_t *raw, unsigned char data)
{
    trace(5,"input_ubx: data=%02x\n",data);
    
    /* synchronize frame */
    if (raw->nbyte==0) {
        if (!sync_ubx(raw->buff,data)) return 0;
        raw->nbyte=2;
        return 0;
    }
    raw->buff[raw->nbyte++]=data;
    
    if (raw->nbyte==6) {
        if ((raw->len=U2(raw->buff+4)+8)>MAXRAWLEN) {
            trace(2,"ubx length error: len=%d\n",raw->len);
            raw->nbyte=0;
            return -1;
        }
    }
    if (raw->nbyte<6||raw->nbyte<raw->len) return 0;
    raw->nbyte=0;
    
    /* decode ublox raw message */
    return decode_ubx(raw);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x191a9(%rip), %rsi     # 0x6e9dc
xorl %r14d, %r14d
pushq $0x5
popq %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x455bc
movslq 0x81a74(%rbx), %rax
testq %rax, %rax
je 0x558a1
leal 0x1(%rax), %ecx
movl %ecx, 0x81a74(%rbx)
movb %r15b, 0x81a90(%rbx,%rax)
movl 0x81a74(%rbx), %eax
cmpl $0x6, %eax
jne 0x558cb
movzwl 0x81a94(%rbx), %ecx
leal 0x8(%rcx), %edx
movl %edx, 0x81a78(%rbx)
cmpl $0xff9, %ecx            # imm = 0xFF9
jb 0x558d3
leaq 0x19168(%rip), %rsi     # 0x6e9f2
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x455bc
andl $0x0, 0x81a74(%rbx)
pushq $-0x1
popq %r14
jmp 0x558da
movb 0x81a91(%rbx), %al
movb %al, 0x81a90(%rbx)
movb %r15b, 0x81a91(%rbx)
xorb $-0x4b, %al
xorb $0x62, %r15b
orb %al, %r15b
jne 0x558da
movl $0x2, 0x81a74(%rbx)
jmp 0x558da
jl 0x558d7
movl 0x81a78(%rbx), %edx
cmpl %edx, %eax
jge 0x558e8
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
andl $0x0, 0x81a74(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x558fe
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/ublox.cpp
// Function: bamboo::input_ubxf(bamboo::raw_t*, _IO_FILE*)
extern int input_ubxf(raw_t *raw, FILE *fp)
{
    int i,data;
    
    trace(4,"input_ubxf:\n");
    
    /* synchronize frame */
    if (raw->nbyte==0) {
        for (i=0;;i++) {
            if ((data=fgetc(fp))==EOF) return -2;
            if (sync_ubx(raw->buff,(unsigned char)data)) break;
            if (i>=4096) return 0;
        }
    }
    if (fread(raw->buff+2,1,4,fp)<4) return -2;
    raw->nbyte=6;
    
    if ((raw->len=U2(raw->buff+4)+8)>MAXRAWLEN) {
        trace(2,"ubx length error: len=%d\n",raw->len);
        raw->nbyte=0;
        return -1;
    }
    if (fread(raw->buff+6,1,raw->len-6,fp)<(size_t)(raw->len-6)) return -2;
    raw->nbyte=0;
    
    /* decode ubx raw message */
    return decode_ubx(raw);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x173a4(%rip), %rsi     # 0x6ea0c
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x455bc
cmpl $0x0, 0x81a74(%rbx)
pushq $-0x2
popq %r14
je 0x576e0
leaq 0x81a92(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
movq %r15, %rcx
callq 0x8920
cmpq $0x4, %rax
jb 0x57742
movl $0x6, 0x81a74(%rbx)
movzwl 0x81a94(%rbx), %edx
leal 0x8(%rdx), %eax
movl %eax, 0x81a78(%rbx)
cmpl $0xff9, %edx            # imm = 0xFF9
jb 0x5771c
leaq 0x1732b(%rip), %rsi     # 0x6e9f2
pushq $0x2
popq %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x455bc
andl $0x0, 0x81a74(%rbx)
pushq $-0x1
popq %r14
jmp 0x57742
movl $0x1001, %r12d          # imm = 0x1001
movq %r15, %rdi
callq 0x89b0
cmpl $-0x1, %eax
je 0x57742
movb 0x81a91(%rbx), %cl
movb %cl, 0x81a90(%rbx)
movb %al, 0x81a91(%rbx)
xorb $-0x4b, %cl
xorb $0x62, %al
orb %cl, %al
je 0x5767f
decl %r12d
jne 0x576e6
xorl %r14d, %r14d
jmp 0x57742
leaq 0x81a96(%rbx), %rdi
addq $0x2, %rdx
pushq $0x1
popq %rsi
movq %r15, %rcx
callq 0x8920
movslq 0x81a78(%rbx), %rcx
addq $-0x6, %rcx
cmpq %rcx, %rax
jae 0x5774e
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
andl $0x0, 0x81a74(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x558fe
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/ublox.cpp
// Function: bamboo::sbsdecodemsg(bamboo::gtime_t, int, unsigned int const*, bamboo::sbsmsg_t*)
extern int sbsdecodemsg(gtime_t time, int prn, const unsigned int *words,
                        sbsmsg_t *sbsmsg)
{
    int i,j;
    unsigned char f[29];
    double tow;

    trace(5,"sbsdecodemsg: prn=%d\n",prn);

    if (time.time==0) return 0;
    tow=time2gpst(time,&sbsmsg->week);
    sbsmsg->tow=(int)(tow+DTTOL);
    sbsmsg->prn=prn;
    for (i=0;i<7;i++) for (j=0;j<4;j++) {
        sbsmsg->msg[i*4+j]=(unsigned char)(words[i]>>((3-j)*8));
    }
    sbsmsg->msg[28]=(unsigned char)(words[7]>>18)&0xC0;
    for (i=28;i>0;i--) f[i]=(sbsmsg->msg[i]>>6)+(sbsmsg->msg[i-1]<<2);
    f[0]=sbsmsg->msg[0]>>6;

    return rtk_crc24q(f,29)==(words[7]&0xFFFFFF); /* check crc */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %r15d
movsd %xmm0, -0x30(%rbp)
movq %rdi, %r13
leaq 0x170e6(%rip), %rsi     # 0x6eae1
xorl %r12d, %r12d
pushq $0x5
popq %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x455bc
testq %r13, %r13
je 0x57acd
movq %r13, %rdi
movsd -0x30(%rbp), %xmm0
movq %r14, %rsi
callq 0x470f1
addsd 0x13274(%rip), %xmm0    # 0x6aca0
cvttsd2si %xmm0, %eax
movl %eax, 0x4(%r14)
movl %r15d, 0x8(%r14)
leaq 0xc(%r14), %rax
xorl %edx, %edx
pushq $0x18
popq %rsi
movq %rax, %rdi
cmpq $0x7, %rdx
je 0x57a71
movl %esi, %ecx
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x57a68
movl (%rbx,%rdx,4), %r9d
shrl %cl, %r9d
movb %r9b, (%rdi,%r8)
incq %r8
addl $-0x8, %ecx
jmp 0x57a4f
incq %rdx
addq $0x4, %rdi
jmp 0x57a44
movl 0x1c(%rbx), %ecx
shrl $0x12, %ecx
andb $-0x40, %cl
movb %cl, 0x28(%r14)
pushq $0x1c
popq %rcx
movq %rcx, %rdx
subq $0x1, %rdx
jb 0x57aa9
movb 0xb(%r14,%rcx), %sil
movb 0xc(%r14,%rcx), %dil
shrb $0x6, %dil
shlb $0x2, %sil
orb %dil, %sil
movb %sil, -0x50(%rbp,%rcx)
movq %rdx, %rcx
jmp 0x57a84
movb (%rax), %al
shrb $0x6, %al
leaq -0x50(%rbp), %rdi
movb %al, (%rdi)
pushq $0x1d
popq %rsi
callq 0x45b4d
movl $0xffffff, %ecx         # imm = 0xFFFFFF
andl 0x1c(%rbx), %ecx
xorl %r12d, %r12d
cmpl %ecx, %eax
sete %r12b
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/ublox.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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %r12
movl %edi, %r14d
leaq -0x150(%rbp), %r13
xorl %r15d, %r15d
movl $0x120, %edx            # imm = 0x120
movq %r13, %rdi
xorl %esi, %esi
callq 0x8390
leaq 0x13df2(%rip), %rsi     # 0x6b924
pushq $0x4
popq %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x455bc
leal -0x1(%r14), %eax
movslq %eax, %rbx
imulq $0x17c, %rbx, %rax      # imm = 0x17C
movq %r12, -0x30(%rbp)
addq %rax, %r12
addq $0x70f70, %r12          # imm = 0x70F70
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2f85e
cmpl $0x1, %eax
jne 0x57c42
leaq 0x1e(%r12), %rdi
xorl %r15d, %r15d
leaq -0x150(%rbp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2f85e
cmpl $0x2, %eax
jne 0x57c42
addq $0x3c, %r12
xorl %r15d, %r15d
leaq -0x150(%rbp), %rsi
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2f85e
cmpl $0x3, %eax
jne 0x57c42
movq -0x30(%rbp), %r12
leaq 0x82a90(%r12), %rdi
leaq 0xaaef(%rip), %rsi      # 0x626c7
callq 0x8170
testq %rax, %rax
je 0x57bec
movq 0x1d80(%r12), %rax
jmp 0x57c15
movl -0x14c(%rbp), %edx
movq 0x1d80(%r12), %rax
imulq $0x120, %rbx, %rcx      # imm = 0x120
cmpl 0x4(%rax,%rcx), %edx
jne 0x57c15
addq %rax, %rcx
movl -0x148(%rbp), %edx
cmpl 0x8(%rcx), %edx
je 0x57c42
leaq -0x150(%rbp), %rsi
movl %r14d, (%rsi)
imulq $0x120, %rbx, %rdi      # imm = 0x120
addq %rax, %rdi
movl $0x120, %edx            # imm = 0x120
callq 0x84f0
movq -0x30(%rbp), %rax
movl %r14d, 0x70e40(%rax)
pushq $0x2
popq %r15
movl %r15d, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/ublox.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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
xorl %esi, %esi
callq 0x45362
movl %eax, %r15d
leaq 0x13cc3(%rip), %rsi     # 0x6b93b
pushq $0x4
popq %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x455bc
cmpl $0x1, %r15d
je 0x57c9e
cmpl $0x10, %r15d
jne 0x57cf9
movl $0x1e30, %r15d          # imm = 0x1E30
movl $0x1f10, %ecx           # imm = 0x1F10
jmp 0x57ca9
movl $0x1dd0, %r15d          # imm = 0x1DD0
movl $0x1eb0, %ecx           # imm = 0x1EB0
decl %r14d
movslq %r14d, %rax
imulq $0x17c, %rax, %rax      # imm = 0x17C
leaq (%rbx,%rax), %rdi
addq $0x70fca, %rdi          # imm = 0x70FCA
movq 0x1da8(%rbx), %rdx
addq %rbx, %rcx
addq %rbx, %r15
leaq 0x1fd0(%rbx), %r9
xorl %esi, %esi
movq %r15, %r8
callq 0x2f85e
movq (%rbx), %rdi
movsd 0x8(%rbx), %xmm0
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57dda
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/ublox.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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
xorl %esi, %esi
callq 0x45362
movl %eax, %r15d
leaq 0x13c2d(%rip), %rsi     # 0x6b952
pushq $0x4
popq %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x455bc
cmpl $0x10, %r15d
je 0x57d7a
cmpl $0x1, %r15d
jne 0x57dcf
decl %r14d
movslq %r14d, %rax
imulq $0x17c, %rax, %rax      # imm = 0x17C
leaq (%rbx,%rax), %rdi
addq $0x70fe8, %rdi          # imm = 0x70FE8
movq 0x1da8(%rbx), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2f85e
decl %r14d
movslq %r14d, %rax
imulq $0x17c, %rax, %rax      # imm = 0x17C
leaq (%rbx,%rax), %rdi
addq $0x70fe8, %rdi          # imm = 0x70FE8
movq 0x1da8(%rbx), %rdx
leaq 0x1f10(%rbx), %rcx
leaq 0x1e30(%rbx), %r14
leaq 0x1fd0(%rbx), %r9
xorl %esi, %esi
movq %r14, %r8
callq 0x2f85e
movq (%rbx), %rdi
movsd 0x8(%rbx), %xmm0
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57dda
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/ublox.cpp
// Function: bamboo::decode_nav(bamboo::raw_t*, int, int)
static int decode_nav(raw_t *raw, int sat, int off)
{
    unsigned int words[10];
    int i,id;
    unsigned char *p=raw->buff+6+off;
    
    if (raw->len<48+off) {
        trace(2,"ubx rawsfrbx length error: sat=%d len=%d\n",sat,raw->len);
        return -1;
    }
    if ((U4(p)>>24)==PREAMB_CNAV) {
        trace(3,"ubx rawsfrbx cnav not supported sat=%d prn=%d\n",sat,
              (U4(p)>>18)&0x3F);
        return 0;
    }
    for (i=0;i<10;i++,p+=4) words[i]=U4(p)>>6; /* 24 bits without parity */
    
    id=(words[1]>>2)&7;
    if (id<1||5<id) {
        trace(2,"ubx rawsfrbx subfrm id error: sat=%2d id=%d len=%d\n",sat,id,
              raw->len);
        return -1;
    }
    for (i=0;i<10;i++) {
        setbitu(raw->subfrm[sat-1]+(id-1)*30,i*24,24,words[i]);
    }
    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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r9d
movl 0x81a78(%rdi), %r8d
leal 0x30(%rdx), %eax
cmpl %eax, %r8d
jge 0x57e9f
leaq 0x17006(%rip), %rsi     # 0x6ee8f
pushq $0x2
popq %rdi
movl %r9d, %edx
movl %r8d, %ecx
xorl %eax, %eax
callq 0x455bc
pushq $-0x1
popq %r12
jmp 0x57ed8
movq %rdi, %r14
movl %edx, %eax
movl 0x81a96(%rdi,%rax), %ecx
movl %ecx, %edx
andl $0xff000000, %edx       # imm = 0xFF000000
cmpl $0x8b000000, %edx       # imm = 0x8B000000
jne 0x57eea
shrl $0x12, %ecx
andl $0x3f, %ecx
leaq 0x16ff1(%rip), %rsi     # 0x6eeb9
xorl %r12d, %r12d
pushq $0x3
popq %rdi
movl %r9d, %edx
xorl %eax, %eax
callq 0x455bc
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %r14, %rax
addq $0x81a96, %rax          # imm = 0x81A96
xorl %ecx, %ecx
cmpq $0xa, %rcx
je 0x57f0a
movl (%rax,%rcx,4), %edx
shrl $0x6, %edx
movl %edx, -0x60(%rbp,%rcx,4)
incq %rcx
jmp 0x57ef5
movl -0x5c(%rbp), %ecx
shrl $0x2, %ecx
andl $0x7, %ecx
leal -0x6(%rcx), %eax
cmpl $-0x5, %eax
jae 0x57f34
leaq 0x16fc6(%rip), %rsi     # 0x6eee8
pushq $0x2
popq %rdi
movl %r9d, %edx
xorl %eax, %eax
callq 0x455bc
jmp 0x57e99
movq %r9, -0x30(%rbp)
leal -0x1(%r9), %eax
cltq
imulq $0x17c, %rax, %rax      # imm = 0x17C
addq %r14, %rax
movq %rcx, -0x38(%rbp)
imulq $0x1e, %rcx, %rcx
leaq (%rcx,%rax), %r12
addq $0x70f52, %r12          # imm = 0x70F52
leaq -0x60(%rbp), %r15
xorl %r13d, %r13d
pushq $0x18
popq %rbx
cmpq $0xf0, %r13
je 0x57f88
movl (%r15), %ecx
movq %r12, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x45a69
addq $0x18, %r13
addq $0x4, %r15
jmp 0x57f65
xorl %r12d, %r12d
movq -0x38(%rbp), %rax
cmpl $0x5, %eax
je 0x57fcb
cmpl $0x4, %eax
movq -0x30(%rbp), %rdi
je 0x57fbc
cmpl $0x3, %eax
jne 0x57ed8
movq %r14, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x57af8
movq %r14, %rsi
callq 0x57c57
pushq $0x9
jmp 0x57e9b
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x57d04
jmp 0x57ed8
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/ublox.cpp
// Function: bamboo::decode_snav(bamboo::raw_t*, int, int)
static int decode_snav(raw_t *raw, int sat, int off)
{
    int i,j,k,prn,tow,week;
    unsigned char *p=raw->buff+6+off,buff[64];
    
    if (raw->len<40+off) {
        trace(2,"ubx rawsfrbx snav length error: len=%d\n",raw->len);
        return -1;
    }
    tow=(int)time2gpst(timeadd(raw->time,-1.0),&week);
    satsys(sat,&prn);
    raw->sbsmsg.prn=prn;
    raw->sbsmsg.tow=tow;
    raw->sbsmsg.week=week;
    for (i=k=0;i<8;i++,p+=4) for (j=0;j<4;j++) {
        buff[k++]=p[3-j];
    }
    memcpy(raw->sbsmsg.msg,buff,29);
    raw->sbsmsg.msg[28]&=0xC0;
    return 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %eax
movl 0x81a78(%rdi), %edx
leal 0x28(%rax), %ecx
cmpl %ecx, %edx
jge 0x5891b
leaq 0x16768(%rip), %rsi     # 0x6f072
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x455bc
pushq $-0x1
jmp 0x589db
movl %esi, %r14d
movq %rdi, %rbx
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq (%rdi), %rdi
movsd 0x8(%rbx), %xmm0
movsd 0x8069(%rip), %xmm1     # 0x609a0
callq 0x472ee
leaq -0x34(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x470f1
cvttsd2si %xmm0, %r13d
leaq -0x38(%rbp), %r12
movl %r14d, %edi
movq %r12, %rsi
callq 0x45362
movl (%r12), %eax
movl %eax, 0x70e4c(%rbx)
movl %r13d, 0x70e48(%rbx)
movl (%r15), %eax
movl %eax, 0x70e44(%rbx)
movq -0x30(%rbp), %rax
addq %rbx, %rax
addq $0x81a99, %rax          # imm = 0x81A99
xorl %ecx, %ecx
leaq -0x80(%rbp), %rdx
xorl %esi, %esi
cmpl $0x8, %esi
je 0x589bc
movslq %ecx, %rcx
movq %rdx, %r8
xorl %edi, %edi
cmpq $-0x4, %rdi
je 0x589b1
movb (%rax,%rdi), %r9b
movb %r9b, (%r8,%rcx)
decq %rdi
incq %r8
jmp 0x5899b
incl %esi
addq $0x4, %rax
subq %rdi, %rcx
jmp 0x5898e
movups -0x73(%rbp), %xmm0
movups %xmm0, 0x70e5d(%rbx)
movaps -0x80(%rbp), %xmm0
movups %xmm0, 0x70e50(%rbx)
andb $-0x40, 0x70e6c(%rbx)
pushq $0x3
popq %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/VrsObs/VrsNtripClient.cpp
// Function: bamboo::VrsNtripClient::openStream()
void VrsNtripClient::openStream() {
	lcont = true;
	configs_sav = Deploy::s_getConfigures();
	time(&lastCheck);
	def_thread_t pid_handle;
#ifdef _WIN32
	CreateThread(NULL, 0, s_pthVrsStream_win, this, 0, NULL);
#else
	if (0 != pthread_create(&pid_handle, NULL, &s_pthVrsStream, this)) {
		cout
			<< "***ERROR(s_VRSMain):cant create thread to handle request!"
			<< endl;
		exit(1);
	}
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x2040, %rsp           # imm = 0x2040
movq %rdi, %rbx
movb $0x1, (%rdi)
leaq -0x2050(%rbp), %r14
movq %r14, %rdi
callq 0x25f42
leaq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x22c74
leaq -0x2050(%rbp), %rdi
callq 0x25efe
leaq 0x8(%rbx), %rdi
callq 0x85b0
leaq 0x5b(%rip), %rdx        # 0x58ae0
leaq -0x2050(%rbp), %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x8bb0
testl %eax, %eax
jne 0x58aa6
addq $0x2040, %rsp           # imm = 0x2040
popq %rbx
popq %r14
popq %rbp
retq
movq 0x2d51b(%rip), %rdi     # 0x85fc8
leaq 0x8f94(%rip), %rsi      # 0x61a48
callq 0x8610
movq %rax, %rdi
callq 0x8310
pushq $0x1
popq %rdi
callq 0x8790
movq %rax, %rbx
leaq -0x2050(%rbp), %rdi
callq 0x25efe
movq %rbx, %rdi
callq 0x8b30
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/VrsObs/VrsNtripClient.cpp
// Function: bamboo::VrsNtripClient::openStream(std::__cxx11::list<bamboo::RtConverter*, std::allocator<bamboo::RtConverter*>>)
void VrsNtripClient::openStream(list<RtConverter*> svrs_in) {
	lcont = true;
	configs_sav = Deploy::s_getConfigures();
	time(&lastCheck);
	def_thread_t pid_handle;
#ifdef _WIN32
	CreateThread(NULL, 0, s_pthVrsStream_win, this, 0, NULL);
#else
	if (0 != pthread_create(&pid_handle, NULL, &s_pthVrsStream, this)) {
		cout
			<< "***ERROR(s_VRSMain):cant create thread to handle request!"
			<< endl;
		exit(1);
	}
#endif
	this->m_svrs = svrs_in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2048, %rsp           # imm = 0x2048
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, (%rdi)
leaq -0x2058(%rbp), %r15
movq %r15, %rdi
callq 0x25f42
leaq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x22c74
leaq -0x2058(%rbp), %rdi
callq 0x25efe
leaq 0x8(%r14), %rdi
callq 0x85b0
leaq -0x5e(%rip), %rdx       # 0x58ae0
leaq -0x2058(%rbp), %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x8bb0
testl %eax, %eax
jne 0x58b73
addq $0x2050, %r14           # imm = 0x2050
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22d08
addq $0x2048, %rsp           # imm = 0x2048
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d44e(%rip), %rdi     # 0x85fc8
leaq 0x8ec7(%rip), %rsi      # 0x61a48
callq 0x8610
movq %rax, %rdi
callq 0x8310
pushq $0x1
popq %rdi
callq 0x8790
movq %rax, %rbx
leaq -0x2058(%rbp), %rdi
callq 0x25efe
movq %rbx, %rdi
callq 0x8b30
nop
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/VrsObs/VrsNtripClient.cpp
// Function: bamboo::VrsNtripClient::m_newConnection(bamboo::VrsStaItem&)
void VrsNtripClient::m_newConnection(VrsStaItem& item) {
	stream_t* str_m;
	rtcm_t* rtcm_m;
	str_m = (stream_t*)calloc(1, sizeof(stream_t));
	strinit(str_m);
	rtcm_m = (rtcm_t*)calloc(1, sizeof(rtcm_t));
	init_rtcm(rtcm_m);
	stropen(str_m, STR_NTRIPCLI, STR_MODE_RW, item.strpath.c_str());
	strsettimeout(str_m, 60000, 10000); /// 60s for timeout 10s for reconnect
	m_streams[item.staname] = str_m;
	m_rtcms[item.staname] = rtcm_m;
	m_stas[item.staname] = item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %r12
movl $0x860, %esi            # imm = 0x860
movq %r12, %rdi
callq 0x8440
movq %rax, %r15
movq %rax, %rdi
callq 0x4ef90
movl $0x9fe48, %esi          # imm = 0x9FE48
movq %r12, %rdi
callq 0x8440
movq %rax, %r12
movq %rax, %rdi
callq 0x32858
movq 0x40(%rbx), %rcx
pushq $0x7
popq %rsi
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x4efdc
movq %r15, %rdi
movl $0xea60, %esi           # imm = 0xEA60
movl $0x2710, %edx           # imm = 0x2710
callq 0x529d3
leaq 0x2068(%r14), %rdi
leaq 0x20(%rbx), %r13
movq %r13, %rsi
callq 0x5993a
movq %r15, (%rax)
leaq 0x2098(%r14), %rdi
movq %r13, %rsi
callq 0x59866
movq %r12, (%rax)
addq $0x20c8, %r14           # imm = 0x20C8
movq %r14, %rdi
movq %r13, %rsi
callq 0x597fc
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2673c
nop
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/VrsObs/VrsNtripClient.cpp
// Function: bamboo::VrsNtripClient::m_deleteConnection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void VrsNtripClient::m_deleteConnection(string staname) {
	map<string, stream_t*>::iterator streamItr;
	map<string, rtcm_t*>::iterator rtcmItr;
	map<string, VrsStaItem>::iterator vrsItr;

	streamItr = m_streams.find(staname);
	rtcmItr = m_rtcms.find(staname);
	vrsItr = m_stas.find(staname);

	if (streamItr != m_streams.end()) {
		strclose((*streamItr).second);
		free((*streamItr).second);
		m_streams.erase(streamItr);
	}
	if (rtcmItr != m_rtcms.end()) {
		free_rtcm((*rtcmItr).second);
		free((*rtcmItr).second);
		m_rtcms.erase(rtcmItr);
	}
	if (vrsItr != m_stas.end())
		m_stas.erase(vrsItr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x2068(%rdi), %r14
movq %r14, %rdi
callq 0x5a5ea
movq %rax, %r15
leaq 0x2098(%rbx), %rdi
movq %rdi, -0x30(%rbp)
movq %r12, %rsi
callq 0x5a674
movq %rax, %r13
leaq 0x20c8(%rbx), %rdi
movq %rdi, -0x38(%rbp)
movq %r12, %rsi
callq 0x5a6bc
movq %rax, %r12
leaq 0x2070(%rbx), %rax
cmpq %rax, %r15
je 0x5979c
movq 0x40(%r15), %rdi
callq 0x5009c
movq 0x40(%r15), %rdi
callq 0x8780
movq %r14, %rdi
movq %r15, %rsi
callq 0x5a704
leaq 0x20a0(%rbx), %rax
cmpq %rax, %r13
je 0x597c6
movq 0x40(%r13), %rdi
callq 0x32b2a
movq 0x40(%r13), %rdi
callq 0x8780
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x5a766
addq $0x20d0, %rbx           # imm = 0x20D0
cmpq %rbx, %r12
je 0x597ec
movq -0x38(%rbp), %rdi
movq %r12, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5a7c8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rnxbrd/BroadcastEphUtils.cpp
// Function: bamboo::BroadcastEphUtils::glsinit(double*, bamboo::GLSEPH&)
void BroadcastEphUtils::glsinit(double* x,GLSEPH& eph){
	int i;
	for (i = 0; i < 3; i++)
		x[i] = eph.pos[i];
	for (i = 3; i < 6; i++)
		x[i] = eph.vel[i - 3];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpq $0x3, %rax
je 0x5bede
movsd 0x30(%rdx,%rax,8), %xmm0
movsd %xmm0, (%rsi,%rax,8)
incq %rax
jmp 0x5bec8
xorl %eax, %eax
cmpq $0x3, %rax
je 0x5bef7
movsd 0x48(%rdx,%rax,8), %xmm0
movsd %xmm0, 0x18(%rsi,%rax,8)
incq %rax
jmp 0x5bee0
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rnxbrd/BroadcastEphUtils.cpp
// Function: bamboo::BroadcastEphUtils::glsrkf4(double, double*, bamboo::GLSEPH&)
void BroadcastEphUtils::glsrkf4(double h, double* x, GLSEPH& eph){
	int i, j;
	double coef[4], xj[6], acc[6], funct[6];
	coef[0] = h / 2;
	coef[1] = h / 2;
	coef[2] = h;
	coef[3] = h;
	for (i = 0; i < 6; i++)
		xj[i] = x[i];
	glsfright(xj, acc, eph);
	for (i = 0; i < 6; i++)
		funct[i] = xj[i];
	for (j = 0; j < 3; j++) {
		for (i = 0; i < 6; i++) {
			xj[i] = x[i] + coef[j] * acc[i];
			funct[i] = funct[i] + coef[j + 1] * acc[i] / 3.0;
		}
		glsfright(xj, acc, eph);
	}
	for (i = 0; i < 6; i++)
		x[i] = funct[i] + h * acc[i] / 6.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movsd 0x5d5c(%rip), %xmm1     # 0x61c78
mulsd %xmm0, %xmm1
movsd %xmm1, -0x60(%rbp)
movsd %xmm1, -0x58(%rbp)
movsd %xmm0, -0x50(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm0, -0x48(%rbp)
xorl %eax, %eax
cmpq $0x6, %rax
je 0x5bf54
movsd (%rbx,%rax,8), %xmm0
movsd %xmm0, -0x90(%rbp,%rax,8)
incq %rax
jmp 0x5bf3b
leaq -0x90(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
movq %r14, %rcx
movsd %xmm1, -0x30(%rbp)
callq 0x5c39a
movsd -0x30(%rbp), %xmm2
xorl %eax, %eax
cmpq $0x6, %rax
je 0x5bf93
movsd -0x90(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xc0(%rbp,%rax,8)
incq %rax
jmp 0x5bf76
xorl %r13d, %r13d
leaq -0x90(%rbp), %r15
leaq -0xf0(%rbp), %r12
movsd 0x492c(%rip), %xmm3     # 0x608d8
cmpq $0x3, %r13
je 0x5c024
movsd -0x58(%rbp,%r13,8), %xmm4
incq %r13
xorl %eax, %eax
cmpq $0x6, %rax
je 0x5c002
movsd -0xf0(%rbp,%rax,8), %xmm0
movapd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd (%rbx,%rax,8), %xmm1
movsd %xmm1, -0x90(%rbp,%rax,8)
mulsd %xmm4, %xmm0
divsd %xmm3, %xmm0
addsd -0xc0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xc0(%rbp,%rax,8)
incq %rax
jmp 0x5bfbe
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movsd %xmm4, -0x30(%rbp)
callq 0x5c39a
movsd 0x48bb(%rip), %xmm3     # 0x608d8
movsd -0x30(%rbp), %xmm2
jmp 0x5bfac
xorl %eax, %eax
movsd 0x49fa(%rip), %xmm0     # 0x60a28
cmpq $0x6, %rax
je 0x5c059
movsd -0xf0(%rbp,%rax,8), %xmm1
mulsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0xc0(%rbp,%rax,8), %xmm1
movsd %xmm1, (%rbx,%rax,8)
incq %rax
jmp 0x5c02e
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rnxbrd/BroadcastEphUtils.cpp
// Function: bamboo::BroadcastEphUtils::glsfright(double*, double*, bamboo::GLSEPH&)
void BroadcastEphUtils::glsfright(double* x, double* acc,GLSEPH& eph){
	const double c20 = -1.08262575e-3;
	const double GMEARTH = 3.986004418e5;
	const double EROT = 7.292115e-5;
	const double ER = 6.378136e3;
	int i;
	double factor1, factor2, r, vec1[3], vec2[3];
	r = sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
	factor1 = -GMEARTH / pow(r, 3);
	factor2 = 1.5 * GMEARTH * c20 * ER * ER / pow(r, 5);
	vec1[0] = EROT * EROT * x[0] + 2.0 * EROT * x[4];
	vec1[1] = EROT * EROT * x[1] - 2.0 * EROT * x[3];
	vec1[2] = 0.0;
	vec2[0] = x[0] * (1.0 - 5.0 * pow((x[2] / r), 2));
	vec2[1] = x[1] * (1.0 - 5.0 * pow((x[2] / r), 2));
	vec2[2] = x[2] * (3.0 - 5.0 * pow((x[2] / r), 2));
	for (i = 0; i < 3; i++) {
		acc[i] = x[i + 3];
		acc[i + 3] = eph.acc[i] + vec1[i] + factor2 * vec2[i] + factor1 * x[i];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rsi), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x44f5(%rip), %xmm1     # 0x608d8
callq 0x8b20
movsd 0x12f78(%rip), %xmm1    # 0x6f368
divsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
movsd 0x539f(%rip), %xmm1     # 0x617a0
movsd -0x20(%rbp), %xmm0
callq 0x8b20
movsd 0x12f5d(%rip), %xmm1    # 0x6f370
divsd %xmm0, %xmm1
movsd 0x20(%r15), %xmm0
mulsd 0x12f53(%rip), %xmm0    # 0x6f378
movsd (%r15), %xmm2
movsd 0x12f4e(%rip), %xmm3    # 0x6f380
movapd %xmm2, %xmm4
mulsd %xmm3, %xmm4
addsd %xmm0, %xmm4
movsd %xmm4, -0x60(%rbp)
movsd 0x8(%r15), %xmm0
movsd 0x18(%r15), %xmm4
mulsd 0x12f31(%rip), %xmm4    # 0x6f388
mulsd %xmm0, %xmm3
addsd %xmm4, %xmm3
movsd %xmm3, -0x58(%rbp)
andq $0x0, -0x50(%rbp)
movsd 0x10(%r15), %xmm3
movapd %xmm3, %xmm4
divsd -0x20(%rbp), %xmm4
mulsd %xmm4, %xmm4
mulsd 0x12f0c(%rip), %xmm4    # 0x6f390
movsd 0x3494(%rip), %xmm5     # 0x5f920
addsd %xmm4, %xmm5
mulsd %xmm5, %xmm2
movsd %xmm2, -0x40(%rbp)
mulsd %xmm0, %xmm5
movsd %xmm5, -0x38(%rbp)
addsd 0x442e(%rip), %xmm4     # 0x608d8
mulsd %xmm3, %xmm4
movsd -0x28(%rbp), %xmm3
movsd %xmm4, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x18, %rax
je 0x5c502
movsd 0x18(%r15,%rax), %xmm0
movsd %xmm0, (%r14,%rax)
movsd 0x60(%rbx,%rax), %xmm0
addsd -0x60(%rbp,%rax), %xmm0
movsd -0x40(%rbp,%rax), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
movsd (%r15,%rax), %xmm0
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, 0x18(%r14,%rax)
addq $0x8, %rax
jmp 0x5c4ba
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rnxbrd/RnxEphFileAdapter.cpp
// Function: bamboo::RnxEphFileAdapter::RnxEphFileAdapter()
RnxEphFileAdapter::RnxEphFileAdapter() {
	memset(neph, 0, sizeof(int) * MAXSYS);
	mjd0 = mjd1 = leap = 0;
	sod0 = sod1 = ver = 0.0;
	memset(ionc, 0, sizeof(char) * MAXSYS * 2 * LEN_EPHION);
	memset(ion, 0, sizeof(double) * MAXSYS * 2 * 4);
	memset(timc, 0, sizeof(char) * MAXSYS * 2 * LEN_EPHION);
	memset(tim, 0, sizeof(double) * MAXSYS * 2 * 4);
	isOpen = 0;
	orbType = ORB_BRD;
	clkType = CLK_BRD;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
movl $0x2ac, %edx            # imm = 0x2AC
xorl %esi, %esi
callq 0x8390
andl $0x0, 0x2c0(%rbx)
leaq 0x29684(%rip), %rax     # 0x85ce0
movq %rax, (%rbx)
leaq 0x29702(%rip), %rax     # 0x85d68
movq %rax, 0x2b8(%rbx)
movb $0x0, 0x2c4(%rbx)
movabsq $0x4008cccccccccccd, %rax # imm = 0x4008CCCCCCCCCCCD
movq %rax, 0x2c8(%rbx)
leaq 0x6d0(%rbx), %rdi
callq 0x5defc
leaq 0x294c0(%rip), %rax     # 0x85b58
movq %rax, (%rbx)
leaq 0x2954e(%rip), %rax     # 0x85bf0
movq %rax, 0x2b8(%rbx)
leaq 0x29570(%rip), %rax     # 0x85c20
movq %rax, 0x6d0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x6d8(%rbx)
movups %xmm0, 0x6e4(%rbx)
leaq 0xdd0(%rbx), %r14
leaq 0x7b8(%rbx), %rdi
movl $0x1f8, %edx            # imm = 0x1F8
xorl %esi, %esi
callq 0x8390
xorps %xmm0, %xmm0
movups %xmm0, 0xdb0(%rbx)
movups %xmm0, 0xdbc(%rbx)
movl $0x204, %edx            # imm = 0x204
movq %r14, %rdi
xorl %esi, %esi
callq 0x8390
movl $0x3, 0x2c0(%rbx)
movl $0x6, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq