LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: get_sockname
char* get_sockname(sock_t sock)
{
	static char buffer[INET6_ADDRSTRLEN + 16] = { 0 };
	char sip[INET6_ADDRSTRLEN];
	struct sockaddr_storage addr;
	socklen_t len = sizeof(addr);
	memset(&addr, 0, len);
	int err = getpeername(sock, (struct sockaddr*) & addr, &len);
	if (err != 0)
		return NULL;
	if (addr.ss_family == AF_INET) {
		struct sockaddr_in* s = (struct sockaddr_in*) & addr;
		inet_ntop(AF_INET, &s->sin_addr, sip, sizeof(sip));
		snprintf(buffer, sizeof(buffer), "%s:%d", sip,
			(int)(htons(s->sin_port) & 0xFFFF));
		return buffer;
	}
	else if (addr.ss_family == AF_INET6) {
		struct sockaddr_in6* s = (struct sockaddr_in6*) & addr;
		inet_ntop(AF_INET6, &s->sin6_addr, sip, sizeof(sip));
		snprintf(buffer, sizeof(buffer), "[%s]:%d", sip,
			(int)(htons(s->sin6_port) & 0xFFFF));
		return buffer;
	}
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x70(%rsi)
callq 0x2150
testl %eax, %eax
je 0x36cb
xorl %r14d, %r14d
jmp 0x3737
movzwl 0x10(%rsp), %edi
cmpl $0x2, %edi
je 0x36ed
cmpl $0xa, %edi
jne 0x36c6
leaq 0x18(%rsp), %rsi
leaq 0x3aba(%rip), %rbx      # 0x71a0
movl $0xa, %edi
jmp 0x36f9
leaq 0x14(%rsp), %rsi
leaq 0x3aa1(%rip), %rbx      # 0x719a
leaq 0x90(%rsp), %r15
movq %r15, %rdx
movl $0x2e, %ecx
callq 0x2220
movzwl 0x12(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %r8d
leaq 0x8b8e(%rip), %r14      # 0xc2b0
movl $0x3e, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2330
movq %r14, %rax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: parse_host_port
int parse_host_port(char* s, char** host, char** port, int* ai_family)
{
	char* p;
	int cnt = 0;

	/* ipv6 */
	if (*s == '[') {
		p = strrchr(s, ']');
		if (p) {
			*host = s + 1;
			*p = '\0';
			p++;
			if (*p == ':')
				* port = p + 1;
			else
				*port = NULL;
			*ai_family = AF_INET6;
			return 0;
		}
		else {
			return -1;
		}
	}

	p = strrchr(s, ':');
	if (p) {
		*port = p + 1;
		*p = '\0';
	}
	else {
		*port = NULL;
	}

	*host = s;
	*ai_family = AF_INET;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpb $0x5b, (%rdi)
jne 0x3796
movq %r12, %rdi
movl $0x5d, %esi
callq 0x2250
testq %rax, %rax
je 0x37b6
incq %r12
movq %r12, (%r15)
movb $0x0, (%rax)
movq %rax, %rcx
addq $0x2, %rcx
xorl %edx, %edx
cmpb $0x3a, 0x1(%rax)
cmoveq %rcx, %rdx
movq %rdx, (%r14)
movl $0xa, %eax
jmp 0x37cc
movq %r12, %rdi
movl $0x3a, %esi
callq 0x2250
testq %rax, %rax
je 0x37bd
movq %rax, %rcx
incq %rcx
movq %rcx, (%r14)
movb $0x0, (%rax)
jmp 0x37c4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x37d0
movq $0x0, (%r14)
movq %r12, (%r15)
movl $0x2, %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: host2addr
int host2addr(sockaddr_t* addr, const char* host, const char* port, int ai_family)
{
	struct addrinfo hints;
	struct addrinfo* addrinfo;
	int r;

	memset(&hints, 0, sizeof(hints));

	hints.ai_family = ai_family;
	hints.ai_socktype = SOCK_STREAM;

	r = getaddrinfo(host, port, &hints, &addrinfo);

	if (r != 0)
	{
		loge("retval=%d %s %s:%s\n",
			r, gai_strerror(r), host, port);
		return -1;
	}

	memcpy(&addr->addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
	addr->addrlen = (int)addrinfo->ai_addrlen;

	freeaddrinfo(addrinfo);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
movl %ecx, 0x4(%rdx)
movl $0x1, 0x8(%rdx)
leaq 0x8(%rsp), %rcx
movq %rsi, %rdi
movq %r14, %rsi
callq 0x22c0
testl %eax, %eax
je 0x3879
movl %eax, %r15d
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x38a2
movl %r15d, %edi
callq 0x22f0
movq %rax, %r10
subq $0x8, %rsp
leaq 0x38dc(%rip), %rsi      # 0x7128
leaq 0x3955(%rip), %rdx      # 0x71a8
leaq 0x3958(%rip), %r8       # 0x71b2
movl $0x3, %edi
movl $0xd8, %ecx
movl %r15d, %r9d
xorl %eax, %eax
pushq %r14
pushq %rbx
pushq %r10
callq 0x2e92
addq $0x20, %rsp
jmp 0x38a2
movq 0x8(%rsp), %rbx
movq 0x18(%rbx), %rsi
movl 0x10(%rbx), %edx
movq %r12, %rdi
callq 0x21a0
movl 0x10(%rbx), %eax
movl %eax, 0x80(%r12)
movq %rbx, %rdi
callq 0x22d0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: str2addr
int str2addr(
	const char* s, sockaddr_t* addr,
	const char* default_port)
{
	char* copy = strdup(s);
	char* host, * port;
	int ai_family;
	int r;

	if (parse_host_port(copy, &host, &port, &ai_family)) {
		free(copy);
		return -1;
	}

	if (!port || strlen(port) == 0)
		port = (char*)default_port;

	r = host2addr(addr, host, port, ai_family);

	free(copy);

	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
callq 0x2380
movq %rax, %rbx
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
leaq 0xc(%rsp), %rcx
movq %rax, %rdi
callq 0x3747
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3910
movq (%rsp), %rax
testq %rax, %rax
je 0x38f5
cmpb $0x0, (%rax)
jne 0x38f9
movq %r15, (%rsp)
movq 0x10(%rsp), %rsi
movq (%rsp), %rdx
movl 0xc(%rsp), %ecx
movq %r14, %rdi
callq 0x37dc
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2290
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: str2addrs
int str2addrs(
	const char* str,
	sockaddr_t* addrs,
	int max_num,
	int element_size,
	const char* default_port)
{
	char* s, * p, *saveptr = NULL;
	int i;
	sockaddr_t* addr;

	s = strdup(str);

	for (i = 0, p = strtok_r(s, ",", &saveptr);
		p && *p && i < max_num;
		p = strtok_r(NULL, ",", &saveptr)) {

		addr = (sockaddr_t*)(((char*)addrs) + (size_t)element_size * i);

		if (str2addr(p, addr, default_port)) {
			free(s);
			loge("resolve \"%s\" failed\n", str);
			return -1;
		}

		i++;
	}

	free(s);

	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r15
leaq 0x10(%rsp), %r14
movq $0x0, (%r14)
callq 0x2380
leaq 0x386e(%rip), %rsi      # 0x71c6
movq %rax, (%rsp)
movq %rax, %rdi
movq %r14, %rdx
callq 0x2370
testq %rax, %rax
je 0x39b9
movq %r15, 0x8(%rsp)
movslq %ebp, %r15
movslq %ebx, %rbp
xorl %r14d, %r14d
leaq 0x10(%rsp), %rbx
cmpb $0x0, (%rax)
je 0x39bc
cmpq %rbp, %r14
jge 0x39bc
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x38b1
testl %eax, %eax
jne 0x39d7
incq %r14
xorl %edi, %edi
leaq 0x381f(%rip), %rsi      # 0x71c6
movq %rbx, %rdx
callq 0x2370
addq %r15, %r13
testq %rax, %rax
jne 0x397f
jmp 0x39bc
xorl %r14d, %r14d
movq (%rsp), %rdi
callq 0x2290
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdi
callq 0x2290
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x39c5
leaq 0x372f(%rip), %rsi      # 0x7128
leaq 0x37c8(%rip), %rdx      # 0x71c8
leaq 0x37cb(%rip), %r8       # 0x71d2
movl $0x3, %edi
movl $0x111, %ecx            # imm = 0x111
movq 0x8(%rsp), %r9
xorl %eax, %eax
callq 0x2e92
jmp 0x39c5
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: str2proxies
int str2proxies(
	const char* str,
	proxy_t* proxies,
	int max_num)
{
	char* s, * p, *saveptr = NULL;
	int i;
	proxy_t* proxy;

	s = strdup(str);

	for (i = 0, p = strtok_r(s, ",", &saveptr);
		p && *p && i < max_num;
		p = strtok_r(NULL, ",", &saveptr)) {

		proxy = proxies + i;

		if (str2proxy(p, proxy)) {
			free(s);
			loge("resolve \"%s\" failed\n", str);
			return -1;
		}

		i++;
	}

	free(s);

	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq $0x0, (%r14)
callq 0x2380
movq %rax, %r15
leaq 0x34e5(%rip), %rsi      # 0x71c6
movq %rax, %rdi
movq %r14, %rdx
callq 0x2370
testq %rax, %rax
je 0x3d3f
movq %rbx, 0x8(%rsp)
movslq %ebp, %rbx
xorl %r14d, %r14d
leaq 0x34c3(%rip), %r13      # 0x71c6
leaq 0x10(%rsp), %rbp
cmpb $0x0, (%rax)
je 0x3d42
cmpq %rbx, %r14
jge 0x3d42
movq %rax, %rdi
movq %r12, %rsi
callq 0x3a1f
testl %eax, %eax
jne 0x3d5c
incq %r14
xorl %edi, %edi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x2370
addq $0xf8, %r12
testq %rax, %rax
jne 0x3d08
jmp 0x3d42
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x2290
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x2290
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x3d4a
leaq 0x33ab(%rip), %rsi      # 0x7128
leaq 0x348f(%rip), %rdx      # 0x7213
leaq 0x3447(%rip), %r8       # 0x71d2
movl $0x3, %edi
movl $0x1a8, %ecx            # imm = 0x1A8
movq 0x8(%rsp), %r9
xorl %eax, %eax
callq 0x2e92
jmp 0x3d4a
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: str2listens
int str2listens(
	const char* str,
	listen_t * listens,
	int max_num,
	int element_size,
	const char* default_port)
{
	int listen_num;

	memset(listens, 0, (size_t)element_size * max_num);

	listen_num = str2addrs(
		str,
		&listens[0].addr,
		max_num,
		element_size,
		default_port);

	if (listen_num == -1) {
		loge("parse \"%s\" failed\n",
			str);
		return -1;
	}

	return listen_num;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rsi, %r15
movq %rdi, %rbx
movslq %ecx, %r12
movslq %edx, %r13
movq %r12, %rdx
imulq %r13, %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x2110
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
movl %r12d, %ecx
movq %r14, %r8
callq 0x3925
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x3e23
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x3e23
leaq 0x3327(%rip), %rsi      # 0x7128
leaq 0x3417(%rip), %rdx      # 0x721f
leaq 0x341c(%rip), %r8       # 0x722b
movl $0x3, %edi
movl $0x1c8, %ecx            # imm = 0x1C8
movq %rbx, %r9
xorl %eax, %eax
callq 0x2e92
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: udp_listen
int udp_listen(listen_t* ctx)
{
	sockaddr_t* addr;
	struct sockaddr* sockaddr;
	sock_t sock;

	addr = &ctx->addr;
	sockaddr = (struct sockaddr*)(&addr->addr);

	sock = socket(sockaddr->sa_family, SOCK_DGRAM, IPPROTO_UDP);

	if (sock == -1) {
		loge("create socket error. errno=%d, %s\n", errno, strerror(errno));
		return -1;
	}

	if (setnonblock(sock) != 0) {
		loge("set sock non-block failed\n");
		close(sock);
		return -1;
	}

	if (setreuseaddr(sock) != 0) {
		loge("set sock reuse address failed\n");
		close(sock);
		return -1;
	}

#ifdef WINDOWS
	disable_udp_connreset(sock);
#endif

	if (bind(sock, sockaddr, addr->addrlen) != 0) {
		loge("bind() error: %s errno=%d, %s\n",
			get_sockaddrname(addr), errno, strerror(errno));
		close(sock);
		return -1;
	}

	ctx->usock = sock;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movzwl (%rdi), %edi
movl $0x2, %esi
movl $0x11, %edx
callq 0x20a0
cmpl $-0x1, %eax
je 0x408c
movl %eax, %ebx
movl %eax, %edi
callq 0x33cf
testl %eax, %eax
je 0x40e7
xorl %eax, %eax
callq 0x2e59
cmpl $0x3, (%rax)
jl 0x4124
leaq 0x30b9(%rip), %rsi      # 0x7128
leaq 0x324d(%rip), %rdx      # 0x72c3
leaq 0x31cc(%rip), %r8       # 0x7249
movl $0x3, %edi
movl $0x20f, %ecx            # imm = 0x20F
jmp 0x411d
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x4130
callq 0x2030
movl (%rax), %ebp
movl %ebp, %edi
callq 0x20c0
movq %rax, %r10
subq $0x8, %rsp
leaq 0x306b(%rip), %rsi      # 0x7128
leaq 0x31ff(%rip), %rdx      # 0x72c3
leaq 0x3da2(%rip), %r8       # 0x7e6d
movl $0x3, %edi
movl $0x20a, %ecx            # imm = 0x20A
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
callq 0x2e92
addq $0x10, %rsp
jmp 0x4130
movl %ebx, %edi
callq 0x3477
testl %eax, %eax
je 0x4137
xorl %eax, %eax
callq 0x2e59
cmpl $0x3, (%rax)
jl 0x4124
leaq 0x3023(%rip), %rsi      # 0x7128
leaq 0x31b7(%rip), %rdx      # 0x72c3
leaq 0x3151(%rip), %r8       # 0x7264
movl $0x3, %edi
movl $0x215, %ecx            # imm = 0x215
xorl %eax, %eax
callq 0x2e92
movl %ebx, %edi
callq 0x23b0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl 0x80(%r14), %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x2070
testl %eax, %eax
je 0x41ad
xorl %eax, %eax
callq 0x2e59
cmpl $0x3, (%rax)
jl 0x4124
movq %r14, %rdi
callq 0x35d9
callq 0x2030
movl (%rax), %r14d
movl %r14d, %edi
callq 0x20c0
movq %rax, %r10
leaq 0x2fae(%rip), %rsi      # 0x7128
leaq 0x3142(%rip), %rdx      # 0x72c3
leaq 0x30fb(%rip), %r8       # 0x7283
leaq 0x80e1(%rip), %r9       # 0xc270
movl $0x3, %edi
movl $0x220, %ecx            # imm = 0x220
xorl %eax, %eax
pushq %r10
pushq %r14
callq 0x2e92
addq $0x10, %rsp
jmp 0x4124
movl %ebx, 0x8c(%r14)
xorl %ebx, %ebx
jmp 0x4130
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: init_listens
int init_listens(listen_t* listens, int listen_num)
{
	int i, num = listen_num, n = 0;
	listen_t* listen;

	for (i = 0; i < num; i++) {
		listen = listens + i;
		if (tcp_listen(listen) == 0) {
			n++;
		}
		if (udp_listen(listen) == 0) {
			n++;
		}
	}

	if (n == 0)
		return -1;

	return 0;
}

// Assembly:
testl %esi, %esi
jle 0x420b
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x3e34
xorl %r15d, %r15d
testl %eax, %eax
sete %r15b
movq %rbx, %rdi
callq 0x4029
cmpl $0x1, %eax
adcl %r15d, %ebp
addq $0x90, %rbx
decq %r14
jne 0x41ce
xorl %eax, %eax
cmpl $0x1, %ebp
sbbl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: print_listens
void print_listens(const listen_t* listens, int listen_num)
{
	int i;
	for (i = 0; i < listen_num; i++) {
		logn("listen on %s [tcp sock=%d, udp sock=%d]\n",
			get_sockaddrname(&listens[i].addr),
			(int)listens[i].sock,
			(int)listens[i].usock);
	}
}

// Assembly:
testl %esi, %esi
jle 0x42a6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %ebp
leaq 0x2ef8(%rip), %r14      # 0x7128
leaq 0x3097(%rip), %r15      # 0x72ce
leaq 0x309e(%rip), %r12      # 0x72dc
leaq 0x802b(%rip), %r13      # 0xc270
xorl %eax, %eax
callq 0x2e59
cmpl $0x5, (%rax)
jl 0x428c
movq %rbx, %rdi
callq 0x35d9
movl 0x88(%rbx), %r10d
movl 0x8c(%rbx), %r11d
movl $0x5, %edi
movq %r14, %rsi
movq %r15, %rdx
movl $0x246, %ecx            # imm = 0x246
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x2e92
addq $0x10, %rsp
addq $0x90, %rbx
decq %rbp
jne 0x4245
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: tcp_send
int tcp_send(sock_t sock, stream_t* s)
{
	int rsize = stream_rsize(s);
	int nsend;

	if (rsize == 0)
		return 0;

	nsend = send(sock, s->array + s->pos, rsize, 0);
	if (nsend == -1) {
		int err = errno;
		if (!is_eagain(err)) {
			loge("errno=%d, %s \n",
				err, strerror(err));
			return -1;
		}
		return 0;
	}
	else {
		s->pos += nsend;
		logv("send %d bytes\n", nsend);
		if (stream_quake(s)) {
			loge("stream_quake()\n");
			return -1;
		}
		return nsend;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl 0x8(%rsi), %eax
movslq 0xc(%rsi), %rsi
xorl %ebx, %ebx
cmpl %esi, %eax
jne 0x4525
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
subl %esi, %eax
addq (%r14), %rsi
movslq %eax, %rdx
xorl %ecx, %ecx
callq 0x20f0
movq %rax, %rbx
cmpl $-0x1, %ebx
je 0x45c1
addl %ebx, 0xc(%r14)
xorl %eax, %eax
callq 0x2e59
cmpl $0x8, (%rax)
jl 0x4579
leaq 0x2bd1(%rip), %rsi      # 0x7128
leaq 0x2e25(%rip), %rdx      # 0x7383
leaq 0x2e27(%rip), %r8       # 0x738c
movl $0x8, %edi
movl $0x292, %ecx            # imm = 0x292
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2e92
movq %r14, %rdi
callq 0x4c7d
testl %eax, %eax
je 0x451a
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x451a
leaq 0x2b8b(%rip), %rsi      # 0x7128
leaq 0x2ddf(%rip), %rdx      # 0x7383
leaq 0x2df0(%rip), %r8       # 0x739b
movl $0x3, %edi
movl $0x294, %ecx            # imm = 0x294
xorl %eax, %eax
callq 0x2e92
jmp 0x451a
callq 0x2030
movl (%rax), %ebp
cmpl $0xb, %ebp
je 0x4629
movl $0x0, %ebx
cmpl $0x73, %ebp
je 0x451a
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x451a
movl %ebp, %edi
callq 0x20c0
movq %rax, (%rsp)
leaq 0x2b26(%rip), %rsi      # 0x7128
leaq 0x2d7a(%rip), %rdx      # 0x7383
leaq 0x3985(%rip), %r8       # 0x7f95
movl $0x3, %edi
movl $0x28b, %ecx            # imm = 0x28B
movl %ebp, %r9d
xorl %eax, %eax
callq 0x2e92
jmp 0x451a
xorl %ebx, %ebx
jmp 0x451a
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: tcp_recv
int tcp_recv(sock_t sock, char* buf, int buflen)
{
	int nread;

	nread = recv(sock, buf, buflen, 0);
	if (nread == -1) {
		int err = errno;
		if (!is_eagain(err)) {
			loge("errno=%d, %s\n",
				err, strerror(err));
			return -1;
		}
		return 0;
	}
	else if (nread == 0) {
		logd("connection closed by peer\n");
		return -1;
	}
	else {
		logv("recv %d bytes\n", nread);

		return nread;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movslq %edx, %rdx
xorl %ecx, %ecx
callq 0x20b0
movq %rax, %rbx
testl %ebx, %ebx
je 0x46ac
cmpl $-0x1, %ebx
jne 0x46e5
callq 0x2030
movl (%rax), %ebp
xorl %ebx, %ebx
cmpl $0xb, %ebp
je 0x471a
cmpl $0x73, %ebp
je 0x471a
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x471a
movl %ebp, %edi
callq 0x20c0
movq %rax, (%rsp)
leaq 0x2a99(%rip), %rsi      # 0x7128
leaq 0x2d15(%rip), %rdx      # 0x73ab
leaq 0x3999(%rip), %r8       # 0x8036
movl $0x3, %edi
movl $0x2a4, %ecx            # imm = 0x2A4
movl %ebp, %r9d
jmp 0x4713
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x7, (%rax)
jl 0x471a
leaq 0x2a64(%rip), %rsi      # 0x7128
leaq 0x2ce0(%rip), %rdx      # 0x73ab
leaq 0x2ce2(%rip), %r8       # 0x73b4
movl $0x7, %edi
movl $0x2aa, %ecx            # imm = 0x2AA
xorl %eax, %eax
callq 0x2e92
jmp 0x471a
xorl %eax, %eax
callq 0x2e59
cmpl $0x8, (%rax)
jl 0x471a
leaq 0x2a30(%rip), %rsi      # 0x7128
leaq 0x2cac(%rip), %rdx      # 0x73ab
leaq 0x2cc9(%rip), %r8       # 0x73cf
movl $0x8, %edi
movl $0x2ae, %ecx            # imm = 0x2AE
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2e92
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: udp_send
int udp_send(sock_t sock, stream_t* s,
	const struct sockaddr* to, int tolen)
{
	int nsend;
	int rsize = stream_rsize(s);

	nsend = sendto(sock, s->array + s->pos, rsize, 0, to, tolen);
	if (nsend == -1) {
		loge("to=%s, errno=%d, %s\n",
			get_addrname(to), errno, strerror(errno));
		return -1;
	}
	return nsend;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r9d
movq %rdx, %r14
movslq 0x8(%rsi), %rdx
movslq 0xc(%rsi), %rax
subq %rax, %rdx
addq (%rsi), %rax
movq %rax, %rsi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2050
movq %rax, %rbx
cmpl $-0x1, %ebx
jne 0x47b1
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x47b1
movq %r14, %rdi
callq 0x35d9
callq 0x2030
movl (%rax), %r14d
movl %r14d, %edi
callq 0x20c0
movq %rax, %r10
leaq 0x29a5(%rip), %rsi      # 0x7128
leaq 0x2c54(%rip), %rdx      # 0x73de
leaq 0x389e(%rip), %r8       # 0x802f
leaq 0x7ad8(%rip), %r9       # 0xc270
movl $0x3, %edi
movl $0x2bd, %ecx            # imm = 0x2BD
xorl %eax, %eax
pushq %r10
pushq %r14
callq 0x2e92
addq $0x10, %rsp
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: udp_recv
int udp_recv(sock_t sock, char* buf, int buflen,
	struct sockaddr* from, int* fromlen)
{
	int nread;

	nread = recvfrom(sock, buf, buflen, 0, from, fromlen);
	if (nread > 0) {
		return nread;
	}
	else {
		loge("errno=%d, %s\n", errno, strerror(errno));
		return -1;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %r8, %r9
movq %rcx, %r8
movslq %edx, %rdx
xorl %ecx, %ecx
callq 0x2180
movq %rax, %rbx
testl %ebx, %ebx
jg 0x4821
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x4821
callq 0x2030
movl (%rax), %ebp
movl %ebp, %edi
callq 0x20c0
movq %rax, (%rsp)
leaq 0x2929(%rip), %rsi      # 0x7128
leaq 0x2be1(%rip), %rdx      # 0x73e7
leaq 0x3829(%rip), %r8       # 0x8036
movl $0x3, %edi
movl $0x2cd, %ecx            # imm = 0x2CD
movl %ebp, %r9d
xorl %eax, %eax
callq 0x2e92
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: conn_new
conn_t* conn_new(sock_t sock)
{
	conn_t* conn = (conn_t*)malloc(sizeof(conn_t));
	if (!conn) {
		loge("alloc\n");
		return NULL;
	}

	if (conn_init(conn, sock)) {
		free(conn);
		loge("conn_init() error\n");
		return NULL;
	}

	return conn;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x68, %edi
callq 0x22e0
testq %rax, %rax
je 0x4888
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
callq 0x48c8
testl %eax, %eax
je 0x48be
movq %rbx, %rdi
callq 0x2290
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2e59
cmpl $0x3, (%rax)
jl 0x48be
leaq 0x28bc(%rip), %rsi      # 0x7128
leaq 0x2b7d(%rip), %rdx      # 0x73f0
leaq 0x2b86(%rip), %r8       # 0x7400
xorl %ebx, %ebx
movl $0x3, %edi
movl $0x2dc, %ecx            # imm = 0x2DC
jmp 0x48b7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2e59
cmpl $0x3, (%rax)
jl 0x48be
leaq 0x288b(%rip), %rsi      # 0x7128
leaq 0x2b4c(%rip), %rdx      # 0x73f0
leaq 0x2b4e(%rip), %r8       # 0x73f9
xorl %ebx, %ebx
movl $0x3, %edi
movl $0x2d6, %ecx            # imm = 0x2D6
xorl %eax, %eax
callq 0x2e92
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: conn_init
int conn_init(conn_t* conn, sock_t sock)
{
	memset(conn, 0, sizeof(conn_t));

	if (stream_init(&conn->rs)) {
		loge("stream_init() error\n");
		return -1;
	}

	if (stream_init(&conn->ws)) {
		stream_free(&conn->rs);
		loge("stream_init() error\n");
		return -1;
	}

	conn->sock = sock;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x60(%rdi)
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x4b68
testl %eax, %eax
je 0x4936
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x4989
leaq 0x280c(%rip), %rsi      # 0x7128
leaq 0x2af0(%rip), %rdx      # 0x7413
leaq 0x2af3(%rip), %r8       # 0x741d
movl $0x3, %edi
movl $0x2e8, %ecx            # imm = 0x2E8
jmp 0x497b
leaq 0x20(%r14), %rdi
callq 0x4b68
testl %eax, %eax
je 0x4984
movq %r15, %rdi
callq 0x4b79
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x4989
leaq 0x27c5(%rip), %rsi      # 0x7128
leaq 0x2aa9(%rip), %rdx      # 0x7413
leaq 0x2aac(%rip), %r8       # 0x741d
movl $0x3, %edi
movl $0x2ee, %ecx            # imm = 0x2EE
xorl %eax, %eax
callq 0x2e92
jmp 0x4989
movl %ebx, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: conn_free
void conn_free(conn_t* conn)
{
	if (conn == NULL)
		return;
	if (conn->sock) {
		close(conn->sock);
		conn->sock = 0;
	}
	stream_free(&conn->rs);
	stream_free(&conn->ws);
}

// Assembly:
testq %rdi, %rdi
je 0x49c1
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
je 0x49ab
callq 0x23b0
movl $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
callq 0x4b79
addq $0x20, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x4b79
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: peer_new
peer_t* peer_new(sock_t sock, int listen)
{
	peer_t* peer = (peer_t*)malloc(sizeof(peer_t));
	if (!peer) {
		loge("alloc\n");
		return NULL;
	}

	if (peer_init(peer, sock, listen)) {
		free(peer);
		loge("peer_init() error\n");
		return NULL;
	}

	return peer;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x80, %edi
callq 0x22e0
testq %rax, %rax
je 0x4a39
movq %rax, %rbx
movq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x4a77
testl %eax, %eax
je 0x4a6f
movq %rbx, %rdi
callq 0x2290
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2e59
cmpl $0x3, (%rax)
jl 0x4a6f
leaq 0x270b(%rip), %rsi      # 0x7128
leaq 0x2a0e(%rip), %rdx      # 0x7432
leaq 0x2a10(%rip), %r8       # 0x743b
xorl %ebx, %ebx
movl $0x3, %edi
movl $0x313, %ecx            # imm = 0x313
jmp 0x4a68
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2e59
cmpl $0x3, (%rax)
jl 0x4a6f
leaq 0x26da(%rip), %rsi      # 0x7128
leaq 0x29dd(%rip), %rdx      # 0x7432
leaq 0x299d(%rip), %r8       # 0x73f9
xorl %ebx, %ebx
movl $0x3, %edi
movl $0x30d, %ecx            # imm = 0x30D
xorl %eax, %eax
callq 0x2e92
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/netutils.c
// Function: peer_init
int peer_init(peer_t* peer, sock_t sock, int listen)
{
	memset(peer, 0, sizeof(peer_t));

	if (conn_init(&peer->conn, sock)) {
		loge("conn_init() error\n");
		return -1;
	}

	dllist_init(&peer->reqs);

	peer->listen = listen;

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
callq 0x48c8
testl %eax, %eax
je 0x4ae4
xorl %eax, %eax
callq 0x2e59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0x4af6
leaq 0x2665(%rip), %rsi      # 0x7128
leaq 0x2984(%rip), %rdx      # 0x744e
leaq 0x292f(%rip), %r8       # 0x7400
movl $0x3, %edi
movl $0x31f, %ecx            # imm = 0x31F
xorl %eax, %eax
callq 0x2e92
jmp 0x4af6
leaq 0x70(%r14), %rax
movq %rax, 0x70(%r14)
movq %rax, 0x78(%r14)
movl %ebx, 0x68(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_seek
int stream_seek(stream_t *stream, int offset, int whence)
{
	switch (whence) {
	case SEEK_CUR:
		offset += stream->pos;
		break;
	case SEEK_END:
		offset = stream->size - offset;
		break;
	case SEEK_SET:
	default:
		break;
	}
	if (offset < 0 || offset > stream->size)
		return -1;
	stream->pos = offset;
	return 0;
}

// Assembly:
cmpl $0x2, %edx
je 0x4ba8
cmpl $0x1, %edx
jne 0x4baf
addl 0xc(%rdi), %esi
jmp 0x4baf
movl 0x8(%rdi), %eax
subl %esi, %eax
movl %eax, %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %esi, %esi
js 0x4bc2
cmpl 0x8(%rdi), %esi
jg 0x4bc2
movl %esi, 0xc(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_shrink
int stream_shrink(stream_t *stream)
{
	char *newarray;
	int rsize = stream_rsize(stream);
	if (rsize == 0)
	{
		free(stream->array);
		memset(stream, 0, sizeof(stream_t));
		return 0;
	}
	
	if (rsize == stream->cap)
		return 0;

	if (stream->pos == 0) {
		newarray = realloc(stream->array, rsize);
		if (newarray == NULL)
			return -1;
		stream->array = newarray;
		stream->cap = rsize;
		return 0;
	}

	newarray = (char*)malloc(rsize);
	if (newarray == NULL)
		return -1;
	memcpy(newarray, stream->array + stream->pos, rsize);
	free(stream->array);
	stream->array = newarray;
	stream->cap = rsize;
	stream->size = rsize;
	stream->pos = 0;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x8(%rdi), %ebp
movslq 0xc(%rdi), %r15
subl %r15d, %ebp
jne 0x4bf8
movq (%r14), %rdi
callq 0x2290
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
xorl %ebx, %ebx
jmp 0x4c6c
xorl %ebx, %ebx
cmpl 0x10(%r14), %ebp
je 0x4c6c
testl %r15d, %r15d
je 0x4c4e
movslq %ebp, %r13
movq %r13, %rdi
callq 0x22e0
testq %rax, %rax
je 0x4c67
movq %rax, %r12
movq (%r14), %rax
movq %rax, (%rsp)
addq %rax, %r15
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x21a0
movq (%rsp), %rdi
callq 0x2290
movq %r12, (%r14)
movl %ebp, 0x10(%r14)
movl %ebp, 0x8(%r14)
movl $0x0, 0xc(%r14)
jmp 0x4c6c
movq (%r14), %rdi
movslq %ebp, %rsi
callq 0x2350
testq %rax, %rax
je 0x4c67
movq %rax, (%r14)
movl %ebp, 0x10(%r14)
jmp 0x4c6c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_quake
int stream_quake(stream_t* stream)
{
	if (stream->pos > 0) {
		int size = stream_rsize(stream);
		if (size > 0) {
			memmove(stream->array, stream->array + stream->pos, size);
			stream->size = size;
			stream->pos = 0;
		}
		else {
			stream->size = 0;
			stream->pos = 0;
		}
	}

	return 0;
}

// Assembly:
movslq 0xc(%rdi), %rsi
testq %rsi, %rsi
jle 0x4cb4
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %ebp
subl %esi, %ebp
jle 0x4ca2
movq (%rbx), %rdi
addq %rdi, %rsi
movl %ebp, %edx
callq 0x2340
jmp 0x4ca4
xorl %ebp, %ebp
movl %ebp, 0x8(%rbx)
movl $0x0, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_set_cap
int stream_set_cap(stream_t *stream, int cap)
{
	char *newarray;

	if (stream->cap == cap)
		return 0;

	if (stream->cap > cap && stream->cap <= (cap + cap * 4 / 10))
		return 0;

	newarray = realloc(stream->array, cap);
	if (newarray == NULL)
		return -1;
	stream->array = newarray;
	stream->cap = cap;
	if (stream->size > cap)
		stream->size = cap;
	if (stream->pos > cap)
		stream->pos = cap;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x10(%rdi), %eax
xorl %ebx, %ebx
cmpl %esi, %eax
je 0x4d25
movl %esi, %r14d
movq %rdi, %r15
jle 0x4cf3
leal (,%r14,4), %ecx
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %r14d, %ecx
cmpl %ecx, %eax
jle 0x4d25
movq (%r15), %rdi
movslq %r14d, %rsi
callq 0x2350
testq %rax, %rax
je 0x4d20
movq %rax, (%r15)
movl %r14d, 0x10(%r15)
cmpl %r14d, 0x8(%r15)
jle 0x4d14
movl %r14d, 0x8(%r15)
cmpl %r14d, 0xc(%r15)
jle 0x4d25
movl %r14d, 0xc(%r15)
jmp 0x4d25
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_write
int stream_write(stream_t *stream, const char *s, int n)
{
	if (stream_rcap(stream) < n) {
		if (stream_set_cap(stream, stream->pos + align(n)))
			return -1;
	}
	memcpy(stream->array + stream->pos, s, n);
	stream->pos += n;
	stream->size += n;
	return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl 0xc(%rdi), %eax
movl 0x10(%rdi), %ecx
subl %eax, %ecx
cmpl %edx, %ecx
jge 0x4d63
movl %ebx, %ecx
orl $0x3, %ecx
leal (%rcx,%rax), %esi
incl %esi
movq %r14, %rdi
callq 0x4cb7
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4d7f
movslq 0xc(%r14), %rdi
addq (%r14), %rdi
movslq %ebx, %rdx
movq %r15, %rsi
callq 0x21a0
addl %ebx, 0xc(%r14)
addl %ebx, 0x8(%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_writes
int stream_writes(stream_t* stream, const char* s, int n)
{
	if (stream_rcap(stream) < (n+1)) {
		if (stream_set_cap(stream, stream->pos + align(n+1)))
			return -1;
	}
	memcpy(stream->array + stream->pos, s, n);
	stream->pos += n;
	stream->size += n;
	stream->array[stream->pos] = '\0';
	return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl 0xc(%rdi), %eax
movl 0x10(%rdi), %ecx
subl %eax, %ecx
cmpl %edx, %ecx
jg 0x4dbf
leal 0x1(%rbx), %ecx
orl $0x3, %ecx
leal (%rcx,%rax), %esi
incl %esi
movq %r14, %rdi
callq 0x4cb7
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4dec
movslq 0xc(%r14), %rdi
addq (%r14), %rdi
movslq %ebx, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x21a0
movslq 0xc(%r14), %rax
addq %r12, %rax
movl %eax, 0xc(%r14)
addl %ebx, 0x8(%r14)
movq (%r14), %rcx
movb $0x0, (%rcx,%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_writess
int stream_writess(stream_t *dst, stream_t *src, int n)
{
	if (stream_rsize(src) < n)
		n = src->size - src->pos;

	if (stream_rcap(dst) < n) {
		if (stream_set_cap(dst, dst->pos + align(n)))
			return -1;
	}

	memcpy(dst->array + dst->pos, src->array + src->pos, n);
	dst->pos += n;
	dst->size += n;
	src->pos += n;
	return n;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl 0x8(%rsi), %ebp
subl 0xc(%rsi), %ebp
movq %rdi, %r14
cmpl %edx, %ebp
cmovgel %edx, %ebp
movl 0xc(%rdi), %eax
movl 0x10(%rdi), %ecx
subl %eax, %ecx
cmpl %ebp, %ecx
jge 0x4e36
movl %ebp, %ecx
orl $0x3, %ecx
leal (%rax,%rcx), %esi
incl %esi
movq %r14, %rdi
callq 0x4cb7
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4e59
movslq 0xc(%r14), %rdi
addq (%r14), %rdi
movslq 0xc(%rbx), %rsi
addq (%rbx), %rsi
movslq %ebp, %rdx
callq 0x21a0
addl %ebp, 0xc(%r14)
addl %ebp, 0x8(%r14)
addl %ebp, 0xc(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_read
int stream_read(stream_t *stream, char *dst, int n)
{
	if (stream_rsize(stream) < n)
		n = stream->size - stream->pos;
	memcpy(dst, stream->array + stream->pos, n);
	stream->pos += n;
	return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %ecx
movslq 0xc(%rdi), %rax
subl %eax, %ecx
cmpl %edx, %ecx
cmovgel %edx, %ecx
movq %rsi, %rdi
addq (%rbx), %rax
movslq %ecx, %r14
movq %rax, %rsi
movq %r14, %rdx
callq 0x21a0
addl %r14d, 0xc(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_writei
int stream_writei(stream_t *stream, int v, int nb)
{
	int i;
	if (stream_rcap(stream) < nb) {
		if (stream_set_cap(stream, stream->pos + align(nb)))
			return -1;
	}
	for (i = 0;
		i < nb && stream->size < stream->cap;
		i++, stream->size++) {
		stream->array[stream->pos++] = ((v >> ((nb - i - 1) * 8)) & 0xFF);
	}
	return i;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl 0xc(%rdi), %eax
movl 0x10(%rdi), %ecx
subl %eax, %ecx
cmpl %edx, %ecx
jge 0x4eca
movl %ebx, %ecx
orl $0x3, %ecx
leal (%rcx,%rax), %esi
incl %esi
movq %r14, %rdi
callq 0x4cb7
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4f0a
testl %ebx, %ebx
jle 0x4f08
leal -0x8(,%rbx,8), %ecx
xorl %eax, %eax
movl 0x8(%r14), %edx
cmpl 0x10(%r14), %edx
jge 0x4f0a
movl %ebp, %edx
sarl %cl, %edx
movq (%r14), %rsi
movslq 0xc(%r14), %rdi
leal 0x1(%rdi), %r8d
movl %r8d, 0xc(%r14)
movb %dl, (%rsi,%rdi)
incl 0x8(%r14)
incl %eax
addl $-0x8, %ecx
cmpl %eax, %ebx
jne 0x4ed7
movl %ebx, %eax
jmp 0x4f0a
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_writell
int stream_writell(stream_t *stream, long long v, int nb)
{
	int i;
	if (stream_rcap(stream) < nb) {
		if (stream_set_cap(stream, stream->pos + align(nb)))
			return -1;
	}
	for (i = 0;
		i < nb && stream->size < stream->cap;
		i++, stream->size++) {
		stream->array[stream->pos++] = (char)((v >> ((nb - i - 1) * 8)) & 0xFF);
	}
	return i;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movl 0xc(%rdi), %eax
movl 0x10(%rdi), %ecx
subl %eax, %ecx
cmpl %edx, %ecx
jge 0x4f47
movl %r15d, %ecx
orl $0x3, %ecx
leal (%rcx,%rax), %esi
incl %esi
movq %r14, %rdi
callq 0x4cb7
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4f91
testl %r15d, %r15d
jle 0x4f8f
movl %r15d, %edx
leal -0x8(,%r15,8), %ecx
xorl %eax, %eax
movl 0x8(%r14), %esi
cmpl 0x10(%r14), %esi
jge 0x4f91
movq %rbx, %rsi
sarq %cl, %rsi
movq (%r14), %rdi
movslq 0xc(%r14), %r8
leal 0x1(%r8), %r9d
movl %r9d, 0xc(%r14)
movb %sil, (%rdi,%r8)
incl 0x8(%r14)
incq %rax
addl $-0x8, %ecx
cmpq %rax, %rdx
jne 0x4f59
movl %edx, %eax
jmp 0x4f91
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_seti
int stream_seti(stream_t *stream, int position, int v, int nb)
{
	int i;
	for (i = 0;
		i < nb && position < stream->cap;
		i++, position++) {
		stream->array[position] = ((v >> ((nb - i - 1) * 8)) & 0xFF);
	}
	return i;
}

// Assembly:
testl %ecx, %ecx
jle 0x4fd2
movl %ecx, %r8d
movslq %esi, %rsi
leal -0x8(,%r8,8), %ecx
xorl %eax, %eax
movslq 0x10(%rdi), %r9
cmpq %r9, %rsi
jge 0x4fd4
movl %edx, %r9d
sarl %cl, %r9d
movq (%rdi), %r10
movb %r9b, (%r10,%rsi)
incl %eax
incq %rsi
addl $-0x8, %ecx
cmpl %eax, %r8d
jne 0x4fab
movl %r8d, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_geti
int stream_geti(stream_t* stream, int position, int nb)
{
	int i, v = 0;
	for (i = 0; i < nb; i++, position++) {
		v <<= 8;
		v |= (stream->array[position] & 0xFF);
	}
	return v;
}

// Assembly:
testl %edx, %edx
jle 0x4ff6
movslq %esi, %rcx
addq (%rdi), %rcx
movl %edx, %edx
xorl %esi, %esi
xorl %eax, %eax
shll $0x8, %eax
movzbl (%rcx,%rsi), %edi
orl %edi, %eax
incq %rsi
cmpl %esi, %edx
jne 0x4fe5
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_vwritef
int stream_vwritef(stream_t *stream, const char *fmt, va_list args)
{
	int cnt, sz;
	char *buf;
	va_list ap_try;

	sz = 128;
	buf = (char*)alloca(sz);
	if (!buf) return -1;
try_print:
	va_copy(ap_try, args);
	cnt = vsnprintf(buf, sz, fmt, ap_try);
	va_end(ap_try);
	if (cnt >= sz) {
		sz *= 2;
		buf = (char*)alloca(sz);
		if (!buf) return -1;
		goto try_print;
	}
	if (cnt < 0)
		return -1;

	if (stream_writes(stream, buf, cnt) != cnt) {
		return -1;
	}

	return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq 0x10(%rdx), %rax
leaq -0x50(%rbp), %rcx
movq %rax, 0x10(%rcx)
movups (%rdx), %xmm0
movaps %xmm0, (%rcx)
leaq -0xd0(%rbp), %r12
movl $0x80, %esi
movq %r12, %rdi
movq %r13, %rdx
callq 0x2130
cmpl $0x80, %eax
jge 0x504a
movl %eax, %ebx
jmp 0x509d
movq %r15, -0x30(%rbp)
movq %r13, -0x38(%rbp)
movl $0x80, %r13d
addl %r13d, %r13d
movslq %r13d, %r15
movq %rsp, %r12
leaq 0xf(%r15), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq 0x10(%r14), %rax
movq %rax, -0x40(%rbp)
movups (%r14), %xmm0
movaps %xmm0, -0x50(%rbp)
movq %r12, %rdi
movq %r13, %rsi
movq -0x38(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x2130
cmpl %r15d, %eax
jge 0x5058
movl %eax, %ebx
movq -0x30(%rbp), %r15
testl %ebx, %ebx
js 0x50ba
movq %r15, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x4d85
cmpl %ebx, %eax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel %ebx, %eax
jmp 0x50bf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_append
int stream_append(stream_t* stream, const char* s, int n)
{
	int pos = stream->pos;
	int nwrite;

	stream->pos = stream->size;
	nwrite = stream_write(stream, s, n);
	stream->pos = pos;

	return nwrite;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
movl 0xc(%rdi), %ebp
movl %eax, 0xc(%rdi)
callq 0x4d2d
movl %ebp, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_appends
int stream_appends(stream_t* stream, const char* s, int n)
{
	int pos = stream->pos;
	int nwrite;

	stream->pos = stream->size;
	nwrite = stream_writes(stream, s, n);
	stream->pos = pos;

	return nwrite;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
movl 0xc(%rdi), %ebp
movl %eax, 0xc(%rdi)
callq 0x4d85
movl %ebp, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/stream.c
// Function: stream_readi
int stream_readi(stream_t *stream, int nb)
{
	int v = 0;
	int i;
	for (i = 0;
		i < nb && stream->pos < stream->size;
		i++, stream->pos++) {
		v <<= 8;
		v |= (stream->array[stream->pos] & 0xff);
	}
	return v;
}

// Assembly:
testl %esi, %esi
jle 0x533a
movl 0x8(%rdi), %ecx
movslq 0xc(%rdi), %rdx
cmpl %ecx, %edx
cmovgl %edx, %ecx
leal 0x1(%rdx), %r8d
negl %ecx
xorl %eax, %eax
leal (%rcx,%r8), %r9d
cmpl $0x1, %r9d
je 0x5339
shll $0x8, %eax
movq (%rdi), %r9
movzbl (%r9,%rdx), %r9d
orl %r9d, %eax
incq %rdx
movl %r8d, 0xc(%rdi)
incl %r8d
decl %esi
jne 0x5313
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/utils.c
// Function: ltrim
char* ltrim(char* s)
{
	char* p = s;
	while (p && (*p) && isspace((int)(*((unsigned char*)p))))
		p++;
	return p;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x5b50
movb (%rbx), %bpl
testb %bpl, %bpl
je 0x5b50
callq 0x2230
movq (%rax), %rax
movzbl %bpl, %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x5b50
movb 0x1(%rbx), %bpl
incq %rbx
testb %bpl, %bpl
jne 0x5b39
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/utils.c
// Function: rtrim
char* rtrim(char* s)
{
	size_t len;
	char* p;

	len = strlen(s);
	p = s + len - 1;

	while (p >= s && isspace((int)(*((unsigned char*)p)))) (*(p--)) = '\0';

	return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x20e0
leaq (%rbx,%rax), %r14
decq %r14
cmpq %rbx, %r14
jb 0x5b91
callq 0x2230
movq (%rax), %rcx
movzbl (%r14), %edx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x5b91
movb $0x0, (%r14)
decq %r14
cmpq %rbx, %r14
jae 0x5b77
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/utils.c
// Function: trim_quote
char* trim_quote(char* s)
{
	char* start, * end;
	size_t len;

	len = strlen(s);
	start = s;
	end = s + len - 1;

	while ((*start) && ((*start) == '\'' || (*start) == '"'))
		start++;

	while (end >= start && ((*end) == '\'' || (*end) == '"')) (*(end--)) = '\0';

	return start;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x20e0
movq %rax, %rcx
movq %rbx, %rax
movzbl (%rax), %edx
cmpl $0x22, %edx
je 0x5bb8
cmpl $0x27, %edx
jne 0x5bbd
incq %rax
jmp 0x5bab
addq %rbx, %rcx
decq %rcx
cmpq %rax, %rcx
jb 0x5bdd
movzbl (%rcx), %edx
cmpl $0x27, %edx
je 0x5bd5
cmpl $0x22, %edx
jne 0x5bdd
movb $0x0, (%rcx)
decq %rcx
jmp 0x5bc3
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/utils.c
// Function: urldecode
char *urldecode(char *s)
{
	unsigned char *src  = (unsigned char *)s,
				  *dest = (unsigned char *)s;
	while (*src) {
		if (*src == '%') {
			int a = (int)src[1] & 0xFF;
			int b = a ? ((int)src[2] & 0xFF) : 0;
			int ch = b ? hex2dec(src + 1) : -1;
			if (ch == -1) {
				*dest++ = *src++;
			}
			else {
				*dest++ = (char)ch;
				src += 3;
			}
		}
		else if (*src == '+') {
			*dest++ = ' ';
			src++;
		}
		else {
			*dest++ = *src++;
		}
	}
	*dest = '\0';
	return s;
}

// Assembly:
movq %rdi, %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdi, %rcx
movq %rdi, %rsi
movzbl (%rsi), %edi
cmpl $0x25, %edi
je 0x5c12
cmpl $0x2b, %edi
je 0x5c07
testl %edi, %edi
jne 0x5cb0
jmp 0x5cbe
movb $0x20, (%rcx)
incq %rsi
jmp 0x5cb6
movzbl 0x1(%rsi), %r9d
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
testl %r9d, %r9d
je 0x5ca1
cmpb $0x0, 0x2(%rsi)
je 0x5ca1
leal -0x30(%r9), %r8d
cmpl $0xa, %r8d
jb 0x5c55
leal -0x61(%r9), %r8d
cmpl $0x5, %r8d
ja 0x5c42
addl $-0x57, %r9d
jmp 0x5c52
leal -0x41(%r9), %r8d
addl $-0x37, %r9d
cmpl $0x6, %r8d
cmovael %edx, %r9d
movl %r9d, %r8d
movzbl 0x2(%rsi), %r9d
leal -0x30(%r9), %r11d
cmpl $0xa, %r11d
jb 0x5c87
leal -0x61(%r9), %r10d
cmpl $0x5, %r10d
ja 0x5c74
addl $-0x57, %r9d
jmp 0x5c84
leal -0x41(%r9), %r10d
addl $-0x37, %r9d
cmpl $0x6, %r10d
cmovael %edx, %r9d
movl %r9d, %r11d
movl %r8d, %r10d
shll $0x4, %r10d
orl %r11d, %r10d
cmpl $-0x1, %r11d
cmovel %r11d, %r10d
cmpl $-0x1, %r8d
cmovel %r8d, %r10d
cmpl $-0x1, %r10d
je 0x5cb0
movb %r10b, (%rcx)
addq $0x3, %rsi
jmp 0x5cb6
incq %rsi
movb %dil, (%rcx)
incq %rcx
jmp 0x5bed
movb $0x0, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/utils.c
// Function: urlencode
int urlencode(char *buf, int buflen, const char *s)
{
	unsigned char *src  = (unsigned char *)s,
				  *dest = (unsigned char *)buf,
				  *end  = dest + buflen;
	int n = 0;
	while ((*src) && dest < end) {
		int ch = *src++;
		if (ch <= ' ' || ch > '~' ||
				ch == ':' || ch ==  '/' || ch == '?' || ch == '#' ||
				ch == '[' || ch ==  ']' || ch == '@' || ch == '!' ||
				ch == '$' || ch ==  '&' || ch == '\''|| ch == '(' ||
				ch == ')' || ch ==  '*' || ch == '+' || ch == ',' ||
				ch == ';' || ch ==  '=' || ch ==  '%') {
			if (ch == ' ') {
				*dest++ = '+';
			}
			else {
				int h = dec2ch((ch >> 4) & 0xf);
				int l = dec2ch(ch & 0xf);
				*dest++ = '%';
				if (dest < end) {
					*dest++ = h;
					if (dest < end) {
						*dest++ = l;
					}
				}
			}
		}
		else {
			*dest++ = ch;
		}
	}
	if (dest < end) {
		*dest = '\0';
	}
	return (int)(dest - (unsigned char*)buf);
}

// Assembly:
pushq %rbx
movb (%rdx), %r9b
testb %r9b, %r9b
sete %al
testl %esi, %esi
setg %r11b
setle %cl
orb %al, %cl
movq %rdi, %rax
jne 0x5d9a
movslq %esi, %rcx
addq %rdi, %rcx
incq %rdx
movl $0x30, %esi
movabsq $0x14000000d6004ffd, %r8 # imm = 0x14000000D6004FFD
movq %rdi, %r10
leal -0x7f(%r9), %eax
cmpb $-0x5e, %al
jae 0x5d12
cmpb $0x20, %r9b
jne 0x5d24
movb $0x2b, (%r10)
incq %r10
jmp 0x5d6f
movzbl %r9b, %eax
addl $-0x21, %eax
cmpl $0x3c, %eax
ja 0x5d92
btq %rax, %r8
jae 0x5d92
movl %r9d, %r11d
andb $0xf, %r11b
cmpb $0xa, %r11b
movl $0x37, %ebx
cmovbl %esi, %ebx
leaq 0x1(%r10), %rax
movb $0x25, (%r10)
cmpq %rcx, %rax
jae 0x5d72
cmpb $-0x60, %r9b
movl $0x37, %eax
cmovbl %esi, %eax
shrb $0x4, %r9b
addb %al, %r9b
leaq 0x2(%r10), %rax
movb %r9b, 0x1(%r10)
cmpq %rcx, %rax
jae 0x5d72
addb %r11b, %bl
movb %bl, 0x2(%r10)
addq $0x3, %r10
movq %r10, %rax
movb (%rdx), %r9b
cmpq %rcx, %rax
setb %r11b
testb %r9b, %r9b
je 0x5d9a
incq %rdx
movq %rax, %r10
cmpq %rcx, %rax
jb 0x5cfb
jmp 0x5d9a
movb %r9b, (%r10)
jmp 0x5d0d
testb %r11b, %r11b
je 0x5da2
movb $0x0, (%rax)
subl %edi, %eax
popq %rbx
retq