LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/app/qq_ios_app.c
// Function: qq_ios_app_init_connection_handler
static void
qq_ios_app_init_connection_handler(qq_connection_t *c)
{
    qq_event_t   *rev, *wev;

    qq_log_debug("qq_ios_app_init_connection_handler()");

    rev = c->read;
    rev->handler = qq_ios_app_wait_request_handler;

    wev = c->write;
    wev->handler = qq_ios_app_write_event_handler;

    qq_event_add_timer(rev, QQ_IOS_APP_ACCEPT_TIMEOUT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x6ba2(%rip), %rdi      # 0xa7e1
xorl %eax, %eax
callq 0x6c74
movq 0x8(%rbx), %r14
leaq 0x97(%rip), %rax        # 0x3ce8
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rax
leaq 0x1cd(%rip), %rcx       # 0x3e2d
movq %rcx, 0x10(%rax)
leaq 0xba55(%rip), %rax      # 0xf6c0
movl $0xbb8, %ebx            # imm = 0xBB8
addq (%rax), %rbx
testb $0x8, 0x9(%r14)
je 0x3ca9
movq %rbx, %rax
subq 0x20(%r14), %rax
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
cmpq $0x12c, %rcx            # imm = 0x12C
jb 0x3cc2
leaq 0x20(%r14), %rsi
leaq 0xb671(%rip), %rdi      # 0xf310
callq 0x81c4
andb $-0x9, 0x9(%r14)
leaq 0x20(%r14), %rsi
movq %rbx, 0x20(%r14)
leaq 0xb658(%rip), %rdi      # 0xf310
callq 0x7f4c
orb $0x8, 0x9(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/app/qq_ios_app.c
// Function: qq_ios_app_process_request_handler
static void
qq_ios_app_process_request_handler(qq_event_t *rev)
{
    qq_connection_t   *c;
    ssize_t            n;
    size_t             size;

    c = rev->data;

    if (c->buffer->last - c->buffer->pos > 0) {
        qq_ios_app_process_package(c);
        c->buffer->last = c->buffer->pos;
        return;
    }

    n = c->recv(c, (u_char *)c->buffer->pos,
        (size_t)((uintptr_t)c->buffer->end - (uintptr_t)c->buffer->start));
    if (n == QQ_AGAIN) {
        if (qq_handle_read_event(rev) != QQ_OK) {
            qq_app_close_connection(c);
        }
        return;
    }

    if (n == QQ_ERROR) {
        qq_app_close_connection(c);
        return;
    }

    if (n == 0) {
        qq_log_error(0, "client closed connection");
        qq_app_close_connection(c);
        return;
    }

    c->buffer->last += n;
    qq_ios_app_process_package(c);
    c->buffer->last = c->buffer->pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
movq 0x20(%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
subq %rsi, %rcx
testq %rcx, %rcx
jle 0x3e66
movq %rsi, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %r14
movq 0x28(%rax), %rdx
subq 0x20(%rax), %rdx
movq %rbx, %rdi
callq *0x28(%rbx)
testq %rax, %rax
je 0x3e97
cmpq $-0x1, %rax
je 0x3ea7
cmpq $-0x2, %rax
jne 0x3eb3
movq %r14, %rdi
callq 0x33d3
testq %rax, %rax
jne 0x3ea7
jmp 0x3e61
leaq 0x698a(%rip), %rsi      # 0xa828
xorl %edi, %edi
xorl %eax, %eax
callq 0x6b27
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x26a2
movq 0x20(%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x8(%rax)
jmp 0x3e61
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: qq_cjson_init
int qq_cjson_init(size_t size)
{
    void *p;

    p = memalign(16, size);
    if (p == NULL) {
        return -1;
    }

    qq_cjson_buf = (qq_cjson_buf_t *) p;
    qq_cjson_buf->start = (u_char *) p + sizeof(qq_cjson_buf_t);
    qq_cjson_buf->pos = qq_cjson_buf->start;
    qq_cjson_buf->end = (u_char *) p + size;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %edi
movq %rbx, %rsi
callq 0x22b0
testq %rax, %rax
je 0x3ef8
movq %rax, 0xb446(%rip)      # 0xf328
leaq 0x18(%rax), %rcx
movq %rcx, (%rax)
movq %rcx, 0x8(%rax)
addq %rax, %rbx
movq %rbx, 0x10(%rax)
xorl %eax, %eax
jmp 0x3efd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_InitHooks
void cJSON_InitHooks(cJSON_Hooks* hooks)
{
    if (!hooks) { /* Reset hooks */
        cJSON_malloc = malloc;
        cJSON_free = free;
        return;
    }

	cJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc;
	cJSON_free	 = (hooks->free_fn)?hooks->free_fn:free;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x3f4c
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
testq %rcx, %rcx
jne 0x3f3e
movq 0xb0a2(%rip), %rcx      # 0xefe0
testq %rax, %rax
jne 0x3f5a
movq 0xb08e(%rip), %rax      # 0xefd8
jmp 0x3f5a
movq 0xb085(%rip), %rax      # 0xefd8
movq 0xb086(%rip), %rcx      # 0xefe0
movq %rcx, 0xb257(%rip)      # 0xf1b8
movq %rax, 0xb258(%rip)      # 0xf1c0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_Delete
void cJSON_Delete(cJSON *c)
{
	cJSON *next;
	while (c)
	{
		next=c->next;
		if (!(c->type&cJSON_IsReference) && c->child) cJSON_Delete(c->child);
		if (!(c->type&cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring);
		if (!(c->type&cJSON_StringIsConst) && c->string) cJSON_free(c->string);
		cJSON_free(c);
		c=next;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x3fdb
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rbx, %r14
movq (%rbx), %rbx
movl 0x18(%r14), %eax
btl $0x8, %eax
jb 0x3f9b
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x3f9b
callq 0x3f6a
movl 0x18(%r14), %eax
btl $0x8, %eax
jb 0x3fb4
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x3fb4
callq *0xb210(%rip)           # 0xf1c0
movl 0x18(%r14), %eax
btl $0x9, %eax
jb 0x3fc9
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x3fc9
callq *0xb1f7(%rip)           # 0xf1c0
movq %r14, %rdi
callq *0xb1ee(%rip)           # 0xf1c0
testq %rbx, %rbx
jne 0x3f79
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_ParseWithOpts
cJSON *cJSON_ParseWithOpts(const char *value,const char **return_parse_end,int require_null_terminated)
{
	const char *end=0;
	cJSON *c=cJSON_New_Item();
	ep=0;
	if (!c) return 0;       /* memory fail */

	end=parse_value(c,skip(value));
	if (!end)	{cJSON_Delete(c);return 0;}	/* parse failure. ep is set. */

	/* if we require null-terminated JSON without appended garbage, skip and then check for a null terminator */
	if (require_null_terminated) {end=skip(end);if (*end) {cJSON_Delete(c);ep=end;return 0;}}
	if (return_parse_end) *return_parse_end=end;
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
movl $0x40, %edi
callq *0xb1bd(%rip)           # 0xf1b8
testq %rax, %rax
je 0x4038
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0xb310(%rip) # 0xf330
testq %r12, %r12
je 0x4045
decq %r12
movb 0x1(%r12), %al
incq %r12
decb %al
cmpb $0x20, %al
jb 0x4028
jmp 0x4048
movq $0x0, 0xb2ed(%rip) # 0xf330
jmp 0x409a
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x40a8
testq %rax, %rax
je 0x4092
movq %rax, %r12
testl %r15d, %r15d
je 0x4088
decq %r12
movb 0x1(%r12), %al
incq %r12
leal -0x1(%rax), %ecx
cmpb $0x20, %cl
jb 0x4063
testb %al, %al
je 0x4088
movq %rbx, %rdi
callq 0x3f6a
movq %r12, 0xb2aa(%rip)      # 0xf330
jmp 0x409a
testq %r14, %r14
je 0x409c
movq %r12, (%r14)
jmp 0x409c
movq %rbx, %rdi
callq 0x3f6a
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: print_value
static char *print_value(cJSON *item,int depth,int fmt,printbuffer *p)
{
	char *out=0;
	if (!item) return 0;
	if (p)
	{
		switch ((item->type)&255)
		{
			case cJSON_NULL:	{out=ensure(p,5);	if (out) strcpy(out,"null");	break;}
			case cJSON_False:	{out=ensure(p,6);	if (out) strcpy(out,"false");	break;}
			case cJSON_True:	{out=ensure(p,5);	if (out) strcpy(out,"true");	break;}
			case cJSON_Number:	out=print_number(item,p);break;
			case cJSON_String:	out=print_string(item,p);break;
			case cJSON_Array:	out=print_array(item,depth,fmt,p);break;
			case cJSON_Object:	out=print_object(item,depth,fmt,p);break;
		}
	}
	else
	{
		switch ((item->type)&255)
		{
			case cJSON_NULL:	out=cJSON_strdup("null");	break;
			case cJSON_False:	out=cJSON_strdup("false");break;
			case cJSON_True:	out=cJSON_strdup("true"); break;
			case cJSON_Number:	out=print_number(item,0);break;
			case cJSON_String:	out=print_string(item,0);break;
			case cJSON_Array:	out=print_array(item,depth,fmt,0);break;
			case cJSON_Object:	out=print_object(item,depth,fmt,0);break;
		}
	}
	return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x442e
movb 0x18(%rdi), %al
testq %rcx, %rcx
je 0x4379
cmpb $0x6, %al
ja 0x442e
movzbl %al, %eax
leaq 0x656f(%rip), %r8       # 0xa8d0
movslq (%r8,%rax,4), %rax
addq %r8, %rax
jmpq *%rax
movq %rcx, %rdi
movl $0x6, %esi
callq 0x5741
jmp 0x439f
cmpb $0x6, %al
ja 0x442e
movzbl %al, %eax
leaq 0x6561(%rip), %rcx      # 0xa8ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x6, %edi
callq *0xae19(%rip)           # 0xf1b8
testq %rax, %rax
je 0x442e
movw $0x65, 0x4(%rax)
movl $0x736c6166, (%rax)     # imm = 0x736C6166
jmp 0x4430
movq %rcx, %rdi
movl $0x5, %esi
callq 0x5741
jmp 0x43f9
movq %rcx, %rdi
movl $0x5, %esi
callq 0x5741
jmp 0x441d
movq %rcx, %rsi
jmp 0x440c
movq 0x20(%rdi), %rdi
movq %rcx, %rsi
jmp 0x43e8
movq 0x20(%rdi), %rdi
xorl %esi, %esi
popq %rbp
jmp 0x6239
movl $0x5, %edi
callq *0xadbf(%rip)           # 0xf1b8
testq %rax, %rax
je 0x442e
movb $0x0, 0x4(%rax)
movl $0x6c6c756e, (%rax)     # imm = 0x6C6C756E
jmp 0x4430
xorl %esi, %esi
popq %rbp
jmp 0x57f0
movl $0x5, %edi
callq *0xad9b(%rip)           # 0xf1b8
testq %rax, %rax
je 0x442e
movb $0x0, 0x4(%rax)
movl $0x65757274, (%rax)     # imm = 0x65757274
jmp 0x4430
xorl %eax, %eax
popq %rbp
retq
xorl %ecx, %ecx
popq %rbp
jmp 0x597d
xorl %ecx, %ecx
popq %rbp
jmp 0x5c69
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_PrintBuffered
char *cJSON_PrintBuffered(cJSON *item,int prebuffer,int fmt)
{
	printbuffer p;
	p.buffer=(char*)cJSON_malloc(prebuffer);
	p.length=prebuffer;
	p.offset=0;
	return print_value(item,0,fmt,&p);
	return p.buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rdi, %r14
movslq %esi, %r15
movq %r15, %rdi
callq *0xad48(%rip)           # 0xf1b8
leaq -0x28(%rbp), %rcx
movq %rax, (%rcx)
movl %r15d, 0x8(%rcx)
movl $0x0, 0xc(%rcx)
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x433a
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_Duplicate
cJSON *cJSON_Duplicate(cJSON *item,int recurse)
{
	cJSON *newitem,*cptr,*nptr=0,*newchild;
	/* Bail on bad ptr */
	if (!item) return 0;
	/* Create new item */
	newitem=cJSON_New_Item();
	if (!newitem) return 0;
	/* Copy over all vars */
	newitem->type=item->type&(~cJSON_IsReference),newitem->valueint=item->valueint,newitem->valuedouble=item->valuedouble;
	if (item->valuestring)	{newitem->valuestring=cJSON_strdup(item->valuestring);	if (!newitem->valuestring)	{cJSON_Delete(newitem);return 0;}}
	if (item->string)		{newitem->string=cJSON_strdup(item->string);			if (!newitem->string)		{cJSON_Delete(newitem);return 0;}}
	/* If non-recursive, then we're done! */
	if (!recurse) return newitem;
	/* Walk the ->next chain for the child. */
	cptr=item->child;
	while (cptr)
	{
		newchild=cJSON_Duplicate(cptr,1);		/* Duplicate (with recurse) each item in the ->next chain */
		if (!newchild) {cJSON_Delete(newitem);return 0;}
		if (nptr)	{nptr->next=newchild,newchild->prev=nptr;nptr=newchild;}	/* If newitem->child already set, then crosswire ->prev and ->next and move on */
		else		{newitem->child=newchild;nptr=newchild;}					/* Set newitem->child and move to it */
		cptr=cptr->next;
	}
	return newitem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4fd4
movl %esi, %r15d
movq %rdi, %r14
movl $0x40, %edi
callq *0xa2fb(%rip)           # 0xf1b8
testq %rax, %rax
je 0x4fd4
movq %rax, %rbx
movl %r15d, -0x2c(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
andl 0x18(%r14), %eax
movl %eax, 0x18(%rbx)
movl 0x28(%r14), %eax
movl %eax, 0x28(%rbx)
movsd 0x30(%r14), %xmm0
movsd %xmm0, 0x30(%rbx)
movq 0x20(%r14), %r12
testq %r12, %r12
je 0x4f3b
movq %r12, %rdi
callq 0x20d0
movq %rax, %r13
incq %r13
movq %r13, %rdi
callq *0xa29b(%rip)           # 0xf1b8
testq %rax, %rax
je 0x4fb8
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x21c0
movq %r15, 0x20(%rbx)
movq 0x38(%r14), %r12
testq %r12, %r12
je 0x4f75
movq %r12, %rdi
callq 0x20d0
movq %rax, %r13
incq %r13
movq %r13, %rdi
callq *0xa25d(%rip)           # 0xf1b8
testq %rax, %rax
je 0x4fbf
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x21c0
movq %r15, 0x38(%rbx)
cmpl $0x0, -0x2c(%rbp)
je 0x4fd6
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x4fd6
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x1, %esi
callq 0x4e95
testq %rax, %rax
je 0x4fcc
testq %r15, %r15
je 0x4fa7
movq %rax, (%r15)
movq %r15, 0x8(%rax)
jmp 0x4fab
movq %rax, 0x10(%rbx)
movq (%r14), %r14
movq %rax, %r15
testq %r14, %r14
jne 0x4f87
jmp 0x4fd6
movl $0x20, %eax
jmp 0x4fc4
movl $0x38, %eax
movq $0x0, (%rbx,%rax)
movq %rbx, %rdi
callq 0x3f6a
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: cJSON_Minify
void cJSON_Minify(char *json)
{
	char *into=json;
	while (*json)
	{
		if (*json==' ') json++;
		else if (*json=='\t') json++;	/* Whitespace characters. */
		else if (*json=='\r') json++;
		else if (*json=='\n') json++;
		else if (*json=='/' && json[1]=='/')  while (*json && *json!='\n') json++;	/* double-slash comments, to end of line. */
		else if (*json=='/' && json[1]=='*') {while (*json && !(*json=='*' && json[1]=='/')) json++;json+=2;}	/* multiline comments. */
		else if (*json=='\"'){*into++=*json++;while (*json && *json!='\"'){if (*json=='\\') *into++=*json++;*into++=*json++;}*into++=*json++;} /* string literals, which are \" sensitive. */
		else *into++=*json++;			/* All other characters. */
	}
	*into=0;	/* and null-terminate. */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movb (%rdi), %cl
movzbl %cl, %edx
cmpl $0x1f, %edx
jg 0x500d
cmpl $0x9, %edx
jle 0x5021
cmpl $0xa, %edx
je 0x5027
cmpl $0xd, %edx
je 0x5027
jmp 0x50b9
cmpl $0x2f, %edx
je 0x502c
cmpl $0x22, %edx
je 0x5075
cmpl $0x20, %edx
je 0x5027
jmp 0x50b9
jne 0x50b5
incq %rdi
jmp 0x4fef
movzbl 0x1(%rdi), %edx
cmpl $0x2f, %edx
je 0x5064
cmpl $0x2a, %edx
jne 0x50b9
addq $0x2, %rdi
movb $0x2f, %cl
cmpb $0x2a, %cl
je 0x5051
movzbl %cl, %ecx
testl %ecx, %ecx
je 0x4fef
movb -0x1(%rdi), %cl
jmp 0x5059
movb -0x1(%rdi), %cl
cmpb $0x2f, %cl
je 0x4fef
incq %rdi
jmp 0x5040
movb 0x1(%rdi), %dl
incq %rdi
testb %dl, %dl
je 0x4fef
movzbl %dl, %ecx
cmpl $0xa, %ecx
jne 0x505e
jmp 0x4fef
movb $0x22, (%rax)
movzbl 0x1(%rdi), %ecx
cmpl $0x5c, %ecx
je 0x5092
testl %ecx, %ecx
je 0x50a5
cmpl $0x22, %ecx
je 0x50a5
incq %rax
incq %rdi
jmp 0x50a1
movb $0x5c, 0x1(%rax)
addq $0x2, %rax
movb 0x2(%rdi), %cl
addq $0x2, %rdi
movb %cl, (%rax)
jmp 0x5078
addq $0x2, %rdi
movb %cl, 0x1(%rax)
addq $0x2, %rax
jmp 0x4fef
testl %edx, %edx
je 0x50c6
incq %rdi
movb %cl, (%rax)
incq %rax
jmp 0x4fef
movb $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: qq_cjson_malloc
static void *qq_cjson_malloc(size_t size)
{
    u_char  *m;

    qq_log_debug("qq_cjson_malloc(size: %d)", size);

    m = qq_cjson_buf->pos;
    m = qq_cjson_align_ptr(m, QQ_CJSON_ALIGNMENT);

    if ((size_t)(qq_cjson_buf->end - m) >= size) {
        qq_cjson_buf->pos = m + size;
        return m;
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x586b(%rip), %rdi      # 0xa947
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x6c74
movq 0xa238(%rip), %rax      # 0xf328
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
addq $0x7, %rcx
andq $-0x8, %rcx
subq %rcx, %rdx
cmpq %rbx, %rdx
jb 0x5112
addq %rcx, %rbx
movq %rbx, 0x8(%rax)
movq %rcx, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: parse_array
static const char *parse_array(cJSON *item,const char *value)
{
	cJSON *child;
	if (*value!='[')	{ep=value;return 0;}	/* not an array! */

	item->type=cJSON_Array;
	value=skip(value+1);
	if (*value==']') return value+1;	/* empty array. */

	item->child=child=cJSON_New_Item();
	if (!item->child) return 0;		 /* memory fail */
	value=skip(parse_value(child,skip(value)));	/* skip any spacing, get the value. */
	if (!value) return 0;

	while (*value==',')
	{
		cJSON *new_item;
		if (!(new_item=cJSON_New_Item())) return 0; 	/* memory fail */
		child->next=new_item;new_item->prev=child;child=new_item;
		value=skip(parse_value(child,skip(value+1)));
		if (!value) return 0;	/* memory fail */
	}

	if (*value==']') return value+1;	/* end of array */
	ep=value;return 0;	/* malformed. */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x5b, (%rsi)
jne 0x5463
movq %rdi, %r14
movl $0x5, 0x18(%rdi)
incq %rbx
movb (%rbx), %al
leal -0x1(%rax), %ecx
incq %rbx
cmpb $0x20, %cl
jb 0x537b
cmpb $0x5d, %al
je 0x546c
movl $0x40, %edi
callq *0x9e1d(%rip)           # 0xf1b8
testq %rax, %rax
je 0x5478
movq %rax, %r15
addq $-0x2, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rax, 0x10(%r14)
movb 0x1(%rbx), %al
incq %rbx
decb %al
cmpb $0x20, %al
jb 0x53c1
movq %r15, %rdi
movq %rbx, %rsi
callq 0x40a8
testq %rax, %rax
je 0x546a
movq %rax, %r14
decq %r14
movb 0x1(%r14), %al
incq %r14
leal -0x1(%rax), %ecx
cmpb $0x20, %cl
jb 0x53e7
xorl %ebx, %ebx
cmpb $0x2c, %al
jne 0x5482
movl $0x40, %edi
callq *0x9dad(%rip)           # 0xf1b8
testq %rax, %rax
je 0x546c
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rax, (%r15)
movq %r15, 0x8(%rax)
movb 0x1(%r14), %al
incq %r14
decb %al
cmpb $0x20, %al
jb 0x542c
movq %r12, %rdi
movq %r14, %rsi
callq 0x40a8
testq %rax, %rax
je 0x546c
movq %rax, %r14
decq %r14
movb 0x1(%r14), %al
incq %r14
leal -0x1(%rax), %ecx
cmpb $0x20, %cl
jb 0x544f
movq %r12, %r15
jmp 0x53f8
movq %rbx, 0x9ec6(%rip)      # 0xf330
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x10(%r14)
jmp 0x546a
movzbl %al, %eax
cmpl $0x5d, %eax
jne 0x5492
incq %r14
movq %r14, %rbx
jmp 0x546c
movq %r14, 0x9e97(%rip)      # 0xf330
jmp 0x546a
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: parse_hex4
static unsigned parse_hex4(const char *str)
{
	unsigned h=0;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	return h;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %cl
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x56a7
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x5697
addb $-0x37, %cl
jmp 0x56a5
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x573d
addb $-0x57, %cl
movl %ecx, %eax
movb 0x1(%rdi), %dl
leal -0x30(%rdx), %ecx
cmpb $0xa, %cl
jb 0x56cc
leal -0x41(%rdx), %ecx
cmpb $0x5, %cl
ja 0x56bf
addb $-0x37, %dl
jmp 0x56ca
leal -0x61(%rdx), %ecx
cmpb $0x5, %cl
ja 0x573d
addb $-0x57, %dl
movl %edx, %ecx
movb 0x2(%rdi), %sil
leal -0x30(%rsi), %edx
cmpb $0xa, %dl
jb 0x56f4
leal -0x41(%rsi), %edx
cmpb $0x5, %dl
ja 0x56e6
addb $-0x37, %sil
jmp 0x56f2
leal -0x61(%rsi), %edx
cmpb $0x5, %dl
ja 0x573d
addb $-0x57, %sil
movl %esi, %edx
movb 0x3(%rdi), %sil
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
jb 0x571f
leal -0x41(%rsi), %edi
cmpb $0x5, %dil
ja 0x5710
addb $-0x37, %sil
jmp 0x571d
leal -0x61(%rsi), %edi
cmpb $0x5, %dil
ja 0x573d
addb $-0x57, %sil
movl %esi, %edi
movzbl %al, %eax
movzbl %cl, %ecx
shll $0x8, %eax
shll $0x4, %ecx
addl %eax, %ecx
movzbl %dl, %edx
addl %ecx, %edx
shll $0x4, %edx
movzbl %dil, %eax
addl %edx, %eax
jmp 0x573f
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: ensure
static char* ensure(printbuffer *p,int needed)
{
	char *newbuffer;int newsize;
	if (!p || !p->buffer) return 0;
	needed+=p->offset;
	if (needed<=p->length) return p->buffer+p->offset;

	newsize=pow2gt(needed);
	newbuffer=(char*)cJSON_malloc(newsize);
	if (!newbuffer) {cJSON_free(p->buffer);p->length=0,p->buffer=0;return 0;}
	if (newbuffer) memcpy(newbuffer,p->buffer,p->length);
	cJSON_free(p->buffer);
	p->length=newsize;
	p->buffer=newbuffer;
	return newbuffer+p->offset;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x57c4
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0xc(%rdi), %rcx
addl %ecx, %esi
cmpl 0x8(%rdi), %esi
jle 0x57c7
decl %esi
movl %esi, %eax
sarl %eax
orl %esi, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %r15d
sarl $0x10, %r15d
orl %ecx, %r15d
incl %r15d
movslq %r15d, %rdi
callq *0x9a24(%rip)           # 0xf1b8
testq %rax, %rax
je 0x57cc
movq %rax, %r14
movq (%rbx), %rsi
movslq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x21c0
movq (%rbx), %rdi
callq *0x9a0c(%rip)           # 0xf1c0
movl %r15d, 0x8(%rbx)
movq %r14, (%rbx)
movslq 0xc(%rbx), %rax
addq %r14, %rax
jmp 0x57e5
xorl %eax, %eax
retq
addq %rcx, %rax
jmp 0x57e5
movq (%rbx), %rdi
callq *0x99eb(%rip)           # 0xf1c0
movl $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: print_number
static char *print_number(cJSON *item,printbuffer *p)
{
	char *str=0;
	double d=item->valuedouble;
	if (d==0)
	{
		if (p)	str=ensure(p,2);
		else	str=(char*)cJSON_malloc(2);	/* special case for 0. */
		if (str) strcpy(str,"0");
	}
	else if (fabs(((double)item->valueint)-d)<=DBL_EPSILON && d<=INT_MAX && d>=INT_MIN)
	{
		if (p)	str=ensure(p,21);
		else	str=(char*)cJSON_malloc(21);	/* 2^64+1 can be represented in 21 chars. */
		if (str)	sprintf(str,"%d",item->valueint);
	}
	else
	{
		if (p)	str=ensure(p,64);
		else	str=(char*)cJSON_malloc(64);	/* This is a nice tradeoff. */
		if (str)
		{
			if (fabs(floor(d)-d)<=DBL_EPSILON && fabs(d)<1.0e60)sprintf(str,"%.0f",d);
			else if (fabs(d)<1.0e-6 || fabs(d)>1.0e9)			sprintf(str,"%e",d);
			else												sprintf(str,"%f",d);
		}
	}
	return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd 0x30(%rdi), %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jne 0x5820
jp 0x5820
testq %rsi, %rsi
je 0x5871
movq %rsi, %rdi
movl $0x2, %esi
callq 0x5741
jmp 0x587c
ucomisd 0x5050(%rip), %xmm2     # 0xa878
jb 0x5892
movsd 0x504e(%rip), %xmm0     # 0xa880
ucomisd %xmm2, %xmm0
jb 0x5892
movq %rdi, %r14
xorps %xmm0, %xmm0
cvtsi2sdl 0x28(%rdi), %xmm0
subsd %xmm2, %xmm0
andpd 0x5071(%rip), %xmm0     # 0xa8c0
movsd 0x5031(%rip), %xmm1     # 0xa888
ucomisd %xmm0, %xmm1
jb 0x5892
testq %rsi, %rsi
je 0x58ab
movq %rsi, %rdi
movl $0x15, %esi
callq 0x5741
jmp 0x58b6
movl $0x2, %edi
callq *0x993c(%rip)           # 0xf1b8
movq %rax, %rbx
testq %rax, %rax
je 0x5937
movw $0x30, (%rbx)
jmp 0x5971
movapd %xmm2, -0x20(%rbp)
testq %rsi, %rsi
je 0x58d8
movq %rsi, %rdi
movl $0x40, %esi
callq 0x5741
jmp 0x58e3
movl $0x15, %edi
callq *0x9902(%rip)           # 0xf1b8
movq %rax, %rbx
testq %rax, %rax
je 0x5937
movl 0x28(%r14), %edx
leaq 0x4d6a(%rip), %rsi      # 0xa633
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2070
jmp 0x5971
movl $0x40, %edi
callq *0x98d5(%rip)           # 0xf1b8
movq %rax, %rbx
testq %rax, %rax
movapd -0x20(%rbp), %xmm0
je 0x5937
callq 0x22d0
movapd -0x20(%rbp), %xmm4
movapd 0x4fbe(%rip), %xmm2     # 0xa8c0
movapd %xmm4, %xmm1
andpd %xmm2, %xmm1
movsd 0x4f7e(%rip), %xmm3     # 0xa890
ucomisd %xmm1, %xmm3
jbe 0x593b
subsd %xmm4, %xmm0
andpd %xmm2, %xmm0
movsd 0x4f60(%rip), %xmm2     # 0xa888
ucomisd %xmm0, %xmm2
jb 0x593b
leaq 0x504c(%rip), %rsi      # 0xa981
jmp 0x5963
xorl %ebx, %ebx
jmp 0x5971
movsd 0x4f55(%rip), %xmm0     # 0xa898
ucomisd %xmm1, %xmm0
ja 0x595c
ucomisd 0x4f4f(%rip), %xmm1     # 0xa8a0
ja 0x595c
leaq 0x502f(%rip), %rsi      # 0xa989
jmp 0x5963
leaq 0x5023(%rip), %rsi      # 0xa986
movq %rbx, %rdi
movapd %xmm4, %xmm0
movb $0x1, %al
callq 0x2070
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_listening.c
// Function: qq_add_listening_config
qq_int_t qq_add_listening_config(int type, int port,
    size_t pool_size, qq_connection_handler_pt handler)
{
    size_t                  size;
    qq_listening_config_t  *lcf;

    size = sizeof(qq_listening_config_t);
    lcf = qq_calloc(size);
    if (lcf == NULL) {
        qq_log_error(0, "qq_add_listening_config() malloc(%u) failed", size);
        return QQ_ERROR;
    }
    lcf->type = type;
    lcf->port = port;
    lcf->pool_size = pool_size;
    lcf->handler = handler;

    if (qq_cycle->current_listening_config == NULL) {
        qq_cycle->current_listening_config = lcf;
        qq_cycle->listening_config = lcf;
    }
    else {
        qq_cycle->current_listening_config->next = lcf;
        qq_cycle->current_listening_config = lcf;
    }
    qq_cycle->nlistening += 1;

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %r12d
movl $0x20, %edi
callq 0x2473
testq %rax, %rax
je 0x64b9
movl %r12d, 0x8(%rax)
movl %r15d, 0xc(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x8e0f(%rip), %rdx      # 0xf2b0
movq (%rdx), %rcx
movq 0x50(%rcx), %rsi
testq %rsi, %rsi
je 0x64d7
movq %rax, (%rsi)
movq (%rdx), %rcx
leaq 0x50(%rcx), %rdx
jmp 0x64df
leaq 0x44dd(%rip), %rsi      # 0xa99d
movl $0x20, %edx
xorl %edi, %edi
xorl %eax, %eax
callq 0x6b27
movq $-0x1, %rax
jmp 0x64e8
movq %rax, 0x50(%rcx)
leaq 0x48(%rcx), %rdx
movq %rax, (%rdx)
incq 0x38(%rcx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_listening.c
// Function: qq_close_listening_sockets
void
qq_close_listening_sockets(qq_cycle_t *cycle)
{
    qq_uint_t         i;
    qq_listening_t   *ls;
    qq_connection_t  *c;

    qq_log_debug("qq_close_listening_sockets()");

    ls = cycle->listening;
    for (i = 0; i < cycle->nlistening; i++) {
        c = ls[i].connection;
        if (c) {
            if (c->read->active) {
                qq_epoll_del_event(c->read, QQ_READ_EVENT);
            }

            if (c->pool != NULL && c->type == SOCK_DGRAM) {
                qq_destroy_pool(c->pool);
            }

            qq_free_connection(c);
            c->fd = (qq_socket_t) -1;
        }

        qq_log_debug("close listening %s #%d ", ls[i].addr_text, ls[i].fd);

        if (close(ls[i].fd) == -1) {
            qq_log_error(errno, "close socket %s failed", ls[i].addr_text);
        }


        ls[i].fd = (qq_socket_t) -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4233(%rip), %rdi      # 0xaba8
xorl %eax, %eax
callq 0x6c74
cmpq $0x0, 0x38(%rbx)
je 0x6a2f
movq 0x40(%rbx), %r13
leaq 0x4233(%rip), %r14      # 0xabc5
xorl %r15d, %r15d
movq 0x58(%r13), %r12
testq %r12, %r12
je 0x69db
movq 0x8(%r12), %rdi
testb $0x8, 0x8(%rdi)
je 0x69b3
movl $0x1, %esi
callq 0x2c8a
movq 0x40(%r12), %rdi
testq %rdi, %rdi
je 0x69ca
cmpl $0x2, 0x48(%r12)
jne 0x69ca
callq 0x2338
movq %r12, %rdi
callq 0x283a
movl $0xffffffff, 0x18(%r12) # imm = 0xFFFFFFFF
leaq 0x18(%r13), %r12
movl (%r13), %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x6c74
movl (%r13), %edi
callq 0x2320
cmpl $-0x1, %eax
jne 0x6a16
callq 0x2030
movl (%rax), %edi
leaq 0x41d1(%rip), %rsi      # 0xabdd
movq %r12, %rdx
xorl %eax, %eax
callq 0x6b27
movl $0xffffffff, (%r13)     # imm = 0xFFFFFFFF
incq %r15
addq $0x60, %r13
cmpq 0x38(%rbx), %r15
jb 0x6995
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_log.c
// Function: qq_log_init
void
qq_log_init(qq_pid_t pid)
{
    char *p, *dir;
    char name[100];

    memset(qq_log.str, 0, QQ_MAX_LOG_STR);

    p = qq_log.str;
    qq_log.time_ptr = p;
    p += qq_log_time_value_len();

    qq_log.pid_ptr = p;
    sprintf(qq_log.pid_ptr, "   %10d   ", pid);
    p += qq_log_pid_value_len();

    qq_log.debug_desc_ptr = p;

    qq_log.errno_ptr = p;
    p += qq_log_errno_value_len();

    qq_log.err_desc_ptr = p;

    qq_log.err_prefix_len = qq_log_err_info_prefix_len();
    qq_log.debug_prefix_len = qq_log_debug_info_prefix_len();

    dir = (char *)get_current_dir_name();
    p = memcpy(name, dir, strlen(dir)) + strlen(dir);
    *p++ = '/';
    memcpy(p, QQ_ERR_LOG_FILE_NAME, strlen(QQ_ERR_LOG_FILE_NAME));

    qq_log.err_fd = qq_open_file(name, QQ_FILE_APPEND,
                                 QQ_FILE_CREATE_OR_OPEN,
                                 QQ_FILE_DEFAULT_ACCESS);
    if (qq_log.err_fd == -1) {
        qq_log.err_fd = STDERR_FILENO;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edi, %ebx
leaq 0x88e2(%rip), %r14      # 0xf338
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x2160
movq %r14, 0x89cc(%rip)      # 0xf438
leaq 0x88d8(%rip), %rdi      # 0xf34b
movq %rdi, 0x89c6(%rip)      # 0xf440
leaq 0x4173(%rip), %rsi      # 0xabf4
movl %ebx, %edx
xorl %eax, %eax
callq 0x2070
leaq 0x88ca(%rip), %rax      # 0xf35b
movq %rax, 0x89c0(%rip)      # 0xf458
movq %rax, 0x89a9(%rip)      # 0xf448
leaq 0x88c2(%rip), %rax      # 0xf368
movq %rax, 0x89a3(%rip)      # 0xf450
movabsq $0x2300000030, %rax     # imm = 0x2300000030
movq %rax, 0x89a2(%rip)      # 0xf460
callq 0x2300
movq %rax, %rbx
movq %rax, %rdi
callq 0x20d0
movq %rax, %r14
leaq -0x80(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21c0
movb $0x2f, -0x80(%rbp,%r14)
movw $0x6f6c, -0x7f(%rbp,%r14) # imm = 0x6F6C
movb $0x67, -0x7d(%rbp,%r14)
movq %r15, %rdi
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x21a0
cmpl $-0x1, %eax
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x894c(%rip)      # 0xf468
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_log.c
// Function: qq_log_error_debug_core
static void
qq_log_error_debug_core(int type, qq_err_t err, const char *fmt, va_list args)
{
    int  len;

    memcpy(qq_log.time_ptr, qq_cached_err_log_time.data, qq_cached_err_log_time.len);

    if (type == QQ_LOG_ERROR) {
        sprintf(qq_log.errno_ptr, "%10d   ", err);
        len = vsprintf(qq_log.err_desc_ptr, fmt, args);
        len += qq_log.err_prefix_len;
        qq_log.str[len++] = '\n';
        write(qq_log.err_fd, qq_log.str, len);
    }
    else if (type == QQ_LOG_DEBUG){
        len = vsprintf(qq_log.debug_desc_ptr, fmt, args);
        len += qq_log.debug_prefix_len;
        qq_log.str[len++] = '\n';
        write(STDERR_FILENO, qq_log.str, len);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %r12d
movq 0x886f(%rip), %rdi      # 0xf438
leaq 0x8ae0(%rip), %rax      # 0xf6b0
movq 0x8(%rax), %rsi
movq (%rax), %rdx
callq 0x21c0
cmpl $0x1, %r12d
jne 0x6c2c
leaq 0x874f(%rip), %r12      # 0xf338
movq 0x8858(%rip), %rdi      # 0xf448
leaq 0x4000(%rip), %rsi      # 0xabf7
movl %r15d, %edx
xorl %eax, %eax
callq 0x2070
movq 0x8848(%rip), %rdi      # 0xf450
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2100
movslq 0x8846(%rip), %rcx      # 0xf460
cltq
addq %rcx, %rax
movb $0xa, (%r12,%rax)
movl 0x883e(%rip), %edi      # 0xf468
jmp 0x6c5b
leaq 0x8705(%rip), %r15      # 0xf338
movq 0x881e(%rip), %rdi      # 0xf458
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2100
movslq 0x8818(%rip), %rcx      # 0xf464
cltq
addq %rcx, %rax
movb $0xa, (%r15,%rax)
movl $0x2, %edi
incl %eax
movslq %eax, %rdx
leaq 0x86d1(%rip), %rsi      # 0xf338
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20c0
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_main.c
// Function: main
int
main(int argc, char *const *argv)
{
    if (qq_get_options(argc, argv) != QQ_OK) {
        return 1;
    }

    if (qq_show_help || qq_show_version) {
        qq_show_help_version_info();
        return 0;
    }

    if (!qq_debug_mode) {
        if (daemon(1, 0) != QQ_OK) {
            qq_log_stderr("daemon(0, 0) failed"); 
            return 1;
        }
    }

    qq_time_init();

    qq_log_init(getpid());

#if (QQ_HAVE_JSON)
    if (qq_cjson_init(QQ_JSON_POOL_SIZE) != 0) {
        qq_log_error(0, "qq_cjson_init() failed");
        return 1;
    }
#endif

    if (qq_cycle_init() == QQ_ERROR) {
        qq_log_error(0, "qq_cycle_init() failed");
        return 1;
    }

    if (qq_signals_init() != QQ_OK) {
        return 1;
    }

    qq_process_cycle(qq_cycle);

#if (QQ_HAVE_JSON)
    qq_cjson_done();
#endif

    qq_cycle_done();
 
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jl 0x6e69
movslq %edi, %rdx
movl $0x1, %edi
leaq 0x865e(%rip), %r8       # 0xf470
leaq 0x8667(%rip), %r9       # 0xf480
leaq 0x8658(%rip), %r10      # 0xf478
movq (%rsi,%rdi,8), %rax
cmpb $0x2d, (%rax)
jne 0x6f7b
incq %rax
movzbl (%rax), %ecx
movq %r8, %r11
cmpl $0x67, %ecx
jg 0x6e4a
cmpl $0x3f, %ecx
je 0x6e57
cmpl $0x64, %ecx
jne 0x6e5d
movq %r9, %r11
jmp 0x6e57
cmpl $0x68, %ecx
je 0x6e57
cmpl $0x76, %ecx
jne 0x6eab
movq %r10, %r11
movb $0x1, (%r11)
jmp 0x6e2d
testl %ecx, %ecx
jne 0x6eab
incq %rdi
cmpq %rdx, %rdi
jne 0x6e20
movb 0x8601(%rip), %cl       # 0xf470
movb 0x8603(%rip), %al       # 0xf478
movl %ecx, %edx
orb %al, %dl
testb $0x1, %dl
je 0x6ebd
testb $0x1, %cl
je 0x6f21
leaq 0x3dec(%rip), %rsi      # 0xac7a
movl $0x8a, %edx
movl $0x2, %edi
callq 0x20c0
cmpb $0x0, 0x85d4(%rip)      # 0xf478
jne 0x6f25
jmp 0x6f3b
leaq 0x3db5(%rip), %rdi      # 0xac67
movl %ecx, %esi
xorl %eax, %eax
callq 0x6cf9
jmp 0x6f1a
cmpb $0x0, 0x85bc(%rip)      # 0xf480
jne 0x6eeb
movl $0x1, %ebx
movl $0x1, %edi
xorl %esi, %esi
callq 0x2230
testl %eax, %eax
je 0x6eeb
leaq 0x3d30(%rip), %rdi      # 0xac12
xorl %eax, %eax
callq 0x6cf9
jmp 0x6f3d
callq 0x89e4
callq 0x22a0
movl %eax, %edi
callq 0x6a40
movl $0x10000, %edi          # imm = 0x10000
callq 0x3ec0
testl %eax, %eax
je 0x6f46
leaq 0x3d15(%rip), %rsi      # 0xac26
xorl %edi, %edi
xorl %eax, %eax
callq 0x6b27
movl $0x1, %ebx
jmp 0x6f3d
testb $0x1, %al
je 0x6f3b
leaq 0x3dd9(%rip), %rsi      # 0xad05
movl $0x1c, %edx
movl $0x2, %edi
callq 0x20c0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x29a0
cmpq $-0x1, %rax
je 0x6f8e
callq 0x7ddc
movl $0x1, %ebx
testq %rax, %rax
jne 0x6f3d
leaq 0x8349(%rip), %rax      # 0xf2b0
movq (%rax), %rdi
callq 0x7e8b
callq 0x3f04
callq 0x2a93
jmp 0x6f3b
leaq 0x3cd2(%rip), %rdi      # 0xac54
movq %rax, %rsi
xorl %eax, %eax
callq 0x6cf9
jmp 0x6f1a
leaq 0x3ca8(%rip), %rsi      # 0xac3d
jmp 0x6f11
nop
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_md5.c
// Function: MD5Final
void MD5Final(MD5_CTX *context,unsigned char digest[16])
{
    unsigned int index = 0, padlen = 0;
    unsigned char bits[8];

    index = (context->count[0] >> 3) & 0x3F;
    padlen = (index < 56)?(56-index):(120-index);
    MD5Encode(bits,context->count,8);
    MD5Update(context,PADDING,padlen);
    MD5Update(context,bits,8);
    MD5Encode(digest,context->state,16);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
shrl $0x3, %eax
andl $0x3f, %eax
xorl %edx, %edx
cmpl $0x38, %eax
setae %dl
shll $0x6, %edx
orl $0x38, %edx
xorl %ecx, %ecx
movl (%r14,%rcx,4), %esi
movl %esi, -0x18(%rbp,%rcx,4)
incq %rcx
cmpq $0x2, %rcx
jne 0x78f1
subl %eax, %edx
leaq 0x78c5(%rip), %rsi      # 0xf1d0
movq %r14, %rdi
callq 0x6fba
leaq -0x18(%rbp), %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x6fba
xorl %eax, %eax
movb 0x8(%r14,%rax,4), %cl
movb %cl, (%rbx,%rax,4)
movb 0x9(%r14,%rax,4), %cl
movb %cl, 0x1(%rbx,%rax,4)
movb 0xa(%r14,%rax,4), %cl
movb %cl, 0x2(%rbx,%rax,4)
movb 0xb(%r14,%rax,4), %cl
movb %cl, 0x3(%rbx,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x7926
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/app/qq_mysql.c
// Function: qq_mysql_init
qq_int_t qq_mysql_init(void)
{
    qq_mysql = mysql_init(NULL);
    if (qq_mysql == NULL) {
        qq_log_error(0, "mysql_init() failed");
        return QQ_ERROR;
    }

    if (!mysql_real_connect(qq_mysql,
        QQ_MYSQL_HOST_NAME,
        QQ_MYSQL_USER_NAME,
        QQ_MYSQL_USER_PWD,
        QQ_MYSQL_DB_NAME,
        QQ_MYSQL_DB_PORT,
        NULL,
        0))
    {
        qq_log_error(0, "mysql_real_connect() failed");
        return QQ_ERROR;
    }

    if (mysql_query(qq_mysql, "set names utf8")) {
        qq_log_error(0, "mysql_query(set names utf8) failed");
        return QQ_ERROR;
    }
    

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
callq 0x20f0
movq %rax, 0x7ac2(%rip)      # 0xf490
testq %rax, %rax
je 0x7a29
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x335f(%rip), %rsi      # 0xad40
leaq 0x3362(%rip), %rdx      # 0xad4a
leaq 0x3360(%rip), %rcx      # 0xad4f
leaq 0x3362(%rip), %r8       # 0xad58
movq %rax, %rdi
movl $0xcea, %r9d            # imm = 0xCEA
callq 0x2140
testq %rax, %rax
je 0x7a32
movq 0x7a80(%rip), %rdi      # 0xf490
leaq 0x336a(%rip), %rsi      # 0xad81
callq 0x2190
testl %eax, %eax
je 0x7a4f
leaq 0x3369(%rip), %rsi      # 0xad90
jmp 0x7a39
leaq 0x26c4(%rip), %rsi      # 0xa0f4
jmp 0x7a39
leaq 0x332c(%rip), %rsi      # 0xad65
xorl %edi, %edi
xorl %eax, %eax
callq 0x6b27
movq $-0x1, %rax
addq $0x10, %rsp
popq %rbp
retq
xorl %eax, %eax
jmp 0x7a49
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/app/qq_mysql.c
// Function: qq_mysql_wifi_device_select
MYSQL_RES *
qq_mysql_wifi_device_select(char *device_id)
{
    memset(qq_str, 0, 256);
    sprintf(qq_str, "SELECT app_id,app_type FROM wifi_device WHERE device_id='%s'", device_id);

    if (mysql_query(qq_mysql, qq_str)) {
        qq_log_error(0, "qq_mysql_wifi_device_select(%s) query failed", device_id);
        return NULL;
    }

    qq_res = mysql_store_result(qq_mysql);
    if (qq_res == NULL) {
        qq_log_error(0, "qq_mysql_wifi_device_select(%s) result failed", device_id);
        return NULL;
    }

    return qq_res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x7a2b(%rip), %r14      # 0xf4a0
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x2160
leaq 0x3328(%rip), %rsi      # 0xadb3
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2070
movq 0x79f1(%rip), %rdi      # 0xf490
movq %r14, %rsi
callq 0x2190
testl %eax, %eax
je 0x7ac3
leaq 0x333e(%rip), %rsi      # 0xadf0
xorl %r14d, %r14d
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x6b27
jmp 0x7ade
movq 0x79c6(%rip), %rdi      # 0xf490
callq 0x2150
movq %rax, %r14
movq %rax, 0x7ac7(%rip)      # 0xf5a0
testq %rax, %rax
je 0x7ae6
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3330(%rip), %rsi      # 0xae1d
jmp 0x7ab2
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/app/qq_mysql.c
// Function: qq_mysql_wifi_device_insert_into
qq_int_t
qq_mysql_wifi_device_insert_into(char *device_id)
{
    memset(qq_str, 0, 256);
    sprintf(qq_str, "INSERT INTO wifi_device(device_id, app_id, app_type) VALUES ('%s', '%s', %d)",
        device_id, "\0", 0);

    if (mysql_query(qq_mysql, qq_str)) {
        qq_log_error(0, "qq_mysql_wifi_insert_into(device_id: %s) failed", device_id);
        return QQ_ERROR;
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x799d(%rip), %r15      # 0xf4a0
xorl %r14d, %r14d
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x2160
leaq 0x332f(%rip), %rsi      # 0xae4b
leaq 0x3498(%rip), %rcx      # 0xafbb
movq %r15, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x2070
movq 0x7956(%rip), %rdi      # 0xf490
movq %r15, %rsi
callq 0x2190
testl %eax, %eax
je 0x7b60
leaq 0x334b(%rip), %rsi      # 0xae98
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x6b27
movq $-0x1, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/app/qq_mysql.c
// Function: qq_mysql_wifi_device_update
qq_int_t
qq_mysql_wifi_device_update(char *device_id, char *app_id, int app_type)
{
    memset(qq_str, 0, 256);
    sprintf(qq_str, "UPDATE wifi_device SET app_id='%s' and app_type=%d WHERE device_id='%s'",
        app_id, app_type, device_id);

    if (mysql_query(qq_mysql, qq_str)) {
        qq_log_error(0, "qq_mysql_wifi_device_update(device_id: %s, app_id: %s, app_type: %d) failed",
            device_id, app_id, app_type);
        return QQ_ERROR;
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x7915(%rip), %r13      # 0xf4a0
xorl %r12d, %r12d
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x2160
leaq 0x3324(%rip), %rsi      # 0xaec8
movq %r13, %rdi
movq %r14, %rdx
movl %ebx, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x2070
movq 0x78d3(%rip), %rdi      # 0xf490
movq %r13, %rsi
callq 0x2190
testl %eax, %eax
je 0x7be9
leaq 0x3340(%rip), %rsi      # 0xaf10
xorl %edi, %edi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x6b27
movq $-0x1, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/app/qq_mysql.c
// Function: qq_mysql_wifi_device_delete
qq_int_t
qq_mysql_wifi_device_delete(char *device_id)
{
    memset(qq_str, 0, 256);
    sprintf(qq_str, "DELETE FROM wifi_device WHERE device_id='%s'", device_id);

    if (mysql_query(qq_mysql, qq_str)) {
        qq_log_error(0, "qq_mysql_wifi_device_delete(device_id: %s) failed", device_id);
        return QQ_ERROR;
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7891(%rip), %r15      # 0xf4a0
xorl %r14d, %r14d
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x2160
leaq 0x3334(%rip), %rsi      # 0xaf5c
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2070
movq 0x7854(%rip), %rdi      # 0xf490
movq %r15, %rsi
callq 0x2190
testl %eax, %eax
je 0x7c62
leaq 0x333a(%rip), %rsi      # 0xaf89
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x6b27
movq $-0x1, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_palloc.c
// Function: qq_create_pool
qq_pool_t *
qq_create_pool(size_t size)
{
    qq_pool_t  *p;

    p = qq_memalign(QQ_POOL_ALIGNMENT, size);
    if (p == NULL) {
        return NULL;
    }

    p->last = (u_char *) p + sizeof(qq_pool_t);
    p->end = (u_char *) p + size;

    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %edi
movq %rbx, %rsi
callq 0x24a0
testq %rax, %rax
je 0x7cc9
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
addq %rax, %rbx
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_palloc.c
// Function: qq_pcalloc
void *
qq_pcalloc(qq_pool_t *pool, size_t size)
{
    void *p;

    p = qq_palloc(pool, size);
    if (p) {
        memset(p, 0, size);
    }

    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq (%rdi), %rdi
movq 0x8(%rax), %rcx
addq $0x7, %rdi
andq $-0x8, %rdi
subq %rdi, %rcx
cmpq %rsi, %rcx
jb 0x7d4b
movq %rsi, %rdx
leaq (%rdi,%rsi), %rcx
movq %rcx, (%rax)
testq %rdi, %rdi
je 0x7d4b
xorl %esi, %esi
popq %rbp
jmp 0x2160
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/core/qq_palloc.c
// Function: qq_pcnalloc
void *
qq_pcnalloc(qq_pool_t *pool, size_t size)
{
    void *p;

    p = qq_pnalloc(pool, size);
    if (p) {
        memset(p, 0, size);
    }

    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq (%rdi), %rdi
movq 0x8(%rax), %rcx
subq %rdi, %rcx
cmpq %rsi, %rcx
jb 0x7d7c
movq %rsi, %rdx
leaq (%rdi,%rsi), %rcx
movq %rcx, (%rax)
testq %rdi, %rdi
je 0x7d7c
xorl %esi, %esi
popq %rbp
jmp 0x2160
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qq-smart[P]qq_sh_server/os/qq_process.c
// Function: qq_signals_init
qq_int_t
qq_signals_init(void)
{
    qq_signal_t       *sig;
    struct sigaction   sa;

    for (sig = signals; sig->signo != 0; sig++) {
        memset(&sa, 0, sizeof(struct sigaction));
        sa.sa_handler = sig->handler;
        sigemptyset(&sa.sa_mask);
        if (sigaction(sig->signo, &sa, NULL) == -1) {
            qq_log_error(errno, "sigaction(%s) failed", sig->signame);
            return QQ_ERROR;
        }
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
cmpl $0x0, 0x741b(%rip)      # 0xf210
je 0x7e53
leaq -0xb0(%rbp), %r14
leaq 0x742b(%rip), %r12      # 0xf230
xorl %ebx, %ebx
leaq -0xb8(%rbp), %r15
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2160
movq -0x8(%r12), %rax
movq %rax, -0xb8(%rbp)
movq %r14, %rdi
callq 0x2240
movl -0x20(%r12), %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2250
cmpl $-0x1, %eax
je 0x7e57
cmpl $0x0, (%r12)
leaq 0x20(%r12), %r12
jne 0x7e0e
jmp 0x7e78
xorl %ebx, %ebx
jmp 0x7e78
callq 0x2030
movl (%rax), %edi
movq -0x18(%r12), %rdx
leaq 0x3174(%rip), %rsi      # 0xafde
xorl %eax, %eax
callq 0x6b27
movq $-0x1, %rbx
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq