LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: http_response_serialize
int http_response_serialize(/*write stream*/stream_t* s, http_response_t* response)
{
	if (http_response_headers_serialize(s, response) == -1) {
		loge("http_response_headers_serialize()\n");
		return -1;
	}

	if (response->data.size > 0) {
		if (stream_appends(s, response->data.array, response->data.size) == -1) {
			loge("stream_appendf()\n");
			return -1;
		}
	}

	return s->size - s->pos;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x13b8d
cmpl $-0x1, %eax
je 0x13d09
movl 0x28(%rbx), %edx
testl %edx, %edx
jle 0x13cff
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x1be74
cmpl $-0x1, %eax
je 0x13d37
movl 0x8(%r14), %ebx
subl 0xc(%r14), %ebx
jmp 0x13d6a
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0x13d6a
leaq 0xe015(%rip), %rsi      # 0x21d34
leaq 0xe19f(%rip), %rdx      # 0x21ec5
leaq 0xe1b0(%rip), %r8       # 0x21edd
pushq $0x3
popq %rdi
movl $0x2c4, %ecx            # imm = 0x2C4
jmp 0x13d63
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0x13d6a
leaq 0xdfe7(%rip), %rsi      # 0x21d34
leaq 0xe171(%rip), %rdx      # 0x21ec5
leaq 0xd21c(%rip), %r8       # 0x20f77
pushq $0x3
popq %rdi
movl $0x2ca, %ecx            # imm = 0x2CA
xorl %eax, %eax
callq 0x1662e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: http_create
http_ctx_t* http_create(
	const proxy_t* proxies,
	const int proxy_num,
	int timeout)
{
	http_ctx_t* ctx = (http_ctx_t*)malloc(sizeof(http_ctx_t));
	if (!ctx) {
		loge("alloc\n");
		return NULL;
	}

	memset(ctx, 0, sizeof(http_ctx_t));

	rbtree_init(&ctx->pool, rbcmp);

	ctx->proxies = proxies;
	ctx->proxy_num = proxy_num;
	ctx->timeout = timeout;

	return ctx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x3250
movq %rax, %rbx
testq %rax, %rax
je 0x14099
leaq 0x4f(%rip), %rax        # 0x140d7
movq %rax, 0x8(%rbx)
movq %r15, 0x10(%rbx)
movl %r14d, 0x18(%rbx)
movl %ebp, 0x1c(%rbx)
jmp 0x140c9
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x140c9
leaq 0xdc88(%rip), %rsi      # 0x21d34
leaq 0xdf8a(%rip), %rdx      # 0x2203d
leaq 0xd7f9(%rip), %r8       # 0x218b3
pushq $0x3
popq %rdi
movl $0x741, %ecx            # imm = 0x741
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: rbcmp
static int rbcmp(const void* a, const void* b)
{
	pool_key_t* x = (pool_key_t*)a;
	pool_key_t* y = (pool_key_t*)b;
	int r;
	if (x->addr.addr.ss_family != y->addr.addr.ss_family)
		r = ((int)x->addr.addr.ss_family) - ((int)y->addr.addr.ss_family);
	else if (x->addr.addr.ss_family != AF_INET) {
		r = memcmp(
			&((struct sockaddr_in*)(&x->addr.addr))->sin_addr,
			&((struct sockaddr_in*)&y->addr.addr)->sin_addr,
			4);
	}
	else {
		r = memcmp(
			&((struct sockaddr_in6*)(&x->addr.addr))->sin6_addr,
			&((struct sockaddr_in6*)&y->addr.addr)->sin6_addr,
			16);
	}

	if (r == 0) {
		r = x->use_proxy - y->use_proxy;
	}

	return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl (%rdi), %eax
movzwl (%rsi), %ecx
cmpw %cx, %ax
jne 0x140fd
cmpl $0x2, %eax
jne 0x14101
leaq 0x8(%r14), %rdi
leaq 0x8(%rbx), %rsi
pushq $0x10
jmp 0x1410b
subl %ecx, %eax
jmp 0x14111
leaq 0x4(%r14), %rdi
leaq 0x4(%rbx), %rsi
pushq $0x4
popq %rdx
callq 0x3180
testl %eax, %eax
jne 0x14122
movl 0x88(%r14), %eax
subl 0x88(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: rb_fdset_func
static int rb_fdset_func(rbtree_t* tree, rbnode_t* n, void* state)
{
	http_fdset_state* st = (http_fdset_state*)state;
	http_pool_item_t* pi = rbtree_container_of(n, http_pool_item_t, rbn);
	/* "fly" should be first, then "idle", then "busy". */
	/* otherwise, some connection maybe processed twice. */
	dl_fdset_func(&pi->fly_conns, st);
	dl_fdset_func(&pi->idle_conns, st);
	dl_fdset_func(&pi->busy_conns, st);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq -0x20(%rsi), %rdi
movq %rdx, %rsi
callq 0x15ad0
leaq -0x40(%r14), %rdi
movq %rbx, %rsi
callq 0x15ad0
addq $-0x30, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x15ad0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: rb_step_func
static int rb_step_func(rbtree_t* tree, rbnode_t* n, void* state)
{
	http_step_state* st = (http_step_state*)state;
	http_pool_item_t* pi = rbtree_container_of(n, http_pool_item_t, rbn);
	dl_step_func(&pi->idle_conns, st);
	dl_step_func(&pi->busy_conns, st);
	dl_step_func(&pi->fly_conns, st);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq -0x40(%rsi), %rdi
movq %rdx, %rsi
callq 0x15bb0
leaq -0x30(%r14), %rdi
movq %rbx, %rsi
callq 0x15bb0
addq $-0x20, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x15bb0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: http_ssl_handshake
static int http_ssl_handshake(http_ctx_t* ctx, http_conn_t* conn)
{
	int r;
	int err;
	conn->conn.status = cs_ssl_handshaking;
	r = SSL_connect(conn->ssl);
	if (r == 1) {
		/* connected */
		conn->conn.status = cs_ssl_handshaked;
		http_move_to_busy(conn);
		logd("ssl handshaked\n");
		return 0;
	}

	if (r == -1) {
		err = SSL_get_error(conn->ssl, r);
		if (err == SSL_ERROR_WANT_READ) {
			conn->conn.status = cs_ssl_handshaking_want_read;
			return 0;
		}
		else if (err == SSL_ERROR_WANT_WRITE) {
			conn->conn.status = cs_ssl_handshaking_want_write;
			return 0;
		}
		else {
			loge("errno=%d, %s\n",
				err, http_ssl_errstr(err));
			if (err == SSL_ERROR_SYSCALL) {
				while ((err = ERR_get_error()) != 0) {
					loge("errno=%d, %s\n",
						err, ERR_error_string(err, NULL));
				}
			}
		}
	}

	if (r != 0) {
		SSL_shutdown(conn->ssl);
	}

	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0xe, 0x48(%rdi)
movq 0x78(%rdi), %rdi
callq 0x3500
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x1565a
testl %eax, %eax
je 0x1572f
cmpl $0x1, %eax
jne 0x15726
movl $0x11, 0x48(%r14)
movq %r14, %rdi
callq 0x16511
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x165f5
cmpl $0x7, (%rax)
jl 0x1572f
leaq 0xc6fe(%rip), %rsi      # 0x21d34
leaq 0xca7c(%rip), %rdx      # 0x220b9
leaq 0xceab(%rip), %r8       # 0x224ef
xorl %ebx, %ebx
pushq $0x7
popq %rdi
movl $0x399, %ecx            # imm = 0x399
xorl %eax, %eax
callq 0x1662e
jmp 0x1572f
movq 0x78(%r14), %rdi
pushq $-0x1
popq %rsi
callq 0x3030
cmpl $0x3, %eax
je 0x1567c
movl %eax, %ebp
cmpl $0x2, %eax
jne 0x1568b
movl $0xf, 0x48(%r14)
jmp 0x15684
movl $0x10, 0x48(%r14)
xorl %ebx, %ebx
jmp 0x1572f
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x156c9
movl %ebp, %edi
callq 0x160f0
movq %rax, (%rsp)
leaq 0xc68b(%rip), %rsi      # 0x21d34
leaq 0xca09(%rip), %rdx      # 0x220b9
leaq 0xc26b(%rip), %r8       # 0x21922
pushq $0x3
popq %rdi
movl $0x3a9, %ecx            # imm = 0x3A9
movl %ebp, %r9d
xorl %eax, %eax
callq 0x1662e
cmpl $0x5, %ebp
jne 0x15726
leaq 0xc9e4(%rip), %r12      # 0x220b9
leaq 0xc246(%rip), %r13      # 0x21922
pushq $0x3
popq %rbp
callq 0x34b0
movq %rax, %r15
testl %r15d, %r15d
je 0x15726
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x156df
movslq %r15d, %rdi
xorl %esi, %esi
callq 0x3120
movq %rax, (%rsp)
movl %ebp, %edi
leaq 0xc625(%rip), %rsi      # 0x21d34
movq %r12, %rdx
movl $0x3ad, %ecx            # imm = 0x3AD
movq %r13, %r8
movl %r15d, %r9d
xorl %eax, %eax
callq 0x1662e
jmp 0x156df
movq 0x78(%r14), %rdi
callq 0x3420
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_O2/GangZhuo[P]dohclient/src/http.c
// Function: http_conn_close
static void http_conn_close(http_conn_t* conn)
{
	conn->conn.status = cs_closing;
	http_move_to_fly(conn);
	if (conn->conn.sock) {
		shutdown(conn->conn.sock, SHUT_RDWR);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x3, 0x48(%rdi)
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x1577b
leaq 0xc5d6(%rip), %rsi      # 0x21d34
leaq 0xcd9a(%rip), %rdx      # 0x224ff
leaq 0xcda4(%rip), %r8       # 0x22510
pushq $0x8
popq %rdi
movl $0x361, %ecx            # imm = 0x361
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rdi
callq 0x16093
movq %rbx, %rdi
callq 0x16593
movl 0x10(%rbx), %edi
testl %edi, %edi
je 0x1579b
pushq $0x2
popq %rsi
popq %rbx
jmp 0x34d0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: http_pool_item_free_conns
static void http_pool_item_free_conns(dllist_t *conns)
{
	dlitem_t* cur, * nxt;
	http_conn_t* conn;
	dllist_foreach(conns, cur, nxt,
		http_conn_t, conn, entry) {
		dllist_remove(&conn->entry);
		http_conn_free(conn);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
cmpq %rbx, %rax
je 0x159ce
leaq -0x90(%rax), %rdi
movq (%rax), %r14
movq 0x8(%rax), %rax
movq %r14, (%rax)
movq %rax, 0x8(%r14)
callq 0x159d6
movq %r14, %rax
jmp 0x159aa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: http_conn_free
static void http_conn_free(http_conn_t *conn)
{
	if (conn->request) {
		http_call_callback(conn->request, HTTP_ABORT, conn->response);
	}
	if (conn->response) {
		conn->response->conn = NULL;
		conn->response = NULL;
	}
	if (conn->ssl) {
		SSL_free(conn->ssl);
	}
	conn_free(&conn->conn);
	stream_free(&conn->field.name);
	stream_free(&conn->field.value);
	stream_free(&conn->proxy_stream);
	free(conn->tag);
	free(conn);

	logv("free http connection\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xa0(%rdi), %rdi
testq %rdi, %rdi
je 0x159f5
movq 0xa8(%rbx), %rdx
pushq $0x1
popq %rsi
callq 0x15a90
movq 0xa8(%rbx), %rax
testq %rax, %rax
je 0x15a0e
andq $0x0, 0x38(%rax)
andq $0x0, 0xa8(%rbx)
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x15a1c
callq 0x3200
leaq 0x10(%rbx), %rdi
callq 0x1803b
leaq 0xd0(%rbx), %rdi
callq 0x1b8a6
leaq 0xe8(%rbx), %rdi
callq 0x1b8a6
leaq 0x110(%rbx), %rdi
callq 0x1b8a6
movq 0x128(%rbx), %rdi
callq 0x3460
movq %rbx, %rdi
callq 0x3460
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x15a8e
leaq 0xc2c4(%rip), %rsi      # 0x21d34
leaq 0xc6b1(%rip), %rdx      # 0x22128
leaq 0xc6b9(%rip), %r8       # 0x22137
pushq $0x8
popq %rdi
movl $0xba, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x1662e
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: http_call_callback
static void http_call_callback(http_request_t* req, int err, http_response_t *res)
{
	if (!req) return;
	if (req->conn) {
		req->conn->request = NULL;
		req->conn = NULL;
	}
	if (req->callback) {
		req->callback(err, req, res, req->cb_state);
		req->callback = NULL;
		req->cb_state = NULL;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x15acf
movq %rdi, %rax
movq 0x38(%rdi), %rcx
testq %rcx, %rcx
je 0x15aae
andq $0x0, 0xa0(%rcx)
andq $0x0, 0x38(%rax)
movq 0x40(%rax), %r8
testq %r8, %r8
je 0x15acf
pushq %rbx
leaq 0x40(%rax), %rbx
movq 0x48(%rax), %rcx
movl %esi, %edi
movq %rax, %rsi
callq *%r8
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: dl_fdset_func
static void dl_fdset_func(dllist_t* conns, http_fdset_state* st)
{
	dlitem_t* cur, * nxt;
	http_conn_t* conn;
	conn_status cs;
	int is_sending;
	dllist_foreach(conns, cur, nxt,
		http_conn_t, conn, entry) {
		cs = conn->conn.status;
		if (cs == cs_ssl_handshaked) {
			st->maxfd = MAX(st->maxfd, conn->conn.sock);
			if (conn->ssl_status == SSL_ERROR_WANT_READ) {
				FD_SET(conn->conn.sock, st->readset);
			}
			else if (conn->ssl_status == SSL_ERROR_WANT_WRITE) {
				FD_SET(conn->conn.sock, st->writeset);
			}
			else {
				is_sending = stream_rsize(&conn->conn.ws) > 0;
				if (is_sending)
					FD_SET(conn->conn.sock, st->writeset);
				else
					FD_SET(conn->conn.sock, st->readset);
			}
			FD_SET(conn->conn.sock, st->errorset);
		}
		else if (cs == cs_ssl_handshaking_want_read ||
			cs == cs_socks5_waiting_method ||
			cs == cs_socks5_waiting_connect ||
			cs == cs_hp_waiting_connect ||
			cs == cs_hp_waiting_data) {
			st->maxfd = MAX(st->maxfd, conn->conn.sock);
			FD_SET(conn->conn.sock, st->readset);
			FD_SET(conn->conn.sock, st->errorset);
		}
		else if (cs == cs_ssl_handshaking_want_write ||
			cs == cs_socks5_sending_method ||
			cs == cs_socks5_sending_connect ||
			cs == cs_hp_sending_connect) {
			st->maxfd = MAX(st->maxfd, conn->conn.sock);
			FD_SET(conn->conn.sock, st->writeset);
			FD_SET(conn->conn.sock, st->errorset);
		}
		else if (cs == cs_connecting) {
			st->maxfd = MAX(st->maxfd, conn->conn.sock);
			FD_SET(conn->conn.sock, st->writeset);
			FD_SET(conn->conn.sock, st->errorset);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r11
leaq 0xc19e(%rip), %r8       # 0x21c7c
movl $0x40, %r9d
movabsq $0x1, %r10
cmpq %rdi, %r11
je 0x15bab
movq %r11, %r14
movq (%r11), %r11
movl -0x48(%r14), %eax
decl %eax
cmpl $0x10, %eax
ja 0x15aee
movslq (%r8,%rax,4), %rax
addq %r8, %rax
jmpq *%rax
movl 0x20(%rsi), %eax
movl -0x80(%r14), %ecx
cmpl %ecx, %eax
cmovlel %ecx, %eax
movl %eax, 0x20(%rsi)
movl %ecx, %eax
cltd
idivl %r9d
movslq %eax, %rbx
leaq (,%rbx,8), %r14
addq 0x10(%rsi), %r14
jmp 0x15b5b
movl 0x20(%rsi), %eax
movl -0x80(%r14), %ecx
cmpl %ecx, %eax
cmovlel %ecx, %eax
movl %eax, 0x20(%rsi)
movl %ecx, %eax
cltd
idivl %r9d
movslq %eax, %rbx
leaq (,%rbx,8), %r14
addq 0x8(%rsi), %r14
movl %ecx, %eax
cltd
idivl %r9d
movl %edx, %ecx
movq %r10, %rax
shlq %cl, %rax
orq %rax, (%r14)
movq 0x18(%rsi), %rcx
orq %rax, (%rcx,%rbx,8)
jmp 0x15aee
movl 0x20(%rsi), %eax
movl -0x80(%r14), %ecx
cmpl %ecx, %eax
cmovlel %ecx, %eax
movl %eax, 0x20(%rsi)
movl -0x10(%r14), %eax
cmpl $0x3, %eax
je 0x15b20
cmpl $0x2, %eax
je 0x15b46
movl -0x58(%r14), %ebp
movl %ecx, %eax
cltd
idivl %r9d
movslq %eax, %rbx
cmpl -0x54(%r14), %ebp
jg 0x15b29
jmp 0x15b4f
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: http_remove_conn
static void http_remove_conn(http_conn_t* conn)
{
	dllist_remove(&conn->entry);
	if (conn->status == HTTP_CONN_ST_FLY)
		conn->pool->fly_count--;
	else if (conn->status == HTTP_CONN_ST_IDLE)
		conn->pool->idle_count--;
	else if (conn->status == HTTP_CONN_ST_BUSY)
		conn->pool->busy_count--;
	conn->status = HTTP_CONN_ST_NONE;
}

// Assembly:
movq 0x90(%rdi), %rax
movq 0x98(%rdi), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movl 0x84(%rdi), %eax
cmpl $0x3, %eax
je 0x160db
cmpl $0x2, %eax
je 0x160cc
cmpl $0x1, %eax
jne 0x160e8
movq 0x88(%rdi), %rax
decl 0xc8(%rax)
jmp 0x160e8
movq 0x88(%rdi), %rax
decl 0xc0(%rax)
jmp 0x160e8
movq 0x88(%rdi), %rax
decl 0xc4(%rax)
andl $0x0, 0x84(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: on_status
static int on_status(http_parser* parser, const char* at, size_t length)
{
	http_conn_t* conn = (http_conn_t*)parser->data;
	http_response_t* response = conn->response;
	response->status_code = parser->status_code;
	response->status_text = http_strdup(at, length);
	response->http_major = parser->http_major;
	response->http_minor = parser->http_minor;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0xa8(%rax), %r13
movzwl 0x14(%rdi), %eax
movl %eax, 0x4(%r13)
shlq $0x20, %r15
movabsq $0x100000000, %rdi      # imm = 0x100000000
addq %r15, %rdi
sarq $0x20, %rdi
callq 0x34c0
movq %rax, %r14
testq %rax, %rax
je 0x16195
sarq $0x20, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x32c0
movb $0x0, (%r14,%r15)
jmp 0x161c5
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x161c5
leaq 0xbb8c(%rip), %rsi      # 0x21d34
leaq 0xc0dc(%rip), %rdx      # 0x2228b
leaq 0xb6fd(%rip), %r8       # 0x218b3
pushq $0x3
popq %rdi
movl $0xf7, %ecx
xorl %eax, %eax
callq 0x1662e
movq %r14, 0x8(%r13)
movl 0x10(%rbx), %eax
movl %eax, (%r13)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: on_header_field
static int on_header_field(http_parser* parser, const char* at, size_t length)
{
	http_conn_t* conn = (http_conn_t*)parser->data;

	if (conn->field.status == fs_value) {
		if (on_header_field_complete(parser))
			return -1;
	}

	conn->field.status = fs_name;

	if (stream_writes(&conn->field.name, at, (int)length) == -1) {
		loge("stream_writes()\n");
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq 0x18(%rdi), %r12
leaq 0xd0(%r12), %r15
cmpl $0x2, 0x100(%r12)
jne 0x16206
callq 0x164d9
movl $0x1, 0x100(%r12)
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x1baa1
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0x16259
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0x16259
leaq 0xbaf8(%rip), %rsi      # 0x21d34
leaq 0xc054(%rip), %rdx      # 0x22297
leaq 0xc05d(%rip), %r8       # 0x222a7
pushq $0x3
popq %rdi
movl $0x604, %ecx            # imm = 0x604
xorl %eax, %eax
callq 0x1662e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: on_header_value
static int on_header_value(http_parser* parser, const char* at, size_t length)
{
	http_conn_t* conn = (http_conn_t*)parser->data;

	conn->field.status = fs_value;

	if (stream_writes(&conn->field.value, at, (int)length) == -1) {
		loge("stream_writes()\n");
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbx
movq 0x18(%rdi), %rdi
movl $0x2, 0x100(%rdi)
addq $0xe8, %rdi
callq 0x1baa1
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0x162bc
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0x162bc
leaq 0xba95(%rip), %rsi      # 0x21d34
leaq 0xc012(%rip), %rdx      # 0x222b8
leaq 0xbffa(%rip), %r8       # 0x222a7
pushq $0x3
popq %rdi
movl $0x612, %ecx            # imm = 0x612
xorl %eax, %eax
callq 0x1662e
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: on_headers_complete
static int on_headers_complete(http_parser* parser)
{
	http_conn_t* conn = (http_conn_t*)parser->data;

	if (conn->field.status != fs_none) {
		if (on_header_field_complete(parser))
			return -1;
	}

	conn->keep_alive = http_should_keep_alive(parser);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
cmpl $0x0, 0x100(%r14)
je 0x162dd
movq %rbx, %rdi
callq 0x164d9
movq %rbx, %rdi
callq 0x72cb
movl %eax, 0x108(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: on_body
static int on_body(http_parser* parser, const char* at, size_t length)
{
	http_conn_t* conn = (http_conn_t*)parser->data;
	http_response_t* response = conn->response;

	if (http_response_append_data(response, at, (int)length) == -1) {
		loge("http_response_append_data()\n");
		return -1;
	}
	return 0;
}

// Assembly:
pushq %rbx
movq 0x18(%rdi), %rax
movq 0xa8(%rax), %rdi
callq 0x13b45
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0x16341
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0x16341
leaq 0xba10(%rip), %rsi      # 0x21d34
leaq 0xbf9d(%rip), %rdx      # 0x222c8
leaq 0xbf9e(%rip), %r8       # 0x222d0
pushq $0x3
popq %rdi
movl $0x62d, %ecx            # imm = 0x62D
xorl %eax, %eax
callq 0x1662e
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/http.c
// Function: on_message_complete
static int on_message_complete(http_parser* parser)
{
	http_conn_t* conn = (http_conn_t*)parser->data;
	http_request_t* request = conn->request;
	http_response_t* response = conn->response;

	if (loglevel > LOG_DEBUG) {
		stream_t s = STREAM_INIT();
		http_request_headers_serialize(&s, request);
		logv("Request Headers:\r\n%s\r\n", s.array);
		stream_reset(&s);
		http_response_headers_serialize(&s, response);
		logv("Response:\r\n%s\r\n%s%s",
			s.array,
			response->status_code != 200 ? (const char*)response->data.array : "",
			response->status_code != 200 ? "\r\n" : "");
		stream_free(&s);
	}

	http_call_callback(request, HTTP_OK, response);

	if (conn->keep_alive) {
		http_move_to_idle(conn);
	}
	else {
		http_conn_close(conn);
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq 0x18(%rdi), %rbx
movq 0xa0(%rbx), %r15
movq 0xa8(%rbx), %r14
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x1642d
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %r15, %rsi
callq 0x13545
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x163ba
movq (%rsp), %r9
leaq 0xb997(%rip), %rsi      # 0x21d34
leaq 0xbf49(%rip), %rdx      # 0x222ed
leaq 0xbf56(%rip), %r8       # 0x22301
pushq $0x8
popq %rdi
movl $0x63c, %ecx            # imm = 0x63C
xorl %eax, %eax
callq 0x1662e
movq %rsp, %rdi
andq $0x0, 0x8(%rdi)
movq %r14, %rsi
callq 0x13b8d
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x16425
movq (%rsp), %r9
cmpl $0xc8, 0x4(%r14)
jne 0x163f0
leaq 0xba13(%rip), %r11      # 0x21dfe
movq %r11, %r10
jmp 0x163fb
movq 0x20(%r14), %r10
leaq 0xba01(%rip), %r11      # 0x21dfc
leaq 0xb932(%rip), %rsi      # 0x21d34
leaq 0xbee4(%rip), %rdx      # 0x222ed
leaq 0xbf08(%rip), %r8       # 0x22318
pushq $0x8
popq %rdi
movl $0x642, %ecx            # imm = 0x642
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1662e
popq %rax
popq %rcx
movq %rsp, %rdi
callq 0x1b8a6
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x15a90
cmpl $0x0, 0x108(%rbx)
je 0x164bf
xorl %eax, %eax
callq 0x165f5
cmpl $0x8, (%rax)
jl 0x16473
leaq 0xb8de(%rip), %rsi      # 0x21d34
leaq 0xbecf(%rip), %rdx      # 0x2232c
leaq 0xbeda(%rip), %r8       # 0x2233e
pushq $0x8
popq %rdi
movl $0x35a, %ecx            # imm = 0x35A
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rdi
callq 0x16093
movq 0x88(%rbx), %rax
movl $0x90, %ecx
leaq (%rax,%rcx), %rdx
addq %rbx, %rcx
movq %rdx, 0x90(%rbx)
movq 0x98(%rax), %rdx
movq %rdx, 0x98(%rbx)
movq %rcx, (%rdx)
movq %rcx, 0x98(%rax)
incl 0xc0(%rax)
movl $0x2, 0x84(%rbx)
jmp 0x164c7
movq %rbx, %rdi
callq 0x15740
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_get_ttl
uint32_t ns_get_ttl(const ns_msg_t* msg)
{
	int i, rrcount;
	uint32_t ttl = 0;
	ns_rr_t* rr;

	rrcount = ns_rrcount(msg);
	for (i = 0; i < rrcount; i++) {
		rr = msg->rrs + i;
		if (rr->ttl > 0 && rr->type != NS_TYPE_OPT) {
			if (ttl == 0 || ttl > rr->ttl) ttl = rr->ttl;
		}
	}

	return ttl;
}

// Assembly:
movzwl 0x6(%rdi), %eax
movzwl 0x8(%rdi), %edx
movzwl 0xa(%rdi), %ecx
addl %edx, %ecx
addl %eax, %ecx
shll $0x5, %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x182e7
movq 0x18(%rdi), %r8
movl 0xc(%r8,%rdx), %esi
testl %esi, %esi
je 0x182e1
cmpw $0x29, 0x8(%r8,%rdx)
je 0x182e1
leal -0x1(%rax), %r8d
cmpl %esi, %r8d
cmovbl %eax, %esi
movl %esi, %eax
addq $0x20, %rdx
jmp 0x182ba
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_qr_clone
ns_qr_t* ns_qr_clone(const ns_qr_t* array, int num)
{
	ns_qr_t* copy, * dst;
	const ns_qr_t* src;
	int i;
	if (!array)
		return NULL;
	copy = (ns_qr_t*)malloc(sizeof(ns_qr_t) * num);
	if (!copy) {
		loge("alloc \n");
		return NULL;
	}
	memset(copy, 0, sizeof(ns_qr_t) * num);
	for (i = 0; i < num; i++) {
		src = array + i;
		dst = copy + i;
		dst->qname = src->qname ? strdup(src->qname) : NULL;
		dst->qtype = src->qtype;
		dst->qclass = src->qclass;
	}
	return copy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1834b
movl %esi, %r14d
movq %rdi, %r15
movslq %esi, %rsi
shlq $0x4, %rsi
pushq $0x1
popq %rdi
callq 0x3250
testq %rax, %rax
je 0x1834f
movq %rax, %rbx
xorl %r12d, %r12d
testl %r14d, %r14d
cmovlel %r12d, %r14d
shlq $0x4, %r14
cmpq %r12, %r14
je 0x18381
movq (%r15,%r12), %rdi
testq %rdi, %rdi
je 0x18335
callq 0x3620
jmp 0x18337
xorl %eax, %eax
movq %rax, (%rbx,%r12)
movl 0x8(%r15,%r12), %eax
movl %eax, 0x8(%rbx,%r12)
addq $0x10, %r12
jmp 0x18320
xorl %ebx, %ebx
jmp 0x18381
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x18381
leaq 0xa8a0(%rip), %rsi      # 0x22c04
leaq 0xa8a6(%rip), %rdx      # 0x22c11
leaq 0x8264(%rip), %r8       # 0x205d6
xorl %ebx, %ebx
pushq $0x3
popq %rdi
pushq $0x6c
popq %rcx
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_msg_clone
ns_msg_t* ns_msg_clone(const ns_msg_t *msg)
{
	ns_msg_t* copy;
	copy = (ns_msg_t*)malloc(sizeof(ns_msg_t));
	if (!copy) {
		loge("alloc \n");
		return NULL;
	}

	memset(copy, 0, sizeof(ns_msg_t));
	
	copy->id = msg->id;
	copy->flags = msg->flags;
	if (msg->qrs) {
		copy->qrs = ns_qr_clone(msg->qrs, msg->qdcount);
		if (!copy->qrs) {
			loge("ns_qr_clone() error\n");
			free(copy);
			return NULL;
		}
	}
	copy->qdcount = msg->qdcount;

	if (msg->rrs) {
		copy->rrs = ns_rr_clone(msg->rrs, ns_rrcount(msg));
		if (!copy->rrs) {
			loge("ns_rr_clone() error\n");
			ns_msg_free(copy);
			return NULL;
		}
	}

	copy->ancount = msg->ancount;
	copy->nscount = msg->nscount;
	copy->arcount = msg->arcount;

	return copy;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x3250
testq %rax, %rax
je 0x18815
movq %rax, %rbx
movl (%r14), %eax
movl %eax, (%rbx)
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x187c9
movzwl 0x4(%r14), %esi
callq 0x182e8
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1884f
movzwl 0x4(%r14), %eax
movw %ax, 0x4(%rbx)
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x18800
movzwl 0x6(%r14), %eax
movzwl 0x8(%r14), %ecx
addl %eax, %ecx
movzwl 0xa(%r14), %esi
addl %ecx, %esi
callq 0x18390
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x18889
movl 0x6(%r14), %eax
movl %eax, 0x6(%rbx)
movzwl 0xa(%r14), %eax
movw %ax, 0xa(%rbx)
jmp 0x188c3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x188c3
leaq 0xa3d6(%rip), %rsi      # 0x22c04
leaq 0xa3f4(%rip), %rdx      # 0x22c29
leaq 0x7d9a(%rip), %r8       # 0x205d6
xorl %ebx, %ebx
pushq $0x3
popq %rdi
movl $0x11f, %ecx            # imm = 0x11F
xorl %eax, %eax
callq 0x1662e
jmp 0x188c3
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1887f
leaq 0xa3a2(%rip), %rsi      # 0x22c04
leaq 0xa3c0(%rip), %rdx      # 0x22c29
leaq 0x7d51(%rip), %r8       # 0x205c1
pushq $0x3
popq %rdi
movl $0x12a, %ecx            # imm = 0x12A
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rdi
callq 0x3460
jmp 0x188c1
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x188b9
leaq 0xa368(%rip), %rsi      # 0x22c04
leaq 0xa386(%rip), %rdx      # 0x22c29
leaq 0xa38c(%rip), %r8       # 0x22c36
pushq $0x3
popq %rdi
movl $0x134, %ecx            # imm = 0x134
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rdi
callq 0x188ce
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_msg_free
void ns_msg_free(ns_msg_t *msg)
{
	int i, rrcount;
	if (msg) {
        if (msg->qrs) {
            for (i = 0; i < msg->qdcount; i++) {
                ns_msg_free_qr(msg->qrs + i);
            }
            free(msg->qrs);
        }

        if (msg->rrs) {
            for (i = 0, rrcount = ns_rrcount(msg);
                    i < rrcount; i++) {
                ns_msg_free_rr(msg->rrs + i);
            }
            free(msg->rrs);
        }
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x18963
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x18914
xorl %r14d, %r14d
xorl %r15d, %r15d
movzwl 0x4(%rbx), %eax
movq 0x10(%rbx), %rdi
cmpq %rax, %r15
jae 0x1890f
movq (%rdi,%r14), %rdi
callq 0x3460
incq %r15
addq $0x10, %r14
jmp 0x188f0
callq 0x3460
cmpq $0x0, 0x18(%rbx)
je 0x18963
movzwl 0x6(%rbx), %eax
movzwl 0x8(%rbx), %ecx
movzwl 0xa(%rbx), %r12d
addl %ecx, %r12d
addl %eax, %r12d
shll $0x5, %r12d
xorl %r13d, %r13d
movq 0x18(%rbx), %r14
cmpq %r13, %r12
je 0x1896d
leaq (%r14,%r13), %r15
movq (%r14,%r13), %rdi
callq 0x3460
movq %r15, %rdi
callq 0x18736
movq 0x18(%r14,%r13), %rdi
callq 0x3460
addq $0x20, %r13
jmp 0x18935
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3460
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: qr_key
const char* qr_key(const ns_qr_t* qr)
{
	static char key[REQ_KEY_SIZE];
	int n;

	if (!qr)
		return NULL;

	n = snprintf(key, sizeof(key), "%s %s %s",
		ns_typename(qr->qtype),
		ns_classname(qr->qclass),
		qr->qname ? qr->qname : "");

	if (n <= 0 || n >= sizeof(key)) {
		loge("snprintf() error\n");
		return NULL;
	}

	return key;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x18a18
movq %rdi, %rbx
movzwl 0x8(%rdi), %edi
callq 0x18a25
movq %rax, %r14
movzwl 0xa(%rbx), %edi
callq 0x18b5a
movq (%rbx), %rcx
testq %rcx, %rcx
leaq 0x944e(%rip), %r9       # 0x21dfe
cmovneq %rcx, %r9
leaq 0x15e35(%rip), %rbx     # 0x2e7f0
leaq 0xa560(%rip), %rdx      # 0x22f22
movl $0x10f, %esi            # imm = 0x10F
movq %rbx, %rdi
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x35a0
movl $0xfffffef1, %ecx       # imm = 0xFFFFFEF1
addl %ecx, %eax
cmpl %ecx, %eax
ja 0x18a1a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x18a1a
leaq 0xa20d(%rip), %rsi      # 0x22c04
leaq 0xa24d(%rip), %rdx      # 0x22c4b
leaq 0xa24d(%rip), %r8       # 0x22c52
xorl %ebx, %ebx
pushq $0x3
popq %rdi
movl $0x14f, %ecx            # imm = 0x14F
xorl %eax, %eax
callq 0x1662e
jmp 0x18a1a
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_typename
const char *ns_typename(uint16_t type)
{
	static char num[20] = {0};
    switch (type) {
        case NS_QTYPE_A		: return "A";
        case NS_QTYPE_NS	: return "NS";
        case NS_QTYPE_MD	: return "MD";	
        case NS_QTYPE_MF	: return "MF";	
        case NS_QTYPE_CNAME	: return "CNAME";
        case NS_QTYPE_SOA	: return "SOA";
        case NS_QTYPE_MB	: return "MB";	
        case NS_QTYPE_MG	: return "MG";	
        case NS_QTYPE_MR	: return "MR";	
        case NS_QTYPE_NULL	: return "NULL";
        case NS_QTYPE_WKS	: return "WKS";
        case NS_QTYPE_PTR	: return "PTR";
        case NS_QTYPE_HINFO	: return "HINFO";
        case NS_QTYPE_MINFO	: return "MINFO";
        case NS_QTYPE_MX	: return "MX";	
        case NS_QTYPE_TXT	: return "TXT";
        case NS_QTYPE_AAAA	: return "AAAA";
        case NS_QTYPE_OPT	: return "OPT";
        case NS_QTYPE_AXFR	: return "AXFR";
        case NS_QTYPE_MAILB	: return "MAILB";
        case NS_QTYPE_MAILA	: return "MAILA";
        case NS_QTYPE_ANY	: return "ANY";
        default:
			snprintf(num, sizeof(num) - 1, "QTYPE(%d)", (int)type);
			return num;
    }

}

// Assembly:
pushq %rbx
leal -0x1(%rdi), %eax
cmpl $0x28, %eax
ja 0x18a4a
leaq 0xa02b(%rip), %rcx      # 0x22a60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x838b(%rip), %rbx      # 0x20dd0
jmp 0x18b55
leal -0xfc(%rdi), %eax
cmpl $0x3, %eax
ja 0x18a71
leaq 0xa0a8(%rip), %rcx      # 0x22b04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xa47e(%rip), %rbx      # 0x22eea
jmp 0x18b55
movzwl %di, %ecx
leaq 0x15e85(%rip), %rbx     # 0x2e900
leaq 0xa47d(%rip), %rdx      # 0x22eff
pushq $0x13
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x35a0
jmp 0x18b55
leaq 0xa44b(%rip), %rbx      # 0x22ee6
jmp 0x18b55
leaq 0xa40c(%rip), %rbx      # 0x22eb3
jmp 0x18b55
leaq 0xa406(%rip), %rbx      # 0x22eb9
jmp 0x18b55
leaq 0xa41a(%rip), %rbx      # 0x22ed9
jmp 0x18b55
leaq 0xa400(%rip), %rbx      # 0x22ecb
jmp 0x18b55
leaq 0xa3d6(%rip), %rbx      # 0x22ead
jmp 0x18b55
leaq 0xa3d0(%rip), %rbx      # 0x22eb0
jmp 0x18b55
leaq 0xa3d4(%rip), %rbx      # 0x22ebd
jmp 0x18b55
leaq 0x72de(%rip), %rbx      # 0x1fdd0
jmp 0x18b55
leaq 0xa3c5(%rip), %rbx      # 0x22ec0
jmp 0x18b55
leaq 0x82c9(%rip), %rbx      # 0x20dcd
jmp 0x18b55
leaq 0xa3b6(%rip), %rbx      # 0x22ec3
jmp 0x18b55
leaq 0xa3b9(%rip), %rbx      # 0x22ecf
jmp 0x18b55
leaq 0xa3a7(%rip), %rbx      # 0x22ec6
jmp 0x18b55
leaq 0xa3ab(%rip), %rbx      # 0x22ed3
jmp 0x18b55
leaq 0xa3b1(%rip), %rbx      # 0x22ee2
jmp 0x18b55
leaq 0xa3a5(%rip), %rbx      # 0x22edf
jmp 0x18b55
leaq 0xa3b2(%rip), %rbx      # 0x22ef5
jmp 0x18b55
leaq 0xa3af(%rip), %rbx      # 0x22efb
jmp 0x18b55
leaq 0xa39a(%rip), %rbx      # 0x22eef
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_classname
const char *ns_classname(uint16_t cls)
{
	static char num[20] = {0};
    switch (cls) {
        case NS_QCLASS_IN: return "IN";
        case NS_QCLASS_CS: return "CS";
        case NS_QCLASS_CH: return "CH";
        case NS_QCLASS_HS: return "HS";
        case NS_QCLASS_ANY:return "ANY";
        default:
			snprintf(num, sizeof(num) - 1, "QCLASS(%d)", (int)cls);
			return num;
    }
}

// Assembly:
pushq %rbx
leal -0x1(%rdi), %eax
cmpl $0x3, %eax
ja 0x18b7c
leaq 0x9faa(%rip), %rcx      # 0x22b14
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xa38f(%rip), %rbx      # 0x22f09
jmp 0x18bc6
cmpl $0xff, %edi
jne 0x18b8d
leaq 0xa370(%rip), %rbx      # 0x22efb
jmp 0x18bc6
movzwl %di, %ecx
leaq 0x15d89(%rip), %rbx     # 0x2e920
leaq 0xa371(%rip), %rdx      # 0x22f0f
pushq $0x13
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x35a0
jmp 0x18bc6
leaq 0x7288(%rip), %rbx      # 0x1fe3c
jmp 0x18bc6
leaq 0xa34f(%rip), %rbx      # 0x22f0c
jmp 0x18bc6
leaq 0x822e(%rip), %rbx      # 0x20df4
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_find_rr
ns_rr_t *ns_find_rr(ns_msg_t *msg, int type)
{
	int i, rrcount;
	ns_rr_t *rr;

	rrcount = ns_rrcount(msg);
	for (i = rrcount - 1; i >= 0; i--) {
		rr = msg->rrs + i;
		if (rr->type == type) {
			return rr;
		}
	}

	return NULL;
}

// Assembly:
movzwl 0x6(%rdi), %eax
movzwl 0x8(%rdi), %edx
addq %rax, %rdx
movzwl 0xa(%rdi), %ecx
addq %rdx, %rcx
xorl %eax, %eax
testq %rcx, %rcx
jle 0x19b10
decq %rcx
movq 0x18(%rdi), %rdx
movq %rcx, %r8
shlq $0x5, %r8
movzwl 0x8(%rdx,%r8), %r9d
cmpl %esi, %r9d
jne 0x19aec
addq %r8, %rdx
movq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_remove_rr
int ns_remove_rr(ns_msg_t* msg, ns_rr_t *rr)
{
	int i, rrcount;
	ns_rr_t* p;

	rrcount = ns_rrcount(msg);
	for (i = rrcount - 1; i >= 0; i--) {
		p = msg->rrs + i;
		if (p == rr) {
			ns_rdata_free_opts(rr);
			free(rr->rdata);
			memmove(msg->rrs + i, msg->rrs + i + 1,
				(rrcount - i - 1) * sizeof(ns_rr_t));
			msg->arcount--;
			return 0;
		}
	}

	return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %eax
movzwl 0x8(%rdi), %ecx
addl %eax, %ecx
movzwl 0xa(%rdi), %r12d
addl %ecx, %r12d
leaq 0x1(%r12), %rcx
shll $0x5, %r12d
pushq $-0x20
popq %r15
pushq $-0x1
popq %rax
decq %rcx
jle 0x19b89
addq $0x20, %r15
addq $-0x20, %r12
movq 0x18(%rbx), %rdx
addq %r12, %rdx
cmpq %r14, %rdx
jne 0x19b41
movq %r14, %rdi
callq 0x19b95
movq 0x18(%r14), %rdi
callq 0x3460
movq 0x18(%rbx), %rax
leaq (%rax,%r12), %rdi
leaq (%rax,%r12), %rsi
addq $0x20, %rsi
movq %r15, %rdx
callq 0x35b0
decw 0xa(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_rdata_free_opts
static void ns_rdata_free_opts(ns_rr_t *rr)
{
	ns_optlist_t *opts = rr->rdata;
    ns_opt_t *opt;
    
	if (opts != NULL && opts->opts != NULL) {
        int i;
        for (i = 0; i < opts->optcount; i++) {
            opt = opts->opts + i;
            ns_free_opt(opt);
        }
        free(opts->opts);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rbx
testq %rbx, %rbx
je 0x19bcc
cmpq $0x0, (%rbx)
je 0x19bcc
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
movq (%rbx), %rdi
cmpq %rax, %r15
jge 0x19bd2
addq %r14, %rdi
callq 0x19dbb
incq %r15
addq $0x10, %r14
jmp 0x19baf
popq %rbx
popq %r14
popq %r15
retq
popq %rbx
popq %r14
popq %r15
jmp 0x3460
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_add_optrr
ns_rr_t *ns_add_optrr(ns_msg_t *msg)
{
    ns_rr_t *rr, *rrs;

    rrs = realloc(msg->rrs, ((int)ns_rrcount(msg) + 1) * sizeof(ns_rr_t));
    if (rrs == NULL) {
        loge("alloc\n");
        return NULL;
    }
    msg->rrs = rrs;
    rr = msg->rrs + ns_rrcount(msg);
    msg->arcount++;
    memset(rr, 0, sizeof(ns_rr_t));
    rr->type = NS_TYPE_OPT;
    rr->cls = NS_PAYLOAD_SIZE;
    rr->ttl = (NS_EDNS_VERSION << 16) & 0xFF0000;
    return rr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movzwl 0x6(%rbx), %eax
movzwl 0x8(%rbx), %ecx
addl %eax, %ecx
movzwl 0xa(%rbx), %esi
addl %ecx, %esi
shll $0x5, %esi
addq $0x20, %rsi
callq 0x35c0
testq %rax, %rax
je 0x19c49
movq %rax, 0x18(%rbx)
movzwl 0x6(%rbx), %ecx
movzwl 0x8(%rbx), %edx
movzwl 0xa(%rbx), %esi
shll $0x5, %ecx
shll $0x5, %edx
addq %rcx, %rdx
addq %rax, %rdx
movl %esi, %eax
shll $0x5, %eax
leaq (%rdx,%rax), %r14
incl %esi
movw %si, 0xa(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%rdx)
movups %xmm0, 0x10(%rax,%rdx)
movl $0x4000029, 0x8(%rax,%rdx) # imm = 0x4000029
jmp 0x19c7f
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x19c7f
leaq 0x8fa5(%rip), %rsi      # 0x22c04
leaq 0x905c(%rip), %rdx      # 0x22cc2
leaq 0x7c46(%rip), %r8       # 0x218b3
xorl %r14d, %r14d
pushq $0x3
popq %rdi
movl $0x416, %ecx            # imm = 0x416
xorl %eax, %eax
callq 0x1662e
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_remove_optrr
int ns_remove_optrr(ns_msg_t *msg)
{
    int i, rrcount;
    ns_rr_t *rr;

    rrcount = ns_rrcount(msg);
    for (i = rrcount - 1; i >= 0; i--) {
        rr = msg->rrs + i;
        if (rr->type == NS_TYPE_OPT) {
            break;
        }
    }
    if (i >= 0) {
        ns_rdata_free_opts(rr);
        free(rr->rdata);
        memmove(msg->rrs + i, msg->rrs + i + 1,
                (rrcount - i - 1) * sizeof(ns_rr_t));
        msg->arcount--;
        return 0;
    }
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movzwl 0x6(%rdi), %eax
movzwl 0x8(%rdi), %ecx
addl %eax, %ecx
movzwl 0xa(%rdi), %r15d
addl %ecx, %r15d
movl %r15d, %ecx
shll $0x5, %ecx
pushq $-0x20
popq %r14
pushq $-0x1
popq %rax
testq %rcx, %rcx
je 0x19d0d
decq %r15
movq 0x18(%rbx), %r12
addq $0x20, %r14
leaq -0x20(%rcx), %r13
cmpw $0x29, -0x18(%r12,%rcx)
movq %r13, %rcx
jne 0x19cb5
leaq (%r12,%r13), %rdi
callq 0x19b95
movq 0x18(%r12,%r13), %rdi
callq 0x3460
movq 0x18(%rbx), %rax
movl %r15d, %ecx
shlq $0x5, %rcx
leaq (%rax,%rcx), %rdi
leaq (%rax,%rcx), %rsi
addq $0x20, %rsi
movq %r14, %rdx
callq 0x35b0
decw 0xa(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_optrr_find_opt
ns_opt_t *ns_optrr_find_opt(ns_rr_t *rr, uint16_t code)
{
	ns_optlist_t *opts = rr->rdata;
    ns_opt_t *opt;
    int i;
    if (opts != NULL) {
        for (i = 0; i < opts->optcount; i++) {
            opt = opts->opts + i;
            if (opt->code == code) {
                return opt;
            }
        }
    }
    return NULL;
}

// Assembly:
movq 0x18(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x19d4e
movl 0x8(%rcx), %edx
testl %edx, %edx
cmovlel %eax, %edx
shlq $0x4, %rdx
pushq $-0x10
popq %rdi
leaq 0x10(%rdi), %r8
cmpq %r8, %rdx
je 0x19d4e
movq (%rcx), %r9
cmpw %si, 0x10(%r9,%rdi)
movq %r8, %rdi
jne 0x19d31
addq %r8, %r9
movq %r9, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_optrr_remove_opt
int ns_optrr_remove_opt(ns_rr_t *rr, uint16_t code)
{
	ns_optlist_t *opts = rr->rdata;
    ns_opt_t *opt;
    int i;
    if (opts != NULL) {
        for (i = 0; i < opts->optcount; i++) {
            opt = opts->opts + i;
			if (opt->code != code)
				continue;
			ns_free_opt(opt);
			memmove(opts->opts + i, opts->opts + i + 1,
				(opts->optcount - i - 1) * sizeof(ns_opt_t));
			opts->optcount--;
			return 0;
		}
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rbx
pushq $-0x1
popq %rax
testq %rbx, %rbx
je 0x19db6
movl 0x8(%rbx), %ecx
xorl %r14d, %r14d
testl %ecx, %ecx
cmovlel %r14d, %ecx
shlq $0x4, %rcx
pushq $0x1
popq %rbp
cmpq %r14, %rcx
je 0x19db6
movq (%rbx), %rdi
cmpw %si, (%rdi,%r14)
je 0x19d89
addq $0x10, %r14
incl %ebp
jmp 0x19d72
addq %r14, %rdi
callq 0x19dbb
movq (%rbx), %rax
leaq (%rax,%r14), %rdi
leaq (%rax,%r14), %rsi
addq $0x10, %rsi
movl 0x8(%rbx), %eax
subl %ebp, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
callq 0x35b0
decl 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_optrr_new_opt
ns_opt_t *ns_optrr_new_opt(ns_optlist_t *opts, int optcode)
{
	ns_opt_t *newlist, * opt;

	newlist = realloc(opts->opts, (opts->optcount + 1) * sizeof(ns_opt_t));
	if (newlist == NULL)
		return NULL;
	opts->opts = newlist;
	opt = newlist + opts->optcount;
	opts->optcount++;
	memset(opt, 0, sizeof(ns_opt_t));
	opt->code = optcode;

	return opt;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rdi
movslq 0x8(%r14), %rsi
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x35c0
testq %rax, %rax
je 0x19e14
movq %rax, (%r14)
movslq 0x8(%r14), %rcx
leal 0x1(%rcx), %edx
movq %rcx, %rsi
shlq $0x4, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movl %edx, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%rsi)
movw %bx, (%rax,%rsi)
jmp 0x19e16
xorl %ecx, %ecx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_optrr_set_opt
ns_opt_t* ns_optrr_set_opt(ns_rr_t* rr, uint16_t code, uint16_t len, const char *data)
{
	ns_optlist_t* opts = rr->rdata;
	ns_opt_t* opt;

	if (opts == NULL) {
		opts = malloc(sizeof(ns_optlist_t));
		if (opts == NULL)
			return NULL;
		memset(opts, 0, sizeof(ns_optlist_t));
		rr->rdata = opts;
	}

	opt = ns_optrr_find_opt(rr, code);

	if (opt == NULL) {
		opt = ns_optrr_new_opt(opts, code);
		if (opt == NULL)
			return NULL;
	}

	ns_free_opt(opt);

	opt->code = code;
	opt->length = len;
	opt->data = malloc(len);

	if (opt->data == NULL)
		return NULL;

	memcpy(opt->data, data, opt->length);

	return opt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movq 0x18(%rdi), %r12
testq %r12, %r12
jne 0x19e57
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x3250
testq %rax, %rax
je 0x19eb4
movq %rax, %r12
movq %rax, 0x18(%r15)
movzwl %r14w, %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x19d17
testq %rax, %rax
jne 0x19e7b
movq %r12, %rdi
movl %r13d, %esi
callq 0x19dca
testq %rax, %rax
je 0x19eb4
movq %rax, %r15
movq %rax, %rdi
callq 0x19dbb
movw %r14w, (%r15)
movw %bp, 0x2(%r15)
movzwl %bp, %r14d
movq %r14, %rdi
callq 0x34c0
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x19eb4
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x32c0
jmp 0x19eb7
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_ecs_parse_subnet
int ns_ecs_parse_subnet(struct sockaddr *addr /*out*/, int *pmask /*out*/, const char *str /*in*/)
{
	char buf[INET6_ADDRSTRLEN], *sp_pos;
	int mask = -1;
	int is_ipv6;

	strncpy(buf, str, INET6_ADDRSTRLEN);
	buf[INET6_ADDRSTRLEN - 1] = '\0';

	sp_pos = strrchr(buf, '/');
	if (sp_pos) {
		*sp_pos = 0;
		mask = atoi(sp_pos + 1);
	}

	is_ipv6 = buf[0] =='[' || strchr(buf, ':');

	if (is_ipv6) {
		struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)addr;
		struct in6_addr *ip = &(addr6->sin6_addr);
		if (inet_pton(AF_INET6, buf, ip) != 1) {
			loge("invalid addr %s: errno=%d, %s\n",
				str, errno, strerror(errno));
			return -1;
		}
		addr6->sin6_family = AF_INET6;
		if (mask == -1) mask = 128;
	}
	else {
		struct sockaddr_in *addr4 = (struct sockaddr_in *)addr;
		struct in_addr *ip = &(addr4->sin_addr);
		if (inet_pton(AF_INET, buf, ip) != 1) {
			loge("invalid addr %s: errno=%d, %s\n",
				str, errno, strerror(errno));
			return -1;
		}
		addr4->sin_family = AF_INET;
		if (mask == -1) mask = 32;
	}

	*pmask = mask;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
pushq $0x2e
popq %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x31e0
movb $0x0, 0x2d(%r12)
pushq $0x2f
popq %rsi
movq %r12, %rdi
callq 0x3400
testq %rax, %rax
je 0x19f17
movb $0x0, (%rax)
incq %rax
movq %rax, %rdi
callq 0x3580
movl %eax, %ebp
jmp 0x19f1a
pushq $-0x1
popq %rbp
cmpb $0x5b, (%rsp)
je 0x19f34
movq %rsp, %rdi
pushq $0x3a
popq %rsi
callq 0x3150
testq %rax, %rax
je 0x19fc0
leaq 0x8(%r15), %rdx
pushq $0xa
popq %rdi
movq %rsp, %rsi
callq 0x3640
cmpl $0x1, %eax
jne 0x19f62
movl $0x80, %eax
movw $0xa, %cx
movw %cx, (%r15)
cmpl $-0x1, %ebp
cmovnel %ebp, %eax
movl %eax, (%r14)
xorl %ebp, %ebp
jmp 0x19fb1
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbp
cmpl $0x3, (%rax)
jl 0x19fb1
callq 0x3040
movl (%rax), %r14d
movl %r14d, %edi
callq 0x3140
movq %rax, %r10
leaq 0x8c79(%rip), %rsi      # 0x22c04
leaq 0x8d3d(%rip), %rdx      # 0x22ccf
leaq 0x8d4a(%rip), %r8       # 0x22ce3
pushq $0x3
popq %rdi
movl $0x4a7, %ecx            # imm = 0x4A7
movq %rbx, %r9
xorl %eax, %eax
pushq %r10
pushq %r14
callq 0x1662e
popq %rax
popq %rcx
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4(%r15), %rdx
pushq $0x2
popq %rdi
movq %rsp, %rsi
callq 0x3640
cmpl $0x1, %eax
jne 0x19fe0
pushq $0x20
popq %rax
movw $0x2, %cx
jmp 0x19f51
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbp
cmpl $0x3, (%rax)
jl 0x19fb1
callq 0x3040
movl (%rax), %r14d
movl %r14d, %edi
callq 0x3140
movq %rax, %r10
leaq 0x8bfb(%rip), %rsi      # 0x22c04
leaq 0x8cbf(%rip), %rdx      # 0x22ccf
leaq 0x8ccc(%rip), %r8       # 0x22ce3
pushq $0x3
popq %rdi
movl $0x4b2, %ecx            # imm = 0x4B2
jmp 0x19fa1
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_optrr_set_ecs
int ns_optrr_set_ecs(ns_rr_t *rr, struct sockaddr *addr, int srcprefix, int scopeprefix)
{
	ns_optlist_t *opts = rr->rdata;
	ns_opt_t *opt;

	if (opts == NULL) {
		opts = malloc(sizeof(ns_optlist_t));
        if (opts == NULL)
            return -1;
		memset(opts, 0, sizeof(ns_optlist_t));
		rr->rdata = opts;
    }

	opt = ns_optrr_find_ecs(rr);

	if (opt == NULL) {
		opt = ns_optrr_new_opt(opts, NS_OPTCODE_ECS);
		if (opt == NULL)
			return -1;
	}
    
    return ns_set_ecs(opt, addr, srcprefix, scopeprefix);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r12
movq 0x18(%rdi), %r15
testq %r15, %r15
jne 0x1a28a
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x3250
testq %rax, %rax
je 0x1a2c1
movq %rax, %r15
movq %rax, 0x18(%r12)
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x19d17
testq %rax, %rax
jne 0x1a2aa
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x19dca
testq %rax, %rax
je 0x1a2c1
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1a021
pushq $-0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq