LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/http-parser/http_parser.c
// Function: http_message_needs_eof
int
http_message_needs_eof (const http_parser *parser)
{
  if (parser->type == HTTP_REQUEST) {
    return 0;
  }

  /* See RFC 2616 section 4.4 */
  if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */
      parser->status_code == 204 ||     /* No Content */
      parser->status_code == 304 ||     /* Not Modified */
      parser->flags & F_SKIPBODY) {     /* response to a HEAD request */
    return 0;
  }

  /* RFC 7230 3.3.3, see `s_headers_almost_done` */
  if ((parser->uses_transfer_encoding == 1) &&
      (parser->flags & F_CHUNKED) == 0) {
    return 1;
  }

  if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {
    return 0;
  }

  return 1;
}

// Assembly:
movl (%rdi), %ecx
xorl %eax, %eax
testb $0x3, %cl
je 0x7345
btl $0x8, %ecx
jb 0x7345
movzwl 0x14(%rdi), %edx
cmpl $0x130, %edx            # imm = 0x130
je 0x7345
cmpl $0xcc, %edx
je 0x7345
addl $0xffffff38, %edx       # imm = 0xFFFFFF38
cmpl $-0x65, %edx
ja 0x7345
movl %ecx, %edx
andl $0x4, %edx
shrl $0x2, %edx
andl $0x20000004, %ecx       # imm = 0x20000004
cmpl $0x20000000, %ecx       # imm = 0x20000000
sete %al
orb %al, %dl
jne 0x7345
cmpq $-0x1, 0x8(%rdi)
sete %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/base64url.c
// Function: base64url_encode
char *base64url_encode(const unsigned char *data,
                    int input_length,
                    int *output_length,
                    int tail_padding, int dns)
{
	char *table = dns ? dns_encoding_table : encoding_table;
    char *encoded_data;
    int padding, i, j;

    *output_length = 4 * ((input_length + 2) / 3);

    encoded_data = malloc(*output_length + 1);

    if (encoded_data == NULL) return NULL;

    for (i = 0, j = 0; i < input_length;) {

        uint32_t octet_a = i < input_length ? (unsigned char)data[i++] : 0;
        uint32_t octet_b = i < input_length ? (unsigned char)data[i++] : 0;
        uint32_t octet_c = i < input_length ? (unsigned char)data[i++] : 0;

        uint32_t triple = (octet_a << 0x10) + (octet_b << 0x08) + octet_c;

        encoded_data[j++] = table[(triple >> 3 * 6) & 0x3F];
        encoded_data[j++] = table[(triple >> 2 * 6) & 0x3F];
        encoded_data[j++] = table[(triple >> 1 * 6) & 0x3F];
        encoded_data[j++] = table[(triple >> 0 * 6) & 0x3F];
    }

    padding = mod_table[input_length % 3];

    if (tail_padding) {
        for (i = 0; i < padding; i++) {
            encoded_data[*output_length - i - 1] = '=';
        }
    }
    else {
        *output_length -= padding;
    }


    encoded_data[*output_length] = '\0';

    return encoded_data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
testl %r8d, %r8d
leaq 0x18994(%rip), %rax     # 0x20540
leaq 0x1894d(%rip), %r13     # 0x20500
cmoveq %rax, %r13
leal 0x2(%r14), %eax
pushq $0x3
popq %rcx
cltd
idivl %ecx
leal (,%rax,4), %r12d
movl %r12d, (%rbx)
leal 0x1(,%rax,4), %eax
movslq %eax, %rdi
callq 0x34c0
movq %rax, %rcx
testq %rax, %rax
je 0x7cc5
movq %rcx, %rax
addq $0x3, %rax
xorl %r9d, %r9d
cmpl %r14d, %r9d
jge 0x7c81
movslq %r9d, %r8
leaq 0x1(%r8), %rdx
xorl %esi, %esi
movl $0x0, %edi
cmpl %r14d, %edx
jge 0x7c1c
addl $0x2, %r9d
movzbl (%r15,%rdx), %edi
shll $0x8, %edi
movl %r9d, %edx
cmpl %r14d, %edx
jge 0x7c2b
movslq %edx, %rsi
incl %edx
movzbl (%r15,%rsi), %esi
movzbl (%r15,%r8), %r8d
shll $0x10, %r8d
movl %esi, %r9d
orl %edi, %r9d
orl %r8d, %edi
shrl $0x12, %r8d
movb (%r13,%r8), %r8b
movb %r8b, -0x3(%rax)
shrl $0xc, %edi
andl $0x3f, %edi
movb (%r13,%rdi), %dil
movb %dil, -0x2(%rax)
shrl $0x6, %r9d
andl $0x3f, %r9d
movb (%r13,%r9), %dil
movb %dil, -0x1(%rax)
andl $0x3f, %esi
movb (%r13,%rsi), %sil
movb %sil, (%rax)
addq $0x4, %rax
movl %edx, %r9d
jmp 0x7bf1
movl %r14d, %eax
cltd
pushq $0x3
popq %rsi
idivl %esi
movslq %edx, %rax
leaq 0x188ec(%rip), %rdx     # 0x20580
movl (%rdx,%rax,4), %edx
testl %ebp, %ebp
je 0x7cb8
xorl %eax, %eax
testl %edx, %edx
cmovgl %edx, %eax
leal -0x1(%r12), %edx
subq $0x1, %rax
jb 0x7cbe
movslq %edx, %rdx
movb $0x3d, (%rcx,%rdx)
decl %edx
jmp 0x7ca7
subl %edx, %r12d
movl %r12d, (%rbx)
movslq %r12d, %rax
movb $0x0, (%rcx,%rax)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel.c
// Function: channel_create
int channel_create(
	channel_t** pctx,
	const char* name,
    const char* args,
	const config_t* conf,
	const proxy_t* proxies,
	const int proxy_num,
	const chnroute_ctx chnr,
	const chnroute_ctx blacklist,
	void* data)
{
	channel_info_t* info;
	char chname[20] = {0};
	char *dot;

	dot = strchr(name, '.');
	if (dot) {
		memcpy(chname, name, MIN(dot - name, sizeof(chname) - 1));
	}
	else {
		strncpy(chname, name, sizeof(chname) - 1);
	}

	info = _infos;
	while (info) {

		if (strcmp(info->name, chname) == 0) {
			return info->create(pctx,
				name, args, conf,
				proxies, proxy_num,
				chnr, blacklist,
				data);
		}

		info++;
	}
	return CHANNEL_NO_EXIST;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andl $0x0, 0x20(%rsp)
pushq $0x2e
popq %rsi
movq %r13, %rdi
callq 0x3150
testq %rax, %rax
je 0x7d36
subq %r13, %rax
cmpq $0x13, %rax
pushq $0x13
popq %rdx
cmovbq %rax, %rdx
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x32c0
jmp 0x7d46
leaq 0x10(%rsp), %rdi
pushq $0x13
popq %rdx
movq %r13, %rsi
callq 0x31e0
leaq 0x25f53(%rip), %r14     # 0x2dca0
leaq 0x10(%rsp), %rbx
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x34f0
addq $0x10, %r14
testl %eax, %eax
jne 0x7d52
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq 0x38(%rsp), %r8
movl 0x14(%rsp), %r9d
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq 0x88(%rsp)
callq *-0x8(%r14)
addq $0x58, %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/channel_cache.c
// Function: cache_get
const ns_msg_t *cache_get(channel_t *ctx, const char *key)
{
	cache_t *c = (cache_t*)ctx;
	cache_item_t *item;
	struct rbnode_t *rbn;

	if (!key) {
		loge("invalid arguments\n");
		return NULL;
	}

	rbn = rbtree_lookup(&c->dic, key);
	if (!rbn) {
		loge("item not exists - %s\n", key);
		return NULL;
	}

	item = rbtree_container_of(rbn, cache_item_t, node);
	return item->msg;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x7fd6
movq %rsi, %r14
addq $0x68, %rdi
callq 0x38ef
testq %rax, %rax
je 0x800c
movq 0x38(%rax), %rbx
jmp 0x8043
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x8043
leaq 0x18611(%rip), %rsi     # 0x205fc
leaq 0x1861e(%rip), %rdx     # 0x20610
leaq 0x18621(%rip), %r8      # 0x2061a
xorl %ebx, %ebx
pushq $0x3
popq %rdi
movl $0xc8, %ecx
xorl %eax, %eax
callq 0x1662e
jmp 0x8043
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x8043
leaq 0x185db(%rip), %rsi     # 0x205fc
leaq 0x185e8(%rip), %rdx     # 0x20610
leaq 0x185fe(%rip), %r8      # 0x2062d
xorl %ebx, %ebx
pushq $0x3
popq %rdi
movl $0xce, %ecx
movq %r14, %r9
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_cache.c
// Function: cache_remove
int cache_remove(channel_t *ctx, const char *key)
{
	cache_t *c = (cache_t*)ctx;
	cache_item_t *item;
	struct rbnode_t *rbn;

	if (!key) {
		loge("invalid arguments\n");
		return -1;
	}

	rbn = rbtree_lookup(&c->dic, key);
	if (!rbn) {
		loge("item not exists - %s\n", key);
		return -1;
	}

	item = rbtree_container_of(rbn, cache_item_t, node);
	dllist_remove(&item->entry);
	rbtree_remove(&c->dic, &item->node);
	cache_item_destroy(item);
	logi("cache removed: %s\n", key);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x80cd
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %r14
movq %r14, %rdi
callq 0x38ef
testq %rax, %rax
je 0x8102
movq %rax, %r15
movq 0x28(%rax), %rax
movq 0x30(%r15), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x392c
movq %r15, %rdi
callq 0x8145
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x165f5
cmpl $0x6, (%rax)
jl 0x8138
leaq 0x18549(%rip), %rsi     # 0x205fc
leaq 0x18589(%rip), %rdx     # 0x20643
leaq 0x1858f(%rip), %r8      # 0x20650
xorl %ebp, %ebp
pushq $0x6
popq %rdi
movl $0xeb, %ecx
jmp 0x812e
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbp
cmpl $0x3, (%rax)
jl 0x8138
leaq 0x18519(%rip), %rsi     # 0x205fc
leaq 0x18559(%rip), %rdx     # 0x20643
leaq 0x18529(%rip), %r8      # 0x2061a
pushq $0x3
popq %rdi
movl $0xdd, %ecx
xorl %eax, %eax
callq 0x1662e
jmp 0x8138
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbp
cmpl $0x3, (%rax)
jl 0x8138
leaq 0x184e4(%rip), %rsi     # 0x205fc
leaq 0x18524(%rip), %rdx     # 0x20643
leaq 0x18507(%rip), %r8      # 0x2062d
pushq $0x3
popq %rdi
movl $0xe3, %ecx
movq %rbx, %r9
xorl %eax, %eax
callq 0x1662e
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_cache.c
// Function: cache_item_destroy
static void cache_item_destroy(cache_item_t* item)
{
	if (item) {
		free(item->node.key);
		ns_msg_free(item->msg);
		free(item->msg);
		free(item);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x8171
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3460
movq 0x38(%rbx), %rdi
callq 0x188ce
movq 0x38(%rbx), %rdi
callq 0x3460
movq %rbx, %rdi
popq %rbx
jmp 0x3460
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_cache.c
// Function: cache_item_add
static void cache_item_add(cache_t* c, cache_item_t* item)
{
	dlitem_t* cur, * nxt;
	cache_item_t* p;

	/* TODO: Use Heap Data Structure, see https://en.wikipedia.org/wiki/Heap_(data_structure) */
	dllist_foreach(&c->items, cur, nxt,
		cache_item_t, p, entry) {
		
		if (p->expire >= item->expire) {
			dllist_add_before(&p->entry, &item->entry);
			return;
		}
	}

	dllist_add(&c->items, &item->entry);
}

// Assembly:
leaq 0x58(%rdi), %rcx
movq %rcx, %rax
movq (%rax), %rax
cmpq %rcx, %rax
je 0x8457
movq 0x18(%rax), %rdx
cmpq 0x40(%rsi), %rdx
jl 0x842d
leaq 0x28(%rsi), %rcx
movq %rax, 0x28(%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsi)
movq %rcx, (%rdx)
movq %rcx, 0x8(%rax)
retq
leaq 0x28(%rsi), %rax
movq %rcx, 0x28(%rsi)
movq 0x60(%rdi), %rcx
movq %rcx, 0x30(%rsi)
movq %rax, (%rcx)
movq %rax, 0x60(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_cache.c
// Function: cache_load_cachedbs
int cache_load_cachedbs(channel_t *ctx, const char *filenames, int override)
{
	char *s, *p, *saveptr = NULL;
	struct stat fstat = {0};

	if (!filenames || !*filenames) {
		loge("Invalid filenames: %s\n", filenames);
		return -1;
	}

	s = strdup(filenames);

	for (p = strtok_r(s, ",", &saveptr);
		p && *p;
		p = strtok_r(NULL, ",", &saveptr)) {

		if (stat(p, &fstat)) {
			logw("Failed to load cache: Failed to open the file - \"%s\"\n", p);
		}
		else if (cache_load_cachedb(ctx, p, override) == -1) {
			free(s);
			return -1;
		}
	}

	free(s);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
andq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
movl $0x90, %edx
xorl %esi, %esi
callq 0x31f0
testq %r15, %r15
je 0x921c
cmpb $0x0, (%r15)
je 0x921c
movq %r15, %rdi
callq 0x3620
leaq 0x17703(%rip), %r12     # 0x20878
leaq 0x10(%rsp), %r13
leaq 0x18(%rsp), %rbp
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3610
testq %rax, %rax
je 0x9254
movq %rax, %r15
cmpb $0x0, (%rax)
je 0x9254
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3300
testl %eax, %eax
je 0x91f2
xorl %eax, %eax
callq 0x165f5
cmpl $0x4, (%rax)
movl $0x0, %edi
jl 0x9187
pushq $0x4
popq %rdi
leaq 0x1742b(%rip), %rsi     # 0x205fc
leaq 0x17675(%rip), %rdx     # 0x2084d
movl $0x269, %ecx            # imm = 0x269
leaq 0x17696(%rip), %r8      # 0x2087a
movq %r15, %r9
xorl %eax, %eax
callq 0x1662e
xorl %edi, %edi
jmp 0x9187
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x8c3f
movl $0x0, %edi
cmpl $-0x1, %eax
jne 0x9187
movq 0x8(%rsp), %rdi
callq 0x3460
pushq $-0x1
popq %rbx
jmp 0x9260
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0x9260
leaq 0x173ca(%rip), %rsi     # 0x205fc
leaq 0x17614(%rip), %rdx     # 0x2084d
leaq 0x17621(%rip), %r8      # 0x20861
pushq $0x3
popq %rdi
movl $0x25e, %ecx            # imm = 0x25E
movq %r15, %r9
xorl %eax, %eax
callq 0x1662e
jmp 0x9260
movq 0x8(%rsp), %rdi
callq 0x3460
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xa8, %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/channel_cache.c
// Function: cache_create
int cache_create(
	channel_t** pctx,
	const char* name,
	const char* args,
	const config_t* conf,
	const proxy_t* proxies,
	const int proxy_num,
	const chnroute_ctx chnr,
	const chnroute_ctx blacklist,
	void* data)
{
	cache_t* ctx;

	ctx = (cache_t*)malloc(sizeof(cache_t));
	if (!ctx) {
		loge("alloc\n");
		return CHANNEL_ALLOC;
	}

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

	dllist_init(&ctx->items);
	rbtree_init(&ctx->dic, rbkeycmp);

	ctx->name = name;
	ctx->conf = conf;
	ctx->proxies = proxies;
	ctx->proxy_num = proxy_num;
	ctx->chnr = chnr;
	ctx->blacklist = blacklist;
	ctx->data = data;

	ctx->fdset = fdset;
	ctx->step = step;
	ctx->query = query;
	ctx->destroy = destroy;

	if (args) {
		struct cb_querystring_state_t st[1] = {{
			.ctx = ctx, .override = FALSE,
		}};
		if (parse_querystring(args, cb_querystring, st)) {
			loge("invalid args: %s\n", args);
			return CHANNEL_WRONG_ARG;
		}
	}

	*pctx = (channel_t*)ctx;

	return CHANNEL_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
pushq $0x1
popq %rdi
pushq $0x78
popq %rsi
callq 0x3250
testq %rax, %rax
je 0x9384
movq %rax, %r15
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %rdx
movq %r15, %rsi
addq $0x58, %rsi
movq %rsi, 0x58(%r15)
movq %rsi, 0x60(%r15)
leaq 0xfa(%rip), %rsi        # 0x93cc
movq %rsi, 0x70(%r15)
movq %r14, (%r15)
movq %r13, 0x8(%r15)
movq %r12, 0x10(%r15)
movl %ebp, 0x18(%r15)
movq %rdx, 0x20(%r15)
movq %rcx, 0x28(%r15)
movq %rax, 0x50(%r15)
leaq 0xd9(%rip), %rax        # 0x93d1
movq %rax, 0x30(%r15)
leaq 0xd1(%rip), %rax        # 0x93d4
movq %rax, 0x38(%r15)
leaq 0x178(%rip), %rax       # 0x9486
movq %rax, 0x40(%r15)
leaq 0x222(%rip), %rax       # 0x953b
movq %rax, 0x48(%r15)
testq %rbx, %rbx
je 0x9378
leaq 0x10(%rsp), %rdx
movq %r15, (%rdx)
andl $0x0, 0x8(%rdx)
leaq 0x244(%rip), %rsi       # 0x9579
movq %rbx, %rdi
callq 0x1c9ca
testl %eax, %eax
je 0x9378
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x9374
leaq 0x172a8(%rip), %rsi     # 0x205fc
leaq 0x17555(%rip), %rdx     # 0x208b0
leaq 0x1755b(%rip), %r8      # 0x208bd
pushq $0x3
popq %rdi
movl $0x2b3, %ecx            # imm = 0x2B3
movq %rbx, %r9
xorl %eax, %eax
callq 0x1662e
pushq $0x2
jmp 0x93ba
movq 0x8(%rsp), %rax
movq %r15, (%rax)
xorl %ebx, %ebx
jmp 0x93bb
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x93b8
leaq 0x17265(%rip), %rsi     # 0x205fc
leaq 0x17512(%rip), %rdx     # 0x208b0
leaq 0x1850e(%rip), %r8      # 0x218b3
pushq $0x3
popq %rbx
movl %ebx, %edi
movl $0x298, %ecx            # imm = 0x298
xorl %eax, %eax
callq 0x1662e
jmp 0x93bb
pushq $0x3
popq %rbx
movl %ebx, %eax
addq $0x28, %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/channel_cache.c
// Function: step
static int step(channel_t* ctx,
	fd_set* readset, fd_set* writeset, fd_set* errorset)
{
	cache_t* c = (cache_t*)ctx;
	if (c->conf->cache_timeout != CACHE_TIMEOUT_NEVEL_EXPIRE) {
		cache_check_expire(c);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
cmpl $0x0, 0x8c(%rax)
je 0x9475
movq %rdi, %rbx
xorl %edi, %edi
callq 0x3320
movq %rax, %r14
leaq 0x58(%rbx), %r13
movq 0x58(%rbx), %rbp
addq $0x68, %rbx
cmpq %r13, %rbp
je 0x9475
cmpq %r14, 0x18(%rbp)
jg 0x9475
leaq -0x28(%rbp), %r12
movq (%rbp), %r15
xorl %eax, %eax
callq 0x165f5
cmpl $0x6, (%rax)
jl 0x944e
movq (%r12), %r9
pushq $0x6
popq %rdi
leaq 0x171c6(%rip), %rsi     # 0x205fc
leaq 0x17510(%rip), %rdx     # 0x2094d
pushq $0x5e
popq %rcx
leaq 0x17519(%rip), %r8      # 0x20960
xorl %eax, %eax
callq 0x1662e
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x392c
movq %r12, %rdi
callq 0x8145
movq %r15, %rbp
jmp 0x9409
xorl %eax, %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/channel_cache.c
// Function: query
static int query(channel_t* ctx,
	const ns_msg_t* msg,
	channel_query_cb callback, void* state)
{
	cache_t* c = (cache_t*)ctx;
	const char* key;
	struct rbnode_t* rbn;
	cache_item_t* item;

	key = msg_key(msg);

	rbn = rbtree_lookup(&c->dic, key);
	if (!rbn) {
		goto error;
	}

	item = rbtree_container_of(rbn, cache_item_t, node);

	logi("hit cache: %s - %s\n", key, msg_answers(item->msg));

	if (callback)
		callback(ctx, 0, item->msg, TRUE, TRUE, state);

	return 0;

error:
	if (callback)
		callback(ctx, -1, NULL, TRUE, FALSE, state);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x9107
movq %rax, %r13
leaq 0x68(%r15), %rdi
movq %rax, %rsi
callq 0x38ef
testq %rax, %rax
je 0x9513
movq %rax, %r12
xorl %eax, %eax
callq 0x165f5
cmpl $0x6, (%rax)
jl 0x94fc
movq 0x38(%r12), %rdi
callq 0x18bcb
movq %rax, (%rsp)
leaq 0x17120(%rip), %rsi     # 0x205fc
leaq 0x17800(%rip), %rdx     # 0x20ce3
leaq 0x1748a(%rip), %r8      # 0x20974
pushq $0x6
popq %rdi
movl $0x99, %ecx
movq %r13, %r9
xorl %eax, %eax
callq 0x1662e
testq %rbx, %rbx
je 0x952b
movq 0x38(%r12), %rdx
pushq $0x1
popq %rcx
movq %r15, %rdi
xorl %esi, %esi
movl %ecx, %r8d
jmp 0x9526
testq %rbx, %rbx
je 0x952b
pushq $-0x1
popq %rsi
pushq $0x1
popq %rcx
movq %r15, %rdi
xorl %edx, %edx
xorl %r8d, %r8d
movq %r14, %r9
callq *%rbx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_cache.c
// Function: destroy
static void destroy(channel_t* ctx)
{
	cache_t* c = (cache_t*)ctx;
	dlitem_t* cur, * nxt;
	cache_item_t* item;
	dllist_foreach(&c->items, cur, nxt,
		cache_item_t, item, entry) {
		dllist_remove(&item->entry);
		cache_item_destroy(item);
	}
	c->dic.root = NULL;
	free(ctx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x58(%rdi), %r14
movq 0x58(%rdi), %rax
cmpq %r14, %rax
je 0x956c
leaq -0x28(%rax), %rdi
movq (%rax), %r15
movq 0x8(%rax), %rax
movq %r15, (%rax)
movq %rax, 0x8(%r15)
callq 0x8145
movq %r15, %rax
jmp 0x954b
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3460
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: fdset
static sock_t fdset(channel_t* ctx,
	fd_set* readset, fd_set* writeset, fd_set* errorset)
{
	channel_chndoh_t* c = (channel_chndoh_t*)ctx;
	sock_t maxfd = 0, fd;

	if (c->chndoh.channel == CH_DOH) {
		if (c->chndoh.http) {
			fd = http_fdset(c->chndoh.http, readset, writeset, errorset);
			if (fd < 0) return -1;
			maxfd = MAX(maxfd, fd);
		}
	}
	else if (c->chndoh.chctx) {
		fd = c->chndoh.chctx->fdset(c->chndoh.chctx, readset, writeset, errorset);
		if (fd < 0) return -1;
		maxfd = MAX(maxfd, fd);
	}

	if (c->frndoh.channel == CH_DOH) {
		if (c->frndoh.http) {
			fd = http_fdset(c->frndoh.http, readset, writeset, errorset);
			if (fd < 0) return -1;
			maxfd = MAX(maxfd, fd);
		}
	}
	else if (c->frndoh.chctx) {
		fd = c->frndoh.chctx->fdset(c->frndoh.chctx, readset, writeset, errorset);
		if (fd < 0) return -1;
		maxfd = MAX(maxfd, fd);
	}

	return maxfd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpl $0x1, 0x630(%rdi)
movq 0x638(%rdi), %rdi
pushq $-0x1
popq %rbx
jne 0x9f3d
testq %rdi, %rdi
je 0x9f56
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x141be
jmp 0x9f4e
testq %rdi, %rdi
je 0x9f56
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x30(%rdi)
testl %eax, %eax
js 0x9f9c
movl %eax, %ebp
jmp 0x9f58
xorl %ebp, %ebp
cmpl $0x1, 0xc00(%r13)
movq 0xc08(%r13), %rdi
jne 0x9f7e
testq %rdi, %rdi
je 0x9f9a
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x141be
jmp 0x9f8f
testq %rdi, %rdi
je 0x9f9a
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x30(%rdi)
testl %eax, %eax
js 0x9f9c
cmpl %eax, %ebp
cmoval %ebp, %eax
jmp 0x9f9e
movl %ebp, %ebx
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/channel_chndoh.c
// Function: step
static int step(channel_t* ctx,
	fd_set* readset, fd_set* writeset, fd_set* errorset)
{
	channel_chndoh_t* c = (channel_chndoh_t*)ctx;
	int r;

	if (is_auto_relolve(&c->chndoh)) {
		query_doh_addr(c, &c->chndoh);
	}

	if (is_auto_relolve(&c->frndoh)) {
		query_doh_addr(c, &c->frndoh);
	}

	if (c->chndoh.channel == CH_DOH) {
		if (c->chndoh.http) {
			http_step(c->chndoh.http, readset, writeset, errorset);
		}
	}
	else if (c->chndoh.chctx) {
		r = c->chndoh.chctx->step(c->chndoh.chctx, readset, writeset, errorset);
		if (r) return -1;
	}

	if (c->frndoh.channel == CH_DOH) {
		if (c->frndoh.http) {
			http_step(c->frndoh.http, readset, writeset, errorset);
		}
	}
	else if (c->frndoh.chctx) {
		r = c->frndoh.chctx->step(c->frndoh.chctx, readset, writeset, errorset);
		if (r) return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpl $0x1, 0x630(%rdi)
jne 0x9ffb
cmpl $0x0, 0x648(%r12)
je 0x9ffb
leaq 0x80(%r12), %r13
movq (%r13), %rbp
xorl %edi, %edi
callq 0x3320
cmpq %rax, %rbp
jge 0x9ffb
movq %r12, %rdi
movq %r13, %rsi
callq 0xa69d
cmpl $0x1, 0xc00(%r12)
jne 0xa034
cmpl $0x0, 0xc18(%r12)
je 0xa034
leaq 0x650(%r12), %r13
movq (%r13), %rbp
xorl %edi, %edi
callq 0x3320
cmpq %rax, %rbp
jge 0xa034
movq %r12, %rdi
movq %r13, %rsi
callq 0xa69d
cmpl $0x1, 0x630(%r12)
movq 0x638(%r12), %rdi
pushq $-0x1
popq %rbp
jne 0xa05f
testq %rdi, %rdi
je 0xa074
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1422e
jmp 0xa074
testq %rdi, %rdi
je 0xa074
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x38(%rdi)
testl %eax, %eax
jne 0xa0b3
cmpl $0x1, 0xc00(%r12)
movq 0xc08(%r12), %rdi
jne 0xa09c
testq %rdi, %rdi
je 0xa0b1
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1422e
jmp 0xa0b1
testq %rdi, %rdi
je 0xa0b1
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x38(%rdi)
testl %eax, %eax
jne 0xa0b3
xorl %ebp, %ebp
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_O2/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: query
static int query(channel_t* ctx,
	const ns_msg_t* msg,
	channel_query_cb callback, void* state)
{
	channel_chndoh_t* c = (channel_chndoh_t*)ctx;
	channel_req_t* req;

	if (c->req_count > MAX_QUEUE_SIZE) {
		loge("request queue is full\n");
		return -1;
	}

	req = myreq_new(c, msg, callback, state);
	if (!req)
		return -1;

	dllist_add(&c->reqs, &req->entry);
	rbtree_insert(&c->reqdic, &req->rbn);
	c->req_count++;

	if (doh_query(req)) {
		loge("doh_query() error\n");
		dllist_remove(&req->entry);
		rbtree_remove(&c->reqdic, &req->rbn);
		c->req_count--;
		myreq_destroy(req);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x7531, 0x78(%rdi)     # imm = 0x7531
jl 0xa112
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xa1c4
leaq 0x168c0(%rip), %rsi     # 0x209b0
leaq 0x16bec(%rip), %rdx     # 0x20ce3
leaq 0x16ed4(%rip), %r8      # 0x20fd2
pushq $0x3
popq %rdi
movl $0x3fa, %ecx            # imm = 0x3FA
xorl %eax, %eax
callq 0x1662e
jmp 0xa1c4
movq %rdi, %r14
callq 0xa820
pushq $-0x1
popq %rbx
testq %rax, %rax
je 0xa1c4
movq %rax, %r15
leaq 0x58(%r14), %rax
leaq 0x28(%r15), %rcx
movq %rax, 0x28(%r15)
movq 0x60(%r14), %rax
movq %rax, 0x30(%r15)
movq %rcx, (%rax)
movq %rcx, 0x60(%r14)
leaq 0x68(%r14), %r12
movq %r15, %r13
addq $0x38, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x378c
incl 0x78(%r14)
movq %r15, %rdi
callq 0xaa95
testl %eax, %eax
je 0xa1c2
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0xa19a
leaq 0x16833(%rip), %rsi     # 0x209b0
leaq 0x16b5f(%rip), %rdx     # 0x20ce3
leaq 0x16b07(%rip), %r8      # 0x20c92
pushq $0x3
popq %rdi
movl $0x407, %ecx            # imm = 0x407
xorl %eax, %eax
callq 0x1662e
movq 0x28(%r15), %rax
movq 0x30(%r15), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %r12, %rdi
movq %r13, %rsi
callq 0x392c
decl 0x78(%r14)
movq %r15, %rdi
callq 0xab90
jmp 0xa1c4
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: destroy
static void destroy(channel_t* ctx)
{
	channel_chndoh_t* c = (channel_chndoh_t*)ctx;
	dlitem_t* cur, * nxt;
	channel_req_t* req;

	dllist_foreach(&c->reqs, cur, nxt,
		channel_req_t, req, entry) {
		dllist_remove(&req->entry);
		if (req->callback)
			req->callback(ctx, -1, NULL, FALSE, FALSE, req->cb_state);
		myreq_destroy(req);
	}

	free(c->chndoh.name);
	free(c->chndoh.addrstr);
	free(c->chndoh.host);
	free(c->chndoh.path);
	free(c->chndoh.net.name);
	free(c->chndoh.net6.name);
	if (c->chndoh.channel == CH_DOH && c->chndoh.http) {
		http_destroy(c->chndoh.http);
		c->chndoh.http = NULL;
	}
	else if (c->chndoh.chctx) {
		c->chndoh.chctx->destroy(c->chndoh.chctx);
		c->chndoh.chctx = NULL;
	}

	free(c->frndoh.name);
	free(c->frndoh.addrstr);
	free(c->frndoh.host);
	free(c->frndoh.path);
	free(c->frndoh.net.name);
	free(c->frndoh.net6.name);
	if (c->frndoh.channel == CH_DOH && c->frndoh.http) {
		http_destroy(c->frndoh.http);
		c->frndoh.http = NULL;
	}
	else if (c->frndoh.chctx) {
		c->frndoh.chctx->destroy(c->frndoh.chctx);
		c->frndoh.chctx = NULL;
	}

	free(c);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x58(%rdi), %r15
movq 0x58(%rdi), %r14
pushq $-0x1
popq %rbp
cmpq %r15, %r14
je 0xa228
movq (%r14), %r12
movq 0x8(%r14), %rax
movq %r12, (%rax)
movq (%r14), %rcx
movq %rax, 0x8(%rcx)
movq -0x10(%r14), %rax
testq %rax, %rax
je 0xa217
movq -0x8(%r14), %r9
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *%rax
addq $-0x28, %r14
movq %r14, %rdi
callq 0xab90
movq %r12, %r14
jmp 0xa1e6
movq 0x4d0(%rbx), %rdi
callq 0x3460
movq 0x4d8(%rbx), %rdi
callq 0x3460
movq 0x4e0(%rbx), %rdi
callq 0x3460
movq 0x4e8(%rbx), %rdi
callq 0x3460
movq 0x508(%rbx), %rdi
callq 0x3460
movq 0x5a0(%rbx), %rdi
callq 0x3460
leaq 0x638(%rbx), %r14
cmpl $0x1, 0x630(%rbx)
movq 0x638(%rbx), %rdi
jne 0xa293
testq %rdi, %rdi
je 0xa29f
callq 0x1412a
jmp 0xa29b
testq %rdi, %rdi
je 0xa29f
callq *0x48(%rdi)
andq $0x0, (%r14)
movq 0xaa0(%rbx), %rdi
callq 0x3460
movq 0xaa8(%rbx), %rdi
callq 0x3460
movq 0xab0(%rbx), %rdi
callq 0x3460
movq 0xab8(%rbx), %rdi
callq 0x3460
movq 0xad8(%rbx), %rdi
callq 0x3460
movq 0xb70(%rbx), %rdi
callq 0x3460
cmpl $0x1, 0xc00(%rbx)
movq 0xc08(%rbx), %rdi
jne 0xa303
testq %rdi, %rdi
je 0xa30b
callq 0x1412a
jmp 0xa30b
testq %rdi, %rdi
je 0xa30b
callq *0x48(%rdi)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3460
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: create_upstream_chctx
static int create_upstream_chctx(doh_server_t* doh, channel_chndoh_t* c)
{
	if (doh->channel == CH_UDP) {
		char args[2048];
		int n;
		n = snprintf(args, sizeof(args),
			"upstream=%s&proxy=%d&timeout=%d",
			doh->addrstr,
			doh->use_proxy,
			doh->timeout);
		if (n <= 0 || n >= sizeof(args))
			return -1;
		doh->query = channel_udp_query;
		return channel_udp_create(&doh->chctx,
			"udp", args,
			c->conf,
			c->proxies,
			c->proxy_num,
			c->chnr,
			c->blacklist,
			doh);
	}
	else if (doh->channel == CH_TCP) {
		char args[2048];
		int n;
		n = snprintf(args, sizeof(args),
			"upstream=%s&proxy=%d&timeout=%d",
			doh->addrstr,
			doh->use_proxy,
			doh->timeout);
		if (n <= 0 || n >= sizeof(args))
			return -1;
		doh->query = channel_tcp_query;
		return channel_tcp_create(&doh->chctx,
			"tcp", args,
			c->conf,
			c->proxies,
			c->proxy_num,
			c->chnr,
			c->blacklist,
			doh);
	}
	else if (doh->channel == CH_DOH) {
		doh->http = http_create(
			c->proxies,
			c->proxy_num,
			doh->keep_alive);
		if (!doh->http)
			return -1;
		return 0;
	}
	return -1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x828, %rsp            # imm = 0x828
movq %rsi, %r14
movq %rdi, %rbx
movl 0x5b0(%rdi), %eax
cmpl $0x1, %eax
je 0xa40f
cmpl $0x3, %eax
je 0xa3d1
cmpl $0x2, %eax
jne 0xa40a
movq 0x458(%rbx), %rcx
movl 0x474(%rbx), %r8d
movl 0x47c(%rbx), %r9d
leaq 0x16c81(%rip), %rdx     # 0x20fe9
leaq 0x20(%rsp), %rdi
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0x35a0
addl $0xfffff800, %eax       # imm = 0xFFFFF800
cmpl $0xfffff801, %eax       # imm = 0xFFFFF801
jb 0xa40a
leaq 0x5940(%rip), %rax      # 0xfcd0
movq %rax, 0x5c0(%rbx)
movq 0x8(%r14), %rcx
movq 0x10(%r14), %r8
movl 0x18(%r14), %r9d
movups 0x20(%r14), %xmm0
movq %rbx, 0x10(%rsp)
addq $0x5b8, %rbx            # imm = 0x5B8
movups %xmm0, (%rsp)
leaq 0x16228(%rip), %rsi     # 0x205e7
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x100f1
jmp 0xa479
movq 0x458(%rbx), %rcx
movl 0x474(%rbx), %r8d
movl 0x47c(%rbx), %r9d
leaq 0x16bfc(%rip), %rdx     # 0x20fe9
leaq 0x20(%rsp), %rdi
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0x35a0
addl $0xfffff800, %eax       # imm = 0xFFFFF800
cmpl $0xfffff801, %eax       # imm = 0xFFFFF801
jae 0xa436
pushq $-0x1
popq %rax
jmp 0xa479
movq 0x10(%r14), %rdi
movl 0x18(%r14), %esi
movl 0x470(%rbx), %edx
callq 0x1405f
movq %rax, %rcx
movq %rax, 0x5b8(%rbx)
xorl %eax, %eax
cmpq $0x1, %rcx
sbbl %eax, %eax
jmp 0xa479
leaq 0x3b03(%rip), %rax      # 0xdf40
movq %rax, 0x5c0(%rbx)
movq 0x8(%r14), %rcx
movq 0x10(%r14), %r8
movl 0x18(%r14), %r9d
movups 0x20(%r14), %xmm0
movq %rbx, 0x10(%rsp)
addq $0x5b8, %rbx            # imm = 0x5B8
movups %xmm0, (%rsp)
leaq 0x1617f(%rip), %rsi     # 0x205eb
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0xe5ed
addq $0x828, %rsp            # imm = 0x828
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: parse_subnet
static int parse_subnet(subnet_t* subnet, const char* s)
{
	if (ns_ecs_parse_subnet((struct sockaddr*)(&subnet->addr),
		&subnet->mask, s) != 0) {
		loge("Invalid subnet %s\n", s);
		return -1;
	}
	free(subnet->name);
	subnet->name = strdup(s);
	subnet->is_set = 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x10, %rdi
leaq 0x90(%r14), %rsi
movq %rbx, %rdx
callq 0x19ec9
testl %eax, %eax
je 0xa4dd
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbp
cmpl $0x3, (%rax)
jl 0xa4fb
leaq 0x164f5(%rip), %rsi     # 0x209b0
leaq 0x18814(%rip), %rdx     # 0x22cd6
leaq 0x1674c(%rip), %r8      # 0x20c15
pushq $0x3
popq %rdi
movl $0x41d, %ecx            # imm = 0x41D
movq %rbx, %r9
xorl %eax, %eax
callq 0x1662e
jmp 0xa4fb
movq 0x8(%r14), %rdi
callq 0x3460
movq %rbx, %rdi
callq 0x3620
movq %rax, 0x8(%r14)
movl $0x1, (%r14)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: check_doh_server
static int check_doh_server(doh_server_t *doh)
{
	if (is_empty_sockaddr(doh->addr)) {
		loge("no \"addr\"\n");
		return -1;
	}
	if (doh->channel == CH_DOH) {
		if (!doh->host || !*doh->host) {
			loge("no \"host\"\n");
			return -1;
		}
		if (!doh->path || !*doh->path) {
			loge("no \"path\"\n");
			return -1;
		}
	}
	if (doh->timeout <= 0) {
		loge("invalid \"timeout\"\n");
		return -1;
	}
	if (doh->keep_alive < 0) {
		loge("invalid \"keep-alive\"\n");
		return -1;
	}

	/* Compatible with old configuration */
	if (doh->keep_alive == 1)
		doh->keep_alive = DEFAULT_HTTP_TIMEOUT;

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
addq $0x8, %rdi
leaq 0x180fc(%rip), %rsi     # 0x22610
movl $0x88, %edx
callq 0x33b0
testl %eax, %eax
je 0xa596
cmpl $0x1, 0x5b0(%r14)
jne 0xa55e
movq 0x460(%r14), %rax
testq %rax, %rax
je 0xa5cb
cmpb $0x0, (%rax)
je 0xa5cb
movq 0x468(%r14), %rax
testq %rax, %rax
je 0xa660
cmpb $0x0, (%rax)
je 0xa660
cmpl $0x0, 0x47c(%r14)
jle 0xa600
movl 0x470(%r14), %eax
testl %eax, %eax
js 0xa632
xorl %ebx, %ebx
cmpl $0x1, %eax
jne 0xa693
movl $0x4b0, 0x470(%r14) # imm = 0x4B0
jmp 0xa693
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xa693
leaq 0x16400(%rip), %rsi     # 0x209b0
leaq 0x16671(%rip), %rdx     # 0x20c28
leaq 0x1667b(%rip), %r8      # 0x20c39
pushq $0x3
popq %rdi
movl $0x4d1, %ecx            # imm = 0x4D1
jmp 0xa68c
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xa693
leaq 0x163cb(%rip), %rsi     # 0x209b0
leaq 0x1663c(%rip), %rdx     # 0x20c28
leaq 0x16651(%rip), %r8      # 0x20c44
pushq $0x3
popq %rdi
movl $0x4d6, %ecx            # imm = 0x4D6
jmp 0xa68c
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xa693
leaq 0x16396(%rip), %rsi     # 0x209b0
leaq 0x16607(%rip), %rdx     # 0x20c28
leaq 0x16632(%rip), %r8      # 0x20c5a
pushq $0x3
popq %rdi
movl $0x4df, %ecx            # imm = 0x4DF
jmp 0xa68c
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xa693
leaq 0x16368(%rip), %rsi     # 0x209b0
leaq 0x165d9(%rip), %rdx     # 0x20c28
leaq 0x16617(%rip), %r8      # 0x20c6d
pushq $0x3
popq %rdi
movl $0x4e3, %ecx            # imm = 0x4E3
jmp 0xa68c
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xa693
leaq 0x1633a(%rip), %rsi     # 0x209b0
leaq 0x165ab(%rip), %rdx     # 0x20c28
leaq 0x165cb(%rip), %r8      # 0x20c4f
pushq $0x3
popq %rdi
movl $0x4da, %ecx            # imm = 0x4DA
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/channel_chndoh.c
// Function: query_doh_addr
static void query_doh_addr(channel_chndoh_t* c, doh_server_t* doh)
{
	channel_req_t* req;
	ns_msg_t msg;
	ns_flags_t flags;

	doh->addr_expire = time(NULL) + 60;

	init_ns_msg(&msg);

	msg.id = 0;

	flags = ns_get_flags(&msg);
	flags.aa = 1;
	flags.ra = 1;
	ns_set_flags(&msg, &flags);

	msg.qdcount = 1;
	msg.qrs = (ns_qr_t*)malloc(sizeof(ns_qr_t));
	if (!msg.qrs) {
		return;
	}

	msg.qrs->qclass = NS_QCLASS_IN;
	msg.qrs->qtype = NS_QTYPE_A;
	msg.qrs->qname = (char*)malloc(strlen(doh->host) + 2);
	strcpy(msg.qrs->qname, doh->host);
	strcat(msg.qrs->qname, ".");

	req = myreq_new(c, &msg, query_doh_addr_cb, doh);

	ns_msg_free(&msg);

	if (!req) {
		return;
	}

	dllist_add(&c->reqs, &req->entry);
	rbtree_insert(&c->reqdic, &req->rbn);
	c->req_count++;

	if (doh_query(req)) {
		loge("doh_query() error\n");
		dllist_remove(&req->entry);
		rbtree_remove(&c->reqdic, &req->rbn);
		c->req_count--;
		myreq_destroy(req);
		return;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %edi, %edi
callq 0x3320
addq $0x3c, %rax
movq %rax, (%r14)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x18296
andw $0x0, (%r12)
movq %r12, %rdi
callq 0x181ec
orl $0x120, %eax            # imm = 0x120
leaq 0xe(%rsp), %rsi
movw %ax, (%rsi)
movq %r12, %rdi
callq 0x18245
movw $0x1, 0x4(%r12)
pushq $0x10
popq %rdi
callq 0x34c0
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0xa812
movq %rax, %r15
movl $0x10001, 0x8(%rax)     # imm = 0x10001
movq 0x460(%r14), %r12
movq %r12, %rdi
callq 0x3170
leaq 0x2(%rax), %rdi
callq 0x34c0
movq %rax, %r13
movq %rax, (%r15)
movq %rax, %rdi
movq %r12, %rsi
callq 0x3340
movq %r13, %rdi
callq 0x3170
movw $0x2e, (%r13,%rax)
leaq 0x1c9(%rip), %rdx       # 0xa91f
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0xa820
movq %rax, %r14
movq %r15, %rdi
callq 0x188ce
testq %r14, %r14
je 0xa812
leaq 0x58(%rbx), %rax
leaq 0x28(%r14), %rcx
movq %rax, 0x28(%r14)
movq 0x60(%rbx), %rax
movq %rax, 0x30(%r14)
movq %rcx, (%rax)
movq %rcx, 0x60(%rbx)
leaq 0x68(%rbx), %r15
movq %r14, %r12
addq $0x38, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x378c
incl 0x78(%rbx)
movq %r14, %rdi
callq 0xaa95
testl %eax, %eax
je 0xa812
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0xa7ed
leaq 0x161e0(%rip), %rsi     # 0x209b0
leaq 0x164ac(%rip), %rdx     # 0x20c83
leaq 0x164b4(%rip), %r8      # 0x20c92
pushq $0x3
popq %rdi
movl $0x139, %ecx            # imm = 0x139
xorl %eax, %eax
callq 0x1662e
movq 0x28(%r14), %rax
movq 0x30(%r14), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x392c
decl 0x78(%rbx)
movq %r14, %rdi
callq 0xab90
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: myreq_new
static channel_req_t* myreq_new(
	channel_chndoh_t *ctx,
	const ns_msg_t* msg,
	channel_query_cb callback, void* cb_state)
{
	channel_req_t* req;

	req = (channel_req_t*)malloc(sizeof(channel_req_t));
	if (!req) {
		loge("alloc\n");
		return NULL;
	}

	memset(req, 0, sizeof(channel_req_t));

	req->req_id = new_req_id(ctx);
	req->id = msg->id;
	req->flags = msg->flags;
	req->qr = msg->qrs[0];
	req->qr.qname = strdup(msg->qrs[0].qname);
	req->callback = callback;
	req->cb_state = cb_state;
	req->rbn.key = &req->req_id;
	req->ctx = ctx;
	req->start_time = OS_GetTickCount();

	return req;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
pushq $0x1
popq %rdi
movl $0x88, %esi
callq 0x3250
movq %rax, %rbx
testq %rax, %rax
je 0xa8df
movq %r12, 0x8(%rsp)
movq %r14, 0x10(%rsp)
leaq 0x68(%r15), %rbp
movl $0x7fff, %r12d          # imm = 0x7FFF
leaq 0x6(%rsp), %r14
callq 0x30f0
cltd
idivl %r12d
movw %dx, 0x6(%rsp)
testw %dx, %dx
je 0xa86c
movq %rbp, %rdi
movq %r14, %rsi
callq 0x38ef
testq %rax, %rax
jne 0xa86c
movzwl 0x6(%rsp), %eax
movw %ax, (%rbx)
movl (%r13), %eax
movl %eax, 0x2(%rbx)
movq 0x10(%r13), %rax
movups (%rax), %xmm0
movups %xmm0, 0x8(%rbx)
movq (%rax), %rdi
callq 0x3620
movq %rax, 0x8(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rbx)
movq %rbx, 0x38(%rbx)
movq %r15, 0x60(%rbx)
xorl %eax, %eax
callq 0x181bb
movq %rax, 0x80(%rbx)
jmp 0xa90d
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0xa90d
leaq 0x160be(%rip), %rsi     # 0x209b0
leaq 0x163ac(%rip), %rdx     # 0x20ca5
leaq 0x16fb3(%rip), %r8      # 0x218b3
pushq $0x3
popq %rdi
pushq $0x78
popq %rcx
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rax
addq $0x18, %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/channel_chndoh.c
// Function: doh_query
static int doh_query(channel_req_t* rq)
{
	channel_chndoh_t* c = rq->ctx;
	int r = 0;

	if (c->frndoh.channel != CH_NONE) {
		r = doh_emit_query(rq, &c->frndoh);
		if (r) {
			loge("doh_emit_query() error\n");
			return -1;
		}
		rq->wait_num++;
	}

	if (c->chndoh.channel != CH_NONE) {
		r = doh_emit_query(rq, &c->chndoh);
		if (r) {
			loge("doh_emit_query() error\n");
			return -1;
		}
		rq->wait_num++;
	}

	if (rq->wait_num == 0) {
		loge("no DoH server\n");
		return -1;
	}

	return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60(%rdi), %r14
cmpl $0x0, 0xc00(%r14)
je 0xaaf5
leaq 0x650(%r14), %rsi
movq %rbx, %rdi
callq 0xabe1
testl %eax, %eax
je 0xaaf2
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xab86
leaq 0x15ed9(%rip), %rsi     # 0x209b0
leaq 0x16201(%rip), %rdx     # 0x20cdf
leaq 0x16204(%rip), %r8      # 0x20ce9
pushq $0x3
popq %rdi
movl $0x3db, %ecx            # imm = 0x3DB
jmp 0xab7f
incl 0x74(%rbx)
cmpl $0x0, 0x630(%r14)
je 0xab40
subq $-0x80, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xabe1
testl %eax, %eax
je 0xab45
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xab86
leaq 0x15e88(%rip), %rsi     # 0x209b0
leaq 0x161b0(%rip), %rdx     # 0x20cdf
leaq 0x161b3(%rip), %r8      # 0x20ce9
pushq $0x3
popq %rdi
movl $0x3e4, %ecx            # imm = 0x3E4
jmp 0xab7f
movl 0x74(%rbx), %eax
jmp 0xab4d
movl 0x74(%rbx), %eax
incl %eax
movl %eax, 0x74(%rbx)
xorl %ebx, %ebx
testl %eax, %eax
jne 0xab86
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xab86
leaq 0x15e47(%rip), %rsi     # 0x209b0
leaq 0x1616f(%rip), %rdx     # 0x20cdf
leaq 0x1618a(%rip), %r8      # 0x20d01
pushq $0x3
popq %rdi
movl $0x3eb, %ecx            # imm = 0x3EB
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/channel_chndoh.c
// Function: myreq_destroy
static void myreq_destroy(channel_req_t* req)
{
	int i;
	ns_msg_t* msg;
	for (i = 0; i < req->result_num; i++) {
		msg = req->results[i];
		if (msg) {
			ns_msg_free(msg);
			free(msg);
		}
	}
	free(req->results);
	free(req->qr.qname);
	free(req);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x70(%rbx), %rax
movq 0x68(%rbx), %rdi
cmpq %rax, %r15
jge 0xabc6
movq (%rdi,%r15,8), %r14
testq %r14, %r14
je 0xabc1
movq %r14, %rdi
callq 0x188ce
movq %r14, %rdi
callq 0x3460
incq %r15
jmp 0xab9b
callq 0x3460
movq 0x8(%rbx), %rdi
callq 0x3460
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3460
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: get_nsmsg_flags
static int get_nsmsg_flags(channel_chndoh_t* ctx, ns_msg_t* msg)
{
	int i, rrcount, flags = 0, x = 0;
	ns_rr_t* rr;

	rrcount = msg->ancount + msg->nscount;
	for (i = 0; i < rrcount; i++) {
		rr = msg->rrs + i;
		flags |= get_rr_flags(ctx, rr, &x);
	}

	rrcount = ns_rrcount(msg);
	for (; i < rrcount; i++) {
		rr = msg->rrs + i;
		flags |= get_rr_flags(ctx, rr, &x);
	}

	return flags;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x4(%rsp), %rax
andl $0x0, (%rax)
movq %rdi, %r14
movzwl 0x6(%rsi), %eax
movzwl 0x8(%rsi), %r15d
addq %rax, %r15
movl %r15d, %r13d
shll $0x5, %r13d
xorl %r12d, %r12d
xorl %ebp, %ebp
cmpq %r12, %r13
je 0xb837
movq 0x18(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdi
leaq 0x4(%rsp), %rdx
callq 0xb886
orl %eax, %ebp
addq $0x20, %r12
jmp 0xb816
movzwl 0x6(%rbx), %eax
movzwl 0x8(%rbx), %ecx
addq %rax, %rcx
movzwl 0xa(%rbx), %r13d
addq %rcx, %r13
movl %r15d, %r12d
shll $0x5, %r12d
cmpq %r13, %r15
jae 0xb875
movq 0x18(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdi
leaq 0x4(%rsp), %rdx
callq 0xb886
orl %eax, %ebp
incq %r15
addq $0x20, %r12
jmp 0xb851
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_O2/GangZhuo[P]dohclient/src/channel_doh.c
// Function: step
static int step(channel_t* ctx,
	fd_set* readset, fd_set* writeset, fd_set* errorset)
{
	channel_doh_t* c = (channel_doh_t*)ctx;
	if (c->http_addr_expire < time(NULL)) {
		query_http_addr(c);
	}
	http_step(c->http, readset, writeset, errorset);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x118(%rdi), %rbx
xorl %edi, %edi
callq 0x3320
cmpq %rax, %rbx
jge 0xc5ae
movq %r13, 0x10(%rsp)
xorl %edi, %edi
callq 0x3320
addq $0x3c, %rax
movq %rax, 0x118(%r12)
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x18296
andw $0x0, (%rbp)
movq %rbp, %rdi
callq 0x181ec
orl $0x120, %eax            # imm = 0x120
leaq 0xe(%rsp), %rsi
movw %ax, (%rsi)
movq %rbp, %rdi
callq 0x18245
movw $0x1, 0x4(%rbp)
pushq $0x10
popq %rdi
callq 0x34c0
movq %rax, 0x10(%rbp)
testq %rax, %rax
je 0xc5a9
movq %rax, %r13
movl $0x10001, 0x8(%rax)     # imm = 0x10001
movq 0x120(%r12), %rbp
movq %rbp, %rdi
callq 0x3170
leaq 0x2(%rax), %rdi
callq 0x34c0
movq %rax, %rbx
movq %rax, (%r13)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3340
movq %rbx, %rdi
callq 0x3170
movw $0x2e, (%rbx,%rax)
leaq 0x423(%rip), %rdx       # 0xc908
leaq 0x18(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0xc81b
movq %rax, %r13
movq %rbx, %rdi
callq 0x188ce
testq %r13, %r13
je 0xc5a9
leaq 0x58(%r12), %rax
leaq 0x28(%r13), %rcx
movq %rax, 0x28(%r13)
movq 0x60(%r12), %rax
movq %rax, 0x30(%r13)
movq %rcx, (%rax)
movq %rcx, 0x60(%r12)
leaq 0x68(%r12), %rbx
movq %r13, %rbp
addq $0x38, %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x378c
incl 0x78(%r12)
movq %r13, %rdi
callq 0xcaa6
testl %eax, %eax
je 0xc5a9
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0xc582
leaq 0x14aa4(%rip), %rsi     # 0x21009
leaq 0x14b6a(%rip), %rdx     # 0x210d6
leaq 0x1471f(%rip), %r8      # 0x20c92
pushq $0x3
popq %rdi
movl $0xfe, %ecx
xorl %eax, %eax
callq 0x1662e
movq 0x28(%r13), %rax
movq 0x30(%r13), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x392c
decl 0x78(%r12)
movq %r13, %rdi
callq 0xccb6
movq 0x10(%rsp), %r13
movq 0x80(%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x1422e
xorl %eax, %eax
addq $0x38, %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/channel_doh.c
// Function: query
static int query(channel_t* ctx,
	const ns_msg_t* msg,
	channel_query_cb callback, void* state)
{
	channel_doh_t* c = (channel_doh_t*)ctx;
	channel_req_t* req;

	if (c->req_count > MAX_QUEUE_SIZE) {
		loge("request queue is full\n");
		return -1;
	}

	req = myreq_new(c, msg, callback, state);
	if (!req)
		return -1;

	dllist_add(&c->reqs, &req->entry);
	rbtree_insert(&c->reqdic, &req->rbn);
	c->req_count++;

	if (doh_query(req)) {
		loge("doh_query() error\n");
		dllist_remove(&req->entry);
		rbtree_remove(&c->reqdic, &req->rbn);
		c->req_count--;
		myreq_destroy(req);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x7531, 0x78(%rdi)     # imm = 0x7531
jl 0xc623
xorl %eax, %eax
callq 0x165f5
pushq $-0x1
popq %rbx
cmpl $0x3, (%rax)
jl 0xc6d5
leaq 0x14a08(%rip), %rsi     # 0x21009
leaq 0x146db(%rip), %rdx     # 0x20ce3
leaq 0x149c3(%rip), %r8      # 0x20fd2
pushq $0x3
popq %rdi
movl $0x34e, %ecx            # imm = 0x34E
xorl %eax, %eax
callq 0x1662e
jmp 0xc6d5
movq %rdi, %r14
callq 0xc81b
pushq $-0x1
popq %rbx
testq %rax, %rax
je 0xc6d5
movq %rax, %r15
leaq 0x58(%r14), %rax
leaq 0x28(%r15), %rcx
movq %rax, 0x28(%r15)
movq 0x60(%r14), %rax
movq %rax, 0x30(%r15)
movq %rcx, (%rax)
movq %rcx, 0x60(%r14)
leaq 0x68(%r14), %r12
movq %r15, %r13
addq $0x38, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x378c
incl 0x78(%r14)
movq %r15, %rdi
callq 0xcaa6
testl %eax, %eax
je 0xc6d3
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0xc6ab
leaq 0x1497b(%rip), %rsi     # 0x21009
leaq 0x1464e(%rip), %rdx     # 0x20ce3
leaq 0x145f6(%rip), %r8      # 0x20c92
pushq $0x3
popq %rdi
movl $0x35b, %ecx            # imm = 0x35B
xorl %eax, %eax
callq 0x1662e
movq 0x28(%r15), %rax
movq 0x30(%r15), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %r12, %rdi
movq %r13, %rsi
callq 0x392c
decl 0x78(%r14)
movq %r15, %rdi
callq 0xccb6
jmp 0xc6d5
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq