LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strsetopt(int const*)
extern void strsetopt(const int *opt)
	{
		tracet(3, "strsetopt: opt=%d %d %d %d %d %d %d %d\n", opt[0], opt[1], opt[2],
			opt[3], opt[4], opt[5], opt[6], opt[7]);

		toinact = 0 < opt[0] && opt[0] < 1000 ? 1000 : opt[0]; /* >=1s */
		ticonnect = opt[1] < 1000 ? 1000 : opt[1]; /* >=1s */
		tirate = opt[2] < 100 ? 100 : opt[2]; /* >=0.1s */
		buffsize = opt[3] < 4096 ? 4096 : opt[3]; /* >=4096byte */
		fswapmargin = opt[4] < 0 ? 0 : opt[4];
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %r8d
movq -0x10(%rbp), %rax
movl 0xc(%rax), %r9d
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ebx
movq -0x10(%rbp), %rax
movl 0x14(%rax), %r11d
movq -0x10(%rbp), %rax
movl 0x18(%rax), %r10d
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl $0x3, %edi
leaq 0x25910(%rip), %rsi     # 0xc8c44
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl (%rcx), %eax
jge 0xa336c
movq -0x10(%rbp), %rax
cmpl $0x3e8, (%rax)          # imm = 0x3E8
jge 0xa336c
movl $0x3e8, %eax            # imm = 0x3E8
movl %eax, -0x14(%rbp)
jmp 0xa3375
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, 0x566ee(%rip)     # 0xf9a6c
movq -0x10(%rbp), %rax
cmpl $0x3e8, 0x4(%rax)       # imm = 0x3E8
jge 0xa3395
movl $0x3e8, %eax            # imm = 0x3E8
movl %eax, -0x18(%rbp)
jmp 0xa339f
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, 0x566c8(%rip)     # 0xf9a70
movq -0x10(%rbp), %rax
cmpl $0x64, 0x8(%rax)
jge 0xa33bc
movl $0x64, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa33c6
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, 0x56699(%rip)     # 0xf9a68
movq -0x10(%rbp), %rax
cmpl $0x1000, 0xc(%rax)      # imm = 0x1000
jge 0xa33e6
movl $0x1000, %eax           # imm = 0x1000
movl %eax, -0x20(%rbp)
jmp 0xa33f0
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, 0x5667b(%rip)     # 0xf9a74
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jge 0xa340a
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0xa3414
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, 0x5665b(%rip)     # 0xf9a78
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strsettimeout(bamboo::stream_t*, int, int)
extern void strsettimeout(stream_t *stream, int toinact, int tirecon)
	{
		tcpcli_t *tcpcli;

		tracet(3, "strsettimeout: toinact=%d tirecon=%d\n", toinact, tirecon);

		if (stream->type == STR_TCPCLI) {
			tcpcli = (tcpcli_t *)stream->port;
		}
		else if (stream->type == STR_NTRIPCLI || stream->type == STR_NTRIPSVR) {
			tcpcli = ((ntrip_t *)stream->port)->tcp;
		}
		else return;

		tcpcli->toinact = toinact;
		tcpcli->tirecon = tirecon;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movl $0x3, %edi
leaq 0x25818(%rip), %rsi     # 0xc8c6c
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rax
cmpl $0x4, (%rax)
jne 0xa3472
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xa349d
movq -0x8(%rbp), %rax
cmpl $0x7, (%rax)
je 0xa3484
movq -0x8(%rbp), %rax
cmpl $0x6, (%rax)
jne 0xa3499
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x8510(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xa349b
jmp 0xa34b7
jmp 0xa349d
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x128(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x12c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strgettime(bamboo::stream_t*)
extern gtime_t strgettime(stream_t *stream)
	{
		file_t *file;
		if (stream->type == STR_FILE && (stream->mode&STR_MODE_R) &&
			(file = (file_t *)stream->port)) {
			return timeadd(file->time, file->start); /* replay start time */
		}
		return utc2gpst(timeget());
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xa35b5
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xa35b5
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xa35b5
movq -0x20(%rbp), %rax
movq 0x838(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x840(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsd 0x870(%rax), %xmm1
movq -0x30(%rbp), %rdi
movsd -0x28(%rbp), %xmm0
callq 0x8e860
movq %rax, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
jmp 0xa35da
callq 0x8e920
movq %rax, -0x40(%rbp)
movsd %xmm0, -0x38(%rbp)
movq -0x40(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
callq 0x8f0a0
movq %rax, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rax
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::set_brate(bamboo::stream_t*, int)
static int set_brate(stream_t *str, int brate)
	{
		char path[1024], buff[1024] = "", *p, *q;
		int type = str->type, mode = str->mode;

		if (type != STR_SERIAL) return 0;

		strcpy(path, str->path);

		if (!(p = strchr(path, ':'))) {
			sprintf(path + strlen(path), ":%d", brate);
		}
		else {
			if ((q = strchr(p + 1, ':'))) strcpy(buff, q);
			sprintf(p, ":%d%s", brate, buff);
		}
		strclose(str);
		return stropen(str, type, mode, path);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x840, %rsp            # imm = 0x840
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq -0x820(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x93d0
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x834(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x838(%rbp)
cmpl $0x1, -0x834(%rbp)
je 0xa3963
movl $0x0, -0x4(%rbp)
jmp 0xa3a48
leaq -0x420(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
callq 0x96f0
leaq -0x420(%rbp), %rdi
movl $0x3a, %esi
callq 0x9280
movq %rax, -0x828(%rbp)
cmpq $0x0, %rax
jne 0xa39cc
leaq -0x420(%rbp), %rax
movq %rax, -0x840(%rbp)
leaq -0x420(%rbp), %rdi
callq 0x92e0
movq -0x840(%rbp), %rdi
addq %rax, %rdi
movl -0x14(%rbp), %edx
leaq 0x1a295(%rip), %rsi     # 0xbdc58
movb $0x0, %al
callq 0x9150
jmp 0xa3a20
movq -0x828(%rbp), %rdi
addq $0x1, %rdi
movl $0x3a, %esi
callq 0x9280
movq %rax, -0x830(%rbp)
cmpq $0x0, %rax
je 0xa3a01
leaq -0x820(%rbp), %rdi
movq -0x830(%rbp), %rsi
callq 0x96f0
movq -0x828(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq -0x820(%rbp), %rcx
leaq 0x269a4(%rip), %rsi     # 0xca3bd
movb $0x0, %al
callq 0x9150
movq -0x10(%rbp), %rdi
callq 0x9ed20
movq -0x10(%rbp), %rdi
movl -0x834(%rbp), %esi
movl -0x838(%rbp), %edx
leaq -0x420(%rbp), %rcx
callq 0x9d3f0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x840, %rsp            # imm = 0x840
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::gen_hex(char const*, unsigned char*)
static int gen_hex(const char *msg, unsigned char *buff)
	{
		unsigned char *q = buff;
		char mbuff[1024] = "", *args[256], *p;
		unsigned int byte;
		int i, narg = 0;

		trace(4, "gen_hex: msg=%s\n", msg);

		strncpy(mbuff, msg, 1023);
		for (p = strtok(mbuff, " "); p&&narg < 256; p = strtok(NULL, " ")) {
			args[narg++] = p;
		}
		for (i = 0; i < narg; i++) {
			if (sscanf(args[i], "%x", &byte)) *q++ = (unsigned char)byte;
		}
		return (int)(q - buff);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc40, %rsp            # imm = 0xC40
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x420(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x93d0
movl $0x0, -0xc34(%rbp)
movq -0x8(%rbp), %rdx
movl $0x4, %edi
leaq 0x2691b(%rip), %rsi     # 0xca3c3
movb $0x0, %al
callq 0x8b980
leaq -0x420(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x93b0
leaq -0x420(%rbp), %rdi
leaq 0x246b1(%rip), %rsi     # 0xc8183
callq 0x9b70
movq %rax, -0xc28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0xc28(%rbp)
movb %al, -0xc35(%rbp)
je 0xa3b03
cmpl $0x100, -0xc34(%rbp)    # imm = 0x100
setl %al
movb %al, -0xc35(%rbp)
movb -0xc35(%rbp), %al
testb $0x1, %al
jne 0xa3b0f
jmp 0xa3b4a
movq -0xc28(%rbp), %rcx
movl -0xc34(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0xc34(%rbp)
cltq
movq %rcx, -0xc20(%rbp,%rax,8)
xorl %eax, %eax
movl %eax, %edi
leaq 0x24647(%rip), %rsi     # 0xc8183
callq 0x9b70
movq %rax, -0xc28(%rbp)
jmp 0xa3ade
movl $0x0, -0xc30(%rbp)
movl -0xc30(%rbp), %eax
cmpl -0xc34(%rbp), %eax
jge 0xa3bb7
movslq -0xc30(%rbp), %rax
movq -0xc20(%rbp,%rax,8), %rdi
leaq 0x2685c(%rip), %rsi     # 0xca3d4
leaq -0xc2c(%rbp), %rdx
movb $0x0, %al
callq 0x9750
cmpl $0x0, %eax
je 0xa3ba4
movl -0xc2c(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0xa3ba6
movl -0xc30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc30(%rbp)
jmp 0xa3b54
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0xc40, %rsp            # imm = 0xC40
popq %rbp
retq
nopl (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::closefile_(bamboo::file_t*)
static void closefile_(file_t *file)
	{
		tracet(3, "closefile_: path=%s\n", file->path);

		if (file->fp) fclose(file->fp);
		if (file->fp_tag) fclose(file->fp_tag);
		if (file->fp_tmp) fclose(file->fp_tmp);
		if (file->fp_tag_tmp) fclose(file->fp_tag_tmp);
		file->fp = file->fp_tag = file->fp_tmp = file->fp_tag_tmp = NULL;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
addq $0x20, %rdx
movl $0x3, %edi
leaq 0x24753(%rip), %rsi     # 0xc92c3
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa4b8d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x9770
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xa4ba5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x9770
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xa4bbd
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9770
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xa4bd5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x9770
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::waittcpsvr(bamboo::tcpsvr_tag*, char*)
static int waittcpsvr(tcpsvr_t *tcpsvr, char *msg)
	{
		tracet(4, "waittcpsvr: sock=%d state=%d\n", tcpsvr->svr.sock, tcpsvr->svr.state);

		if (tcpsvr->svr.state <= 0) return 0;

		while (accsock(tcpsvr, msg));

		updatetcpsvr(tcpsvr, msg);
		return tcpsvr->svr.state == 2;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movl $0x4, %edi
leaq 0x247ec(%rip), %rsi     # 0xc9428
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jg 0xa4c55
movl $0x0, -0x4(%rbp)
jmp 0xa4c8a
jmp 0xa4c57
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa4fa0
cmpl $0x0, %eax
je 0xa4c6b
jmp 0xa4c57
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa4e40
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -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::recv_nb(int, unsigned char*, int)
static int recv_nb(socket_t sock, unsigned char *buff, int n)
	{
		struct timeval tv = { 0 };
		fd_set rs;
		int ret, nr;

		FD_ZERO(&rs); FD_SET(sock, &rs);
		ret = select(sock + 1, &rs, NULL, NULL, &tv);
		if (ret <= 0) return ret;
		nr = recv(sock, (char *)buff, n, 0);
		return nr <= 0 ? -1 : nr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x93d0
leaq -0xa8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpq $0x10, %rax
jae 0xa4d0f
movq -0xc0(%rbp), %rax
movl -0xb4(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0xa4cdd
jmp 0xa4d11
movl -0x8(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl -0x8(%rbp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0xa8(%rbp,%rax,8), %rcx
movq %rcx, -0xa8(%rbp,%rax,8)
movl -0x8(%rbp), %edi
addl $0x1, %edi
leaq -0xa8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x28(%rbp), %r8
movq %rcx, %rdx
callq 0x9710
movl %eax, -0xac(%rbp)
cmpl $0x0, -0xac(%rbp)
jg 0xa4d7f
movl -0xac(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa4dc2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
xorl %ecx, %ecx
callq 0x9250
movl %eax, -0xb0(%rbp)
cmpl $0x0, -0xb0(%rbp)
jg 0xa4dad
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xc4(%rbp)
jmp 0xa4db9
movl -0xb0(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nop
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::discontcp(bamboo::tcp_t*, int)
static void discontcp(tcp_t *tcp, int tcon)
	{
		tracet(3, "discontcp: sock=%d tcon=%d\n", tcp->sock, tcon);

		closesocket(tcp->sock);
		tcp->state = 0;
		tcp->tcon = tcon;
		tcp->tdis = tickget();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x118(%rax), %edx
movl -0xc(%rbp), %ecx
movl $0x3, %edi
leaq 0x246c1(%rip), %rsi     # 0xc94b9
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rax
movl 0x118(%rax), %edi
callq 0x9e90
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x11c(%rax)
callq 0x8f860
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x124(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x93d0
movl $0x0, -0x118(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edx
movl $0x4, %edi
leaq 0x24653(%rip), %rsi     # 0xc94d5
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xa4e97
jmp 0xa4f88
movl $0x0, -0x114(%rbp)
cmpl $0x100, -0x114(%rbp)    # imm = 0x100
jge 0xa4f1b
movq -0x8(%rbp), %rax
addq $0x128, %rax            # imm = 0x128
movslq -0x114(%rbp), %rcx
imulq $0x128, %rcx, %rcx      # imm = 0x128
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0xa4ecf
jmp 0xa4f0a
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x128, %rsi            # imm = 0x128
movslq -0x114(%rbp), %rax
imulq $0x128, %rax, %rax      # imm = 0x128
addq %rax, %rsi
addq $0x4, %rsi
callq 0x96f0
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0xa4ea1
cmpl $0x0, -0x118(%rbp)
jne 0xa4f42
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x245b4(%rip), %rsi     # 0xc94ed
movb $0x0, %al
callq 0x9150
jmp 0xa4f88
movq -0x8(%rbp), %rax
movl $0x2, (%rax)
cmpl $0x1, -0x118(%rbp)
jne 0xa4f70
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq 0x23e80(%rip), %rsi     # 0xc8de7
movb $0x0, %al
callq 0x9150
jmp 0xa4f88
movq -0x10(%rbp), %rdi
movl -0x118(%rbp), %edx
leaq 0x24577(%rip), %rsi     # 0xc94f8
movb $0x0, %al
callq 0x9150
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::accept_nb(int, sockaddr*, unsigned int*)
static socket_t accept_nb(socket_t sock, struct sockaddr *addr, socklen_t *len)
	{
		struct timeval tv = { 0 };
		fd_set rs;
		int ret;

		FD_ZERO(&rs); FD_SET(sock, &rs);
		ret = select(sock + 1, &rs, NULL, NULL, &tv);
		if (ret <= 0) return (socket_t)ret;
		return accept(sock, addr, len);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x93d0
leaq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl $0x0, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
cmpq $0x10, %rax
jae 0xa52b0
movq -0xb8(%rbp), %rax
movl -0xb0(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xb0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb0(%rbp)
jmp 0xa527e
jmp 0xa52b2
movl -0x8(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl -0x8(%rbp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0xa8(%rbp,%rax,8), %rcx
movq %rcx, -0xa8(%rbp,%rax,8)
movl -0x8(%rbp), %edi
addl $0x1, %edi
leaq -0xa8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x28(%rbp), %r8
movq %rcx, %rdx
callq 0x9710
movl %eax, -0xac(%rbp)
cmpl $0x0, -0xac(%rbp)
jg 0xa5320
movl -0xac(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa5333
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x9240
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nop
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::waittcpcli(bamboo::tcpcli_t*, char*)
static int waittcpcli(tcpcli_t *tcpcli, char *msg)
	{
		tracet(4, "waittcpcli: sock=%d state=%d\n", tcpcli->svr.sock, tcpcli->svr.state);

		if (tcpcli->svr.state < 0) return 0;

		if (tcpcli->svr.state == 0) { /* close */
			if (!gentcp(&tcpcli->svr, 1, msg)) return 0;
		}
		if (tcpcli->svr.state == 1) { /* wait */
			if (!consock(tcpcli, msg)) return 0;
		}
		if (tcpcli->svr.state == 2) { /* connect */
			if (tcpcli->toinact > 0 &&
				(int)(tickget() - tcpcli->svr.tact) > tcpcli->toinact) {
				sprintf(msg, "timeout");
				tracet(2, "waittcpcli: inactive timeout sock=%d\n", tcpcli->svr.sock);
				discontcp(&tcpcli->svr, tcpcli->tirecon);
				return 0;
			}
		}
		return 1;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movl $0x4, %edi
leaq 0x24210(%rip), %rsi     # 0xc957c
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jge 0xa5388
movl $0x0, -0x4(%rbp)
jmp 0xa5464
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xa53b6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x1, %esi
callq 0xa4110
cmpl $0x0, %eax
jne 0xa53b4
movl $0x0, -0x4(%rbp)
jmp 0xa5464
jmp 0xa53b6
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xa53df
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa5470
cmpl $0x0, %eax
jne 0xa53dd
movl $0x0, -0x4(%rbp)
jmp 0xa5464
jmp 0xa53df
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xa545d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x128(%rax)
jle 0xa545b
callq 0x8f860
movq -0x10(%rbp), %rcx
subl 0x120(%rcx), %eax
movq -0x10(%rbp), %rcx
cmpl 0x128(%rcx), %eax
jle 0xa545b
movq -0x18(%rbp), %rdi
leaq 0x2417f(%rip), %rsi     # 0xc959a
movb $0x0, %al
callq 0x9150
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movl $0x2, %edi
leaq 0x2416a(%rip), %rsi     # 0xc95a2
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x12c(%rax), %esi
callq 0xa4dd0
movl $0x0, -0x4(%rbp)
jmp 0xa5464
jmp 0xa545d
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::consock(bamboo::tcpcli_t*, char*)
static int consock(tcpcli_t *tcpcli, char *msg)
	{
		int stat, err;

		tracet(4, "consock: sock=%d\n", tcpcli->svr.sock);

		/* wait re-connect */
		if (tcpcli->svr.tcon < 0 || (tcpcli->svr.tcon > 0 &&
			(int)(tickget() - tcpcli->svr.tdis) < tcpcli->svr.tcon)) {
			return 0;
		}
		/* non-block connect */
		if ((stat = connect_nb(tcpcli->svr.sock, (struct sockaddr *)&tcpcli->svr.addr,
			sizeof(tcpcli->svr.addr))) == -1) {
			err = errsock();
			sprintf(msg, "connect error (%d)", err);
			tracet(1, "consock: connect error sock=%d err=%d\n", tcpcli->svr.sock, err);
			closesocket(tcpcli->svr.sock);
			tcpcli->svr.state = 0;
			return 0;
		}
		if (!stat) { /* not connect */
			sprintf(msg, "connecting...");
			return 0;
		}
		sprintf(msg, "%s", tcpcli->svr.saddr);
		tracet(2, "consock: connected sock=%d addr=%s\n", tcpcli->svr.sock, tcpcli->svr.saddr);
		tcpcli->svr.state = 2;
		tcpcli->svr.tact = tickget();
		return 1;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movl $0x4, %edi
leaq 0x24132(%rip), %rsi     # 0xc95c8
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rax
cmpl $0x0, 0x11c(%rax)
jl 0xa54d2
movq -0x10(%rbp), %rax
cmpl $0x0, 0x11c(%rax)
jle 0xa54de
callq 0x8f860
movq -0x10(%rbp), %rcx
subl 0x124(%rcx), %eax
movq -0x10(%rbp), %rcx
cmpl 0x11c(%rcx), %eax
jge 0xa54de
movl $0x0, -0x4(%rbp)
jmp 0xa55e9
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x108, %rsi            # imm = 0x108
movl $0x10, %edx
callq 0xa5600
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0xa5567
callq 0xa43f0
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %edx
leaq 0x240bf(%rip), %rsi     # 0xc95da
movb $0x0, %al
callq 0x9150
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movl -0x20(%rbp), %ecx
movl $0x1, %edi
leaq 0x240b2(%rip), %rsi     # 0xc95ed
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edi
callq 0x9e90
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xa55e9
cmpl $0x0, -0x1c(%rbp)
jne 0xa5588
movq -0x18(%rbp), %rdi
leaq 0x2409c(%rip), %rsi     # 0xc9614
movb $0x0, %al
callq 0x9150
movl $0x0, -0x4(%rbp)
jmp 0xa55e9
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x4, %rdx
leaq 0x2384c(%rip), %rsi     # 0xc8de7
movb $0x0, %al
callq 0x9150
movq -0x10(%rbp), %rax
movl 0x118(%rax), %edx
movq -0x10(%rbp), %rcx
addq $0x4, %rcx
movl $0x2, %edi
leaq 0x24062(%rip), %rsi     # 0xc9622
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
callq 0x8f860
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x120(%rax)
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::connect_nb(int, sockaddr*, unsigned int)
static int connect_nb(socket_t sock, struct sockaddr *addr, socklen_t len)
	{
#ifdef WIN32
		u_long mode = 1;
		int err;

		ioctlsocket(sock, FIONBIO, &mode);
		if (connect(sock, addr, len) == -1) {
			err = errsock();
			if (err == WSAEWOULDBLOCK || err == WSAEINPROGRESS ||
				err == WSAEALREADY || err == WSAEINVAL) return 0;
			if (err != WSAEISCONN) return -1;
		}
#else
		struct timeval tv = { 0 };
		fd_set rs, ws;
		int err, flag;

		flag = fcntl(sock, F_GETFL, 0);
		fcntl(sock, F_SETFL, flag | O_NONBLOCK);
		if (connect(sock, addr, len) == -1) {
			err = errsock();
			if (err != EISCONN && err != EINPROGRESS && err != EALREADY) return -1;
			FD_ZERO(&rs); FD_SET(sock, &rs); ws = rs;
			if (select(sock + 1, &rs, &ws, NULL, &tv) == 0) return 0;
		}
#endif
		return 1;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x93d0
movl -0x8(%rbp), %edi
movl $0x3, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x9410
movl %eax, -0x130(%rbp)
movl -0x8(%rbp), %edi
movl -0x130(%rbp), %edx
orl $0x800, %edx            # imm = 0x800
movl $0x4, %esi
movb $0x0, %al
callq 0x9410
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x9620
cmpl $-0x1, %eax
jne 0xa576f
callq 0xa43f0
movl %eax, -0x12c(%rbp)
cmpl $0x6a, -0x12c(%rbp)
je 0xa56a1
cmpl $0x73, -0x12c(%rbp)
je 0xa56a1
cmpl $0x72, -0x12c(%rbp)
je 0xa56a1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa5776
jmp 0xa56a3
leaq -0xa8(%rbp), %rax
movq %rax, -0x140(%rbp)
movl $0x0, -0x134(%rbp)
movl -0x134(%rbp), %eax
cmpq $0x10, %rax
jae 0xa56ed
movq -0x140(%rbp), %rax
movl -0x134(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0xa56bb
jmp 0xa56ef
movl -0x8(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl -0x8(%rbp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0xa8(%rbp,%rax,8), %rcx
movq %rcx, -0xa8(%rbp,%rax,8)
leaq -0x128(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movl $0x80, %edx
callq 0x9610
movl -0x8(%rbp), %edi
addl $0x1, %edi
leaq -0xa8(%rbp), %rsi
leaq -0x128(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq -0x28(%rbp), %r8
callq 0x9710
cmpl $0x0, %eax
jne 0xa576d
movl $0x0, -0x4(%rbp)
jmp 0xa5776
jmp 0xa576f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::reqntrip_s(bamboo::ntrip_t*, char*)
static int reqntrip_s(ntrip_t *ntrip, char *msg)
	{
		char buff[256 + NTRIP_MAXSTR], *p = buff;

		tracet(3, "reqntrip_s: state=%d\n", ntrip->state);

		p += sprintf(p, "SOURCE %s %s\r\n", ntrip->passwd, ntrip->mntpnt);
		p += sprintf(p, "Source-Agent: NTRIP %s\r\n", NTRIP_AGENT);
		p += sprintf(p, "STR: %s\r\n", ntrip->str);
		p += sprintf(p, "\r\n");

		if (writetcpcli(ntrip->tcp, (unsigned char *)buff, p - buff, msg) != p - buff) return 0;

		tracet(2, "reqntrip_s: send request state=%d ns=%d\n", ntrip->state, p - buff);
		tracet(5, "reqntrip_s: n=%d buff=\n%s\n", p - buff, buff);
		ntrip->state = 1;
		return 1;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x220(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edx
movl $0x3, %edi
leaq 0x23d13(%rip), %rsi     # 0xc9686
movb $0x0, %al
callq 0x95890
movq -0x228(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x30c, %rdx            # imm = 0x30C
movq -0x10(%rbp), %rcx
addq $0x10c, %rcx            # imm = 0x10C
leaq 0x23cfe(%rip), %rsi     # 0xc969c
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x228(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rdi
leaq 0x23ce2(%rip), %rsi     # 0xc96ab
leaq 0x23cf4(%rip), %rdx     # 0xc96c4
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x228(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x40c, %rdx            # imm = 0x40C
leaq 0x23ccb(%rip), %rsi     # 0xc96d1
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x228(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rdi
leaq 0x241c1(%rip), %rsi     # 0xc9bf2
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x228(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x10(%rbp), %rax
movq 0x8510(%rax), %rdi
leaq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rax
leaq -0x220(%rbp), %rcx
subq %rcx, %rax
movl %eax, %edx
movq -0x18(%rbp), %rcx
callq 0xa1280
cltq
movq -0x228(%rbp), %rcx
leaq -0x220(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
je 0xa5a9d
movl $0x0, -0x4(%rbp)
jmp 0xa5b03
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x228(%rbp), %rcx
leaq -0x220(%rbp), %rax
subq %rax, %rcx
movl $0x2, %edi
leaq 0x23c1b(%rip), %rsi     # 0xc96db
movb $0x0, %al
callq 0x95890
movq -0x228(%rbp), %rdx
leaq -0x220(%rbp), %rax
subq %rax, %rdx
leaq -0x220(%rbp), %rcx
movl $0x5, %edi
leaq 0x23c19(%rip), %rsi     # 0xc9704
movb $0x0, %al
callq 0x95890
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nop
// File: 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
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x60(%rbp), %rdi
leaq 0x23f1f(%rip), %rsi     # 0xca3e0
movl $0x41, %edx
callq 0x9610
movl -0x14(%rbp), %edx
movl $0x4, %edi
leaq 0x23303(%rip), %rsi     # 0xc97dd
movb $0x0, %al
callq 0x95890
movl $0x0, -0x68(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl -0x14(%rbp), %eax
jge 0xa65aa
movl $0x0, -0x70(%rbp)
movl $0x0, -0x6c(%rbp)
cmpl $0x6, -0x6c(%rbp)
jge 0xa6588
movl -0x70(%rbp), %eax
shll %eax
movl %eax, -0x70(%rbp)
movl -0x64(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl -0x14(%rbp), %eax
jge 0xa6572
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x64(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x80(%rbp), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x74(%rbp)
movl -0x64(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl -0x74(%rbp), %eax
movl $0x7, %ecx
subl %edx, %ecx
sarl %cl, %eax
andl $0x1, %eax
orl -0x70(%rbp), %eax
movl %eax, -0x70(%rbp)
jmp 0xa6574
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xa6511
movslq -0x70(%rbp), %rax
movb -0x60(%rbp,%rax), %dl
movq -0x8(%rbp), %rax
movl -0x68(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x68(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0xa64ef
jmp 0xa65ac
movl -0x68(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xa65cf
movq -0x8(%rbp), %rax
movl -0x68(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x68(%rbp)
movslq %ecx, %rcx
movb $0x3d, (%rax,%rcx)
jmp 0xa65ac
movq -0x8(%rbp), %rax
movslq -0x68(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rdx
movl $0x5, %edi
leaq 0x23203(%rip), %rsi     # 0xc97ee
movb $0x0, %al
callq 0x95890
movl -0x68(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %edx
movl $0x3, %edi
leaq 0x234c8(%rip), %rsi     # 0xc9d06
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rax
movq 0x338(%rax), %rdi
addq $0x128, %rdi            # imm = 0x128
movslq -0xc(%rbp), %rax
imulq $0x128, %rax, %rax      # imm = 0x128
addq %rax, %rdi
movl 0x53205(%rip), %esi     # 0xf9a70
callq 0xa4dd0
movq -0x8(%rbp), %rax
addq $0x340, %rax            # imm = 0x340
movslq -0xc(%rbp), %rcx
imulq $0x820c, %rcx, %rcx     # imm = 0x820C
addq %rcx, %rax
movl $0x0, 0x204(%rax)
movq -0x8(%rbp), %rax
addq $0x340, %rax            # imm = 0x340
movslq -0xc(%rbp), %rcx
imulq $0x820c, %rcx, %rcx     # imm = 0x820C
addq %rcx, %rax
movb $0x0, 0x208(%rax)
movq -0x8(%rbp), %rax
addq $0x340, %rax            # imm = 0x340
movslq -0xc(%rbp), %rcx
imulq $0x820c, %rcx, %rcx     # imm = 0x820C
addq %rcx, %rax
movl $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x310, %rdi            # imm = 0x310
callq 0x9ad0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x308(%rax)
jne 0xa73cd
movq -0x10(%rbp), %rdi
addq $0x310, %rdi            # imm = 0x310
callq 0x95a0
movl $0x1, -0x4(%rbp)
jmp 0xa745b
movq -0x10(%rbp), %rax
movq 0x308(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x2279d(%rip), %rsi     # 0xc9b84
callq 0x91b0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xa743b
movq -0x20(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq 0x22781(%rip), %rsi     # 0xc9b89
movb $0x0, %al
callq 0x9750
cmpl $0x0, %eax
je 0xa742b
leaq -0x120(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9a60
cmpl $0x0, %eax
jne 0xa742b
jmp 0xa743b
jmp 0xa742d
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa73dc
movq -0x10(%rbp), %rdi
addq $0x310, %rdi            # imm = 0x310
callq 0x95a0
cmpq $0x0, -0x20(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0xd0, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x93d0
leaq -0xa8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpq $0x10, %rax
jae 0xa771f
movq -0xc0(%rbp), %rax
movl -0xb4(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0xa76ed
jmp 0xa7721
movl -0x8(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl -0x8(%rbp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0xa8(%rbp,%rax,8), %rcx
movq %rcx, -0xa8(%rbp,%rax,8)
movl -0x8(%rbp), %edi
addl $0x1, %edi
xorl %eax, %eax
movl %eax, %ecx
leaq -0xa8(%rbp), %rdx
leaq -0x28(%rbp), %r8
movq %rcx, %rsi
callq 0x9710
movl %eax, -0xac(%rbp)
cmpl $0x0, -0xac(%rbp)
jg 0xa778f
movl -0xac(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa77d4
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
xorl %ecx, %ecx
callq 0x9380
movl %eax, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xa77bf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xc4(%rbp)
jmp 0xa77cb
movl -0xb0(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jge 0xa8055
movl $0x0, -0x4(%rbp)
jmp 0xa814d
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rax
cmpl $0x2, (%rax)
jge 0xa806f
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xa8098
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa8160
cmpl $0x0, %eax
jne 0xa8096
movl $0x0, -0x4(%rbp)
jmp 0xa814d
jmp 0xa8098
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xa8146
movq -0x10(%rbp), %rax
addq $0x208, %rax            # imm = 0x208
movq -0x10(%rbp), %rcx
movslq 0x4(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x608(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rcx
movl $0x400, %eax            # imm = 0x400
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %edx
movq -0x18(%rbp), %rcx
callq 0x9fdc0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jne 0xa8113
movl -0x1c(%rbp), %edx
movl $0x5, %edi
leaq 0x2156a(%rip), %rsi     # 0xc966d
movb $0x0, %al
callq 0x95890
movl $0x0, -0x4(%rbp)
jmp 0xa814d
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movb $0x0, 0x208(%rax,%rcx)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa8180
movl %eax, -0x4(%rbp)
jmp 0xa814d
movl $0x1, -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::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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x608(%rax), %rdi
addq $0x128, %rdi            # imm = 0x128
movslq -0xc(%rbp), %rax
imulq $0x128, %rax, %rax      # imm = 0x128
addq %rax, %rdi
movl 0x516ab(%rip), %esi     # 0xf9a70
callq 0xa4dd0
movq -0x8(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movslq -0xc(%rbp), %rcx
imulq $0x408, %rcx, %rcx      # imm = 0x408
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movslq -0xc(%rbp), %rcx
imulq $0x408, %rcx, %rcx      # imm = 0x408
addq %rcx, %rax
movb $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movslq -0xc(%rbp), %rcx
imulq $0x408, %rcx, %rcx      # imm = 0x408
addq %rcx, %rax
movl $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::swapfile(bamboo::file_t*, bamboo::gtime_t, char*)
static void swapfile(file_t *file, gtime_t time, char *msg)
	{
		char openpath[MAXSTRPATH];

		tracet(3, "swapfile: fp=%d time=%s\n", file->fp, time_str(time, 0));

		/* return if old swap file open */
		if (file->fp_tmp || file->fp_tag_tmp) return;

		/* check path of new swap file */
		reppath(file->path, openpath, time, "", "");

		if (!strcmp(openpath, file->openpath)) {
			tracet(2, "swapfile: no need to swap %s\n", openpath);
			return;
		}
		/* save file pointer to temporary pointer */
		file->fp_tmp = file->fp;
		file->fp_tag_tmp = file->fp_tag;

		/* open new swap file */
		openfile_(file, time, msg);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x460, %rsp            # imm = 0x460
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x458(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x430(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x428(%rbp)
movq -0x430(%rbp), %rdi
movsd -0x428(%rbp), %xmm0
xorl %esi, %esi
callq 0x8f6d0
movq -0x458(%rbp), %rdx
movq %rax, %rcx
movl $0x3, %edi
leaq 0x21af2(%rip), %rsi     # 0xc9f9e
movb $0x0, %al
callq 0x95890
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xa84c9
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xa84ce
jmp 0xa859a
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
leaq -0x420(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x440(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x440(%rbp), %rdx
movsd -0x438(%rbp), %xmm0
leaq 0x147fe(%rip), %r8      # 0xbcd07
movq %r8, %rcx
callq 0x95e20
leaq -0x420(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x420, %rsi            # imm = 0x420
callq 0x9a60
cmpl $0x0, %eax
jne 0xa8549
leaq -0x420(%rbp), %rdx
movl $0x2, %edi
leaq 0x21a77(%rip), %rsi     # 0xc9fb7
movb $0x0, %al
callq 0x95890
jmp 0xa859a
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x450(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x448(%rbp)
movq -0x20(%rbp), %rdx
movq -0x450(%rbp), %rsi
movsd -0x448(%rbp), %xmm0
callq 0xa3bf0
addq $0x460, %rsp            # imm = 0x460
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::swapclose(bamboo::file_t*)
static void swapclose(file_t *file)
	{
		tracet(3, "swapclose: fp_tmp=%d\n", file->fp_tmp);

		if (file->fp_tmp) fclose(file->fp_tmp);
		if (file->fp_tag_tmp) fclose(file->fp_tag_tmp);
		file->fp_tmp = file->fp_tag_tmp = NULL;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
movl $0x3, %edi
leaq 0x21a05(%rip), %rsi     # 0xc9fd5
movb $0x0, %al
callq 0x95890
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xa85ef
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9770
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xa8607
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x9770
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %edx
leaq 0x21bc2(%rip), %rsi     # 0xca26b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x4, %rdx
leaq 0x21ba8(%rip), %rsi     # 0xca27b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x104(%rax), %edx
leaq 0x21b8c(%rip), %rsi     # 0xca28b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x118(%rax), %edx
leaq 0x21b70(%rip), %rsi     # 0xca29b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %edx
movl $0x5, %edi
leaq 0x22ffe(%rip), %rsi     # 0xcb780
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
cmpl $0x0, 0x81a74(%rax)
jne 0xa87d5
movq -0x10(%rbp), %rdi
addq $0x81a90, %rdi          # imm = 0x81A90
movzbl -0x11(%rbp), %esi
callq 0xa88c0
cmpl $0x0, %eax
jne 0xa87bb
movl $0x0, -0x4(%rbp)
jmp 0xa88af
movq -0x10(%rbp), %rax
movl $0x2, 0x81a74(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xa88af
movb -0x11(%rbp), %dl
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movl 0x81a74(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x81a74(%rsi)
movslq %ecx, %rcx
movb %dl, 0x81a90(%rax,%rcx)
movq -0x10(%rbp), %rax
cmpl $0x6, 0x81a74(%rax)
jne 0xa8869
movq -0x10(%rbp), %rdi
addq $0x81a90, %rdi          # imm = 0x81A90
addq $0x4, %rdi
callq 0xa8920
movzwl %ax, %eax
addl $0x8, %eax
movq -0x10(%rbp), %rcx
movl %eax, 0x81a78(%rcx)
cmpl $0x1000, %eax           # imm = 0x1000
jle 0xa8867
movq -0x10(%rbp), %rax
movl 0x81a78(%rax), %edx
movl $0x2, %edi
leaq 0x22f4d(%rip), %rsi     # 0xcb796
movb $0x0, %al
callq 0x8b980
movq -0x10(%rbp), %rax
movl $0x0, 0x81a74(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa88af
jmp 0xa8869
movq -0x10(%rbp), %rax
cmpl $0x6, 0x81a74(%rax)
jl 0xa888c
movq -0x10(%rbp), %rax
movl 0x81a74(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x81a78(%rcx), %eax
jge 0xa8895
movl $0x0, -0x4(%rbp)
jmp 0xa88af
movq -0x10(%rbp), %rax
movl $0x0, 0x81a74(%rax)
movq -0x10(%rbp), %rdi
callq 0xa8940
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)