LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/dict.cpp
// Function: dictNext(dictIterator*)
dictEntry *dictNext(dictIterator *iter)
{
	while (1) {
		if (iter->entry == NULL) {
			dictht *ht = &iter->d->ht[iter->table];
			if (iter->index == -1 && iter->table == 0) {
				if (iter->safe)
					++iter->d->iterator;
			}
			++iter->index;
			if (iter->index >= (long)ht->size) {
				if (dictIsRehashing(iter->d) && iter->table == 0) {
					++iter->table;
					iter->index = 0;
					ht = &iter->d->ht[1];
				}
				else
					break;
			}
			iter->entry = ht->table[iter->index];
		}
		else {
			iter->entry = iter->nextEntry;
		}

		if (iter->entry) {
			iter->nextEntry = iter->entry->next;
			return iter->entry;
		}
	}

	return NULL;
}

// Assembly:
cmpq $0x0, 0x18(%rdi)
je 0x2bc9
leaq 0x20(%rdi), %rcx
jmp 0x2c3f
movq (%rdi), %rcx
movq 0x8(%rdi), %rsi
movl 0x10(%rdi), %edx
movslq %edx, %r8
movq %r8, %rax
shlq $0x5, %rax
addq %rcx, %rax
addq $0x10, %rax
cmpq $-0x1, %rsi
sete %r9b
testl %r8d, %r8d
sete %r8b
andb %r9b, %r8b
cmpb $0x1, %r8b
jne 0x2c05
cmpl $0x0, 0x14(%rdi)
je 0x2c05
incl 0x54(%rcx)
incq %rsi
movq %rsi, 0x8(%rdi)
cmpq 0x10(%rax), %rsi
jl 0x2c34
xorl %eax, %eax
cmpl $-0x1, 0x50(%rcx)
je 0x2c57
testl %edx, %edx
jne 0x2c57
movl $0x1, 0x10(%rdi)
movq $0x0, 0x8(%rdi)
addq $0x30, %rcx
movq %rcx, %rax
movq 0x8(%rdi), %rcx
shlq $0x3, %rcx
addq (%rax), %rcx
movq (%rcx), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0x2bc9
movq 0x10(%rax), %rcx
movq %rcx, 0x20(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/dict.cpp
// Function: dictReleaseIterator(dictIterator*)
void dictReleaseIterator(dictIterator *iter)
{
	if (!(iter->index == -1 && iter->table == 0)){
		if (iter->safe)
			--iter->d->iterator;
	}

	zfree(iter);
}

// Assembly:
cmpq $-0x1, 0x8(%rdi)
jne 0x2c69
cmpl $0x0, 0x10(%rdi)
je 0x39a3
cmpl $0x0, 0x14(%rdi)
je 0x39a3
movq (%rdi), %rax
decl 0x54(%rax)
jmp 0x39a3
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/dict.cpp
// Function: dictClear(dict*, dictht*, void (*)(void*))
int _dictClear(dict *d, dictht*ht, void(callback)(void *))
{
	unsigned long i;

	for (i = 0; i < ht->size && ht->used >0; ++i) {
		dictEntry *de, *nextde;
		if (callback && (i & 65536) == 0)
			callback(d->privdata);
		if ((de = ht->table[i]) == NULL)
			continue;
		while (de) {
			nextde = de->next;
			dictFreeKey(d, de);
			dictFreeVal(d, de);
			zfree(de);
			--ht->used;
			de = nextde;
		}
	}
	zfree(ht->table);
	_dictReset(ht);

	return DICT_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0x0, 0x10(%rsi)
je 0x2e5e
movq %rdx, %r14
movq %rdi, %r15
xorl %r13d, %r13d
cmpq $0x0, 0x8(%rbx)
je 0x2e5e
testq %r14, %r14
sete %al
movl %r13d, %ecx
shrl $0x10, %ecx
andl $0x1, %ecx
orb %al, %cl
jne 0x2e03
movq 0x8(%r15), %rdi
callq *%r14
movq (%rbx), %rax
movq (%rax,%r13,8), %r12
testq %r12, %r12
je 0x2e55
movq 0x10(%r12), %rbp
movq (%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x2e2a
movq 0x8(%r15), %rdi
movq (%r12), %rsi
callq *%rax
movq (%r15), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x2e41
movq 0x8(%r15), %rdi
movq 0x8(%r12), %rsi
callq *%rax
movq %r12, %rdi
callq 0x39a3
decq 0x8(%rbx)
movq %rbp, %r12
testq %rbp, %rbp
jne 0x2e0f
incq %r13
cmpq 0x10(%rbx), %r13
jb 0x2de2
movq (%rbx), %rdi
callq 0x39a3
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: startCompressRDB(redisDb*, char*, unsigned long*)
size_t startCompressRDB(redisDb *db, char *buf, size_t *pos)
{
	dict *d = db->dict;
	dictIterator *iter = dictGetSafeIterator(d);
	dictEntry *de;
	char sizebuf[SIZEBUF];
	//so. At first the "REDIS" should be compressed
	//it is a symbolof rdb file.
	memcpy(buf, "REDIS", 5);
	*pos += 5;
	size_t totlen = 5;
	while ((de = dictNext(iter)) != NULL) {
		totlen += compressToRDB(de, buf, pos);
	}
	//length totlen is excluded in totlen.
	//the stand of eof is "$$"
	//and last compressing the 'totlen'
	memcpy(buf + *pos, "$$", 2);
	*pos += 2;
	totlen += 2;
	parseSdsSize(totlen, sizebuf);
	memcpy(buf + *pos, sizebuf, strlen(sizebuf));
	size_t tlen = strlen(sizebuf);
	*pos += tlen;
	totlen += tlen;
	memset(buf + *pos, 0, 1);
	return totlen;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq (%rdi), %rdi
callq 0x2b80
movq %rax, %r12
movb $0x53, 0x4(%rbx)
movl $0x49444552, (%rbx)     # imm = 0x49444552
addq $0x5, (%r14)
movq %rax, %rdi
callq 0x2bbc
testq %rax, %rax
je 0x2f4f
movl $0x5, %r15d
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2fb2
addq %rax, %r15
movq %r12, %rdi
callq 0x2bbc
testq %rax, %rax
jne 0x2f2b
addq $0x2, %r15
jmp 0x2f55
movl $0x7, %r15d
movq (%r14), %rax
movw $0x2424, (%rbx,%rax)    # imm = 0x2424
addq $0x2, (%r14)
movq %rsp, %r12
movl %r15d, %edi
movq %r12, %rsi
callq 0x3094
movq (%r14), %r13
addq %rbx, %r13
movq %r12, %rdi
callq 0x1090
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1110
movq %r12, %rdi
callq 0x1090
movq (%r14), %rcx
addq %rax, %rcx
movq %rcx, (%r14)
addq %r15, %rax
movb $0x0, (%rbx,%rcx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: compressToRDB(dictEntry*, char*, unsigned long*)
size_t compressToRDB(dictEntry *de, char *buf, size_t *pos)
{
	size_t keysize;
	size_t valsize;
	robj *key = (robj *)de->key;
	robj *val = (robj *)de->val;
	
	switch (val->type) {
	case REDIS_STRING:
		keysize = compressKeyToRDB(key, buf, pos, REDIS_STRING);
		valsize = compressStringValueToRDB(val, buf, pos);
		break;
	case REDIS_LIST:
		keysize = compressKeyToRDB(key, buf, pos, REDIS_LIST);
		valsize = compressListValueToRDB(val, buf, pos);
		break;
	case REDIS_HASH:
		keysize = compressKeyToRDB(key, buf, pos, REDIS_HASH);
		valsize = compressHashValueToRDB(val, buf, pos);
		break;
	default:
		assert(0);
	}
	// extra 1 byte for type
	return keysize + valsize + 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %r15
movl (%r15), %ecx
cmpl $0x3, %ecx
je 0x3038
cmpl $0x2, %ecx
je 0x300b
cmpl $0x1, %ecx
jne 0x3075
movq (%rbx), %rcx
movb $0x31, (%r14,%rcx)
incq (%rbx)
movq 0x8(%rax), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x32b0
movq %rax, %r12
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x32b0
jmp 0x3063
movq (%rbx), %rcx
movb $0x32, (%r14,%rcx)
incq (%rbx)
movq 0x8(%rax), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x32b0
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x316b
jmp 0x3063
movq (%rbx), %rcx
movb $0x33, (%r14,%rcx)
incq (%rbx)
movq 0x8(%rax), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x32b0
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x31fc
addq %r12, %rax
incq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2075(%rip), %rdi      # 0x50f1
leaq 0x220e(%rip), %rsi      # 0x5291
leaq 0x220f(%rip), %rcx      # 0x5299
movl $0x47, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: parseSdsSize(int, char*)
static void parseSdsSize(int val, char *buf)
{
	int i;
	for (i = 0; i < SIZEBUF - 2; ++i) {
		if (!val)
			break;
		int aux = val % 10;
		val /= 10;
		char p = '0' + aux;
		memset(buf + i, p, 1);
	}
	memset(buf + i, 0, 1);

	int len = strlen(buf);
	char *e = buf + len - 1;
	char *s = buf;
	char c;
	while (s < e) {
		c = *s;
		*s = *e;
		*e = c;
		++s;
		--e;
	}
	memset(buf + i, '.', 1);
	memset(buf + i + 1, '\0', 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %r14d, %r14d
testl %edi, %edi
je 0x30de
movq %r14, %rcx
movslq %edi, %rdx
imulq $0x66666667, %rdx, %rax # imm = 0x66666667
movq %rax, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rax
addl %esi, %eax
leal (%rax,%rax), %esi
leal (%rsi,%rsi,4), %esi
subl %esi, %edx
addb $0x30, %dl
movb %dl, (%rbx,%r14)
incq %r14
cmpq $0xc, %rcx
ja 0x30de
addl $-0xa, %edi
cmpl $-0x13, %edi
movl %eax, %edi
jb 0x30a2
movb $0x0, (%rbx,%r14)
movq %rbx, %rdi
callq 0x1090
cltq
addq %rbx, %rax
decq %rax
cmpq %rbx, %rax
jbe 0x3117
leaq 0x1(%rbx), %rcx
movb -0x1(%rcx), %dl
movb (%rax), %sil
movb %sil, -0x1(%rcx)
movb %dl, (%rax)
decq %rax
leaq 0x1(%rcx), %rdx
cmpq %rax, %rcx
movq %rdx, %rcx
jb 0x30fc
movw $0x2e, (%rbx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: compressListValueToRDB(redisObject*, char*, unsigned long*)
size_t compressListValueToRDB(robj *val, char *buf, size_t *pos)
{
	size_t len = 0;
	list *l = (list *)val->ptr;
	listIterator *iter = listGetIterator(l, AL_START_HEAD);
	listNode *node;

	size_t slen = l->len;
	len = compressLenToRDB(slen, buf, pos);
	*pos += len;
	
	while ((node = listNext(iter)) != NULL) {
		robj *s = (robj *)(node->value);
		len += compressStringValueToRDB(s, buf, pos);
	}
	listReleaseIterator(iter);

	return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq 0x8(%rdi), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x15bd
movq %rax, %r15
movl 0x28(%r12), %edi
movq %rsp, %r13
movq %r13, %rsi
callq 0x3094
movq %r13, %rdi
callq 0x1090
movq %rax, %r12
movq (%rbx), %rdi
addq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x1110
addq %r12, (%rbx)
movq %r15, %rdi
callq 0x15f5
testq %rax, %rax
je 0x31e3
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x32b0
addq %rax, %r12
jmp 0x31be
movq %r15, %rdi
callq 0x15f0
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: compressHashValueToRDB(redisObject*, char*, unsigned long*)
size_t compressHashValueToRDB(robj *val, char *buf, size_t *pos)
{
	size_t len = 0;
	dict *d = (dict *)val->ptr;

	//Secondly, compressing the size of dictentry used. 
	size_t slen = d->ht[0].used + d->ht[1].used;
	len = compressLenToRDB(slen, buf, pos);
	*pos += len;

	dictIterator *iter = dictGetSafeIterator(d);
	dictEntry *de;

	while ((de = dictNext(iter)) != NULL) {
		robj* key = (robj*)de->key;
		robj* val = (robj*)de->val;
		len += compressStringValueToRDB(key, buf, pos);
		len += compressStringValueToRDB(val, buf, pos);
	}
	dictReleaseIterator(iter);

	return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq 0x8(%rdi), %r12
movl 0x38(%r12), %edi
addl 0x18(%r12), %edi
movq %rsp, %r13
movq %r13, %rsi
callq 0x3094
movq %r13, %rdi
callq 0x1090
movq %rax, %r15
movq (%rbx), %rdi
addq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x1110
addq %r15, (%rbx)
movq %r12, %rdi
callq 0x2b80
movq %rax, %r12
movq %rax, %rdi
callq 0x2bbc
testq %rax, %rax
je 0x3296
movq (%rax), %rcx
movq 0x8(%rax), %rbp
movq 0x8(%rcx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x32b0
movq %rax, %r13
addq %r15, %r13
movq 0x8(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x32b0
movq %rax, %r15
addq %r13, %r15
movq %r12, %rdi
jmp 0x3256
movq %r12, %rdi
callq 0x2c58
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: compressSdsToRDB(char*, char*, unsigned long*)
size_t compressSdsToRDB(sds s, char *buf, size_t *pos)
{	
	struct sdshdr *sh = (struct sdshdr *)(s - sizeof(struct sdshdr));
	size_t sdslen = sh->len;
	size_t sizelen;
	char sizebuf[SIZEBUF];
	
	parseSdsSize(sdslen, sizebuf);
	sizelen = strlen(sizebuf);
	memcpy(buf + *pos, sizebuf, sizelen);
	*pos += sizelen;
	memcpy(buf + *pos, sh->buf, sdslen);
	*pos += sdslen;
	return sdslen + sizelen;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movl -0x8(%rdi), %r14d
movq %rsp, %r13
movl %r14d, %edi
movq %r13, %rsi
callq 0x3094
movq %r13, %rdi
callq 0x1090
movq %rax, %rbp
movq (%rbx), %rdi
addq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x1110
movq (%rbx), %rdi
addq %rbp, %rdi
movq %rdi, (%rbx)
addq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1110
addq %r14, (%rbx)
addq %r14, %rbp
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: startLoadFromRDB(redisClient*, char*, unsigned long*)
void startLoadFromRDB(redisClient *client, char *buf, size_t *pos)
{
	dict *d = client->db->dict;
	size_t totlen = 0;
	size_t buflen = strlen(buf);
	if(*buf != 'R' || *(buf + 1) != 'E' || *(buf + 2) != 'D' ||
			*(buf + 3) != 'I' || *(buf + 4) != 'S'){
		perror("load error of rdb file: ");
		exit(1);
	}
	*pos += 5;
	
	
	while (totlen < buflen) {
		totlen += *pos;
		if (*(buf + *pos) == '$' && *(buf + *pos + 1) == '$')
			break;
		extractFromRDB(d, buf, pos);
	}
	totlen += 2;
	
	
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rax
movq (%rax), %r15
movq %rsi, %rdi
callq 0x1090
cmpb $0x52, (%r14)
jne 0x33a4
cmpb $0x45, 0x1(%r14)
jne 0x33a4
cmpb $0x44, 0x2(%r14)
jne 0x33a4
cmpb $0x49, 0x3(%r14)
jne 0x33a4
cmpb $0x53, 0x4(%r14)
jne 0x33a4
movq %rax, %r12
addq $0x5, (%rbx)
testq %rax, %rax
je 0x339a
xorl %r13d, %r13d
movq (%rbx), %rax
cmpb $0x24, (%r14,%rax)
jne 0x3384
cmpb $0x24, 0x1(%r14,%rax)
je 0x339a
addq %rax, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x33a9
cmpq %r12, %r13
jb 0x3372
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x1270
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: extractFromRDB(dict*, char*, unsigned long*)
void extractFromRDB(dict *d ,char *buf, size_t *pos)
{
	size_t totlen = 0;
	char c = *(buf + *pos);
	int type = c - '0';
	++*pos;
	robj *key = extractStringObjectFromRDB(buf, pos);
	robj *val;
	
	switch (type) {
	case REDIS_STRING:
		val = extractStringObjectFromRDB(buf, pos);
		break;
	case REDIS_LIST:
		val = extractListObjectFromRDB(buf, pos);
		break;
	case REDIS_HASH:
		val = extractHashObjectFromRDB(buf, pos);
		break;
	default:
		assert(0);
	}
	dictAdd(d, key, val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdx), %rax
movzbl (%rsi,%rax), %ebp
incq %rax
movq %rax, (%rdx)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x3624
movq %rax, %rdi
callq 0x3ec0
movq %rax, %r14
cmpl $0x33, %ebp
je 0x340e
cmpl $0x32, %ebp
je 0x3401
cmpl $0x31, %ebp
jne 0x342f
movq %r12, %rdi
movq %r15, %rsi
callq 0x3624
movq %rax, %rdi
callq 0x3ec0
jmp 0x3419
movq %r12, %rdi
movq %r15, %rsi
callq 0x345d
jmp 0x3419
movq %r12, %rdi
movq %r15, %rsi
callq 0x34cb
movq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2ea7
leaq 0x1cbb(%rip), %rdi      # 0x50f1
leaq 0x1e54(%rip), %rsi      # 0x5291
leaq 0x1ed9(%rip), %rcx      # 0x531d
movl $0xfe, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: extractListObjectFromRDB(char*, unsigned long*)
robj *extractListObjectFromRDB(char *buf, size_t *pos)
{
	robj *o = createListObject();
	list *l = listCreate();

	size_t slen = parseSdsIntVal(buf, pos);
	((list *)o->ptr)->len = slen;

	while (slen--) {
		robj* s = extractStringObjectFromRDB(buf, pos);
		listAddNodeHead(l, s);
	}
	o->ptr = l;

	return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3ee6
movq %rax, %r15
callq 0x145c
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3569
movq %rax, %r13
movq 0x8(%r15), %rax
movq %r13, 0x28(%rax)
testq %r13, %r13
je 0x34ba
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3624
movq %rax, %rdi
callq 0x3ec0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1480
decq %r13
jne 0x3497
movq %r12, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: extractHashObjectFromRDB(char*, unsigned long*)
robj *extractHashObjectFromRDB(char *buf, size_t *pos)
{
	robj *o = createHashObject();
	dict *d = dictCreate(&dictObjectType, NULL);

	size_t slen = parseSdsIntVal(buf, pos);
	while (slen--) {
		robj* key = extractStringObjectFromRDB(buf, pos);
		robj* val = extractStringObjectFromRDB(buf, pos);

		dictAdd(d, key, val);
	}
	o->ptr = d;

	return o;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3f1c
movq %rax, %r15
leaq 0x4c85(%rip), %rdi      # 0x8170
xorl %esi, %esi
callq 0x2a1d
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3569
testq %rax, %rax
je 0x3544
movq %rax, %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3624
movq %rax, %rdi
callq 0x3ec0
movq %rax, %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3624
movq %rax, %rdi
callq 0x3ec0
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x2ea7
decq %r13
jne 0x3508
movq %r12, 0x8(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: parseSdsIntVal(char*, unsigned long*)
static size_t parseSdsIntVal(char *buf, size_t *pos)
{
	size_t len, ret = 0;
	char *point = strchr(buf + *pos, '.');
	char *head = buf + *pos;
	if (point == NULL)
		return 0;
	else if (point - head > 14)
		return 0;

	len = point - head;
	size_t p = 1;
	size_t i = len - 1;
	while (i-- > 0) {
		p *= 10;
	}

	while (len--) {
		char c = *(buf + *pos);
		++(*pos);
		int i = c - '0';
		ret = ret + i * p;
		p /= 10;
		if (p == 0)
			p = 1;
	}
	//skip point '.'
	++*pos;

	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
addq %rdi, %r15
movq %r15, %rdi
movl $0x2e, %esi
callq 0x1080
testq %rax, %rax
je 0x3598
movq %rax, %rdx
subq %r15, %rdx
cmpq $0xe, %rdx
jle 0x359c
xorl %esi, %esi
jmp 0x361b
cmpq $0x1, %rdx
je 0x35be
movq %r15, %rsi
subq %rax, %rsi
incq %rsi
movl $0x1, %ecx
addq %rcx, %rcx
leaq (%rcx,%rcx,4), %rcx
incq %rsi
jne 0x35b0
jmp 0x35c3
movl $0x1, %ecx
testq %rdx, %rdx
je 0x3616
movq (%rbx), %rdi
incq %rdi
subq %rax, %r15
xorl %esi, %esi
movabsq $-0x3333333333333333, %r8 # imm = 0xCCCCCCCCCCCCCCCD
movl $0x1, %r9d
movsbq -0x1(%r14,%rdi), %rax
addq $-0x30, %rax
imulq %rcx, %rax
addq %rax, %rsi
movq %rcx, %rax
mulq %r8
shrq $0x3, %rdx
cmpq $0xa, %rcx
cmovbq %r9, %rdx
movq %rdi, (%rbx)
incq %rdi
movq %rdx, %rcx
incq %r15
jne 0x35e3
jmp 0x3618
xorl %esi, %esi
incq (%rbx)
movq %rsi, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/rdb.cpp
// Function: extractSdsFromRDB(char*, unsigned long*)
sds extractSdsFromRDB(char *buf, size_t *pos)
{
	char p[SDSBUF];
	size_t slen = extractFromSdsLen(buf, pos);

	if (!slen && slen >= SDSBUF){
		perror("extractSdsFromRDB error:");
		exit(1);
	}
	memcpy(p, buf + *pos, slen);
	*pos += slen;
	sds s = sdsNewlen(p, slen);

	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10000, %rsp          # imm = 0x10000
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movb (%rdi,%rax), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x3656
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3569
movq %rax, %r15
jmp 0x3659
xorl %r15d, %r15d
movq (%rbx), %r13
addq %r13, %r14
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1110
addq %r15, %r13
movq %r13, (%rbx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x3694
addq $0x10000, %rsp          # imm = 0x10000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/sds.cpp
// Function: sdsNewlen(void const*, unsigned long)
sds sdsNewlen(const void *init, size_t len)
{
	struct sdshdr *sh;

	if (init) {
		sh = (struct sdshdr *)zmalloc(sizeof(struct sdshdr) + len + 1);
	}
	else {
		sh = (struct sdshdr *)zcalloc(sizeof(struct sdshdr) + len + 1);
	}
	if (sh == NULL)
		return NULL;
	sh->len = len;
	sh->free = 0;
	if (init && len)
		memcpy(sh->buf, init, len);
	sh->buf[len] = '\0';

	return (char *)sh->buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9(%rsi), %rdi
testq %r14, %r14
je 0x36af
callq 0x3884
jmp 0x36b4
callq 0x38f5
movq %rax, %r15
testq %rax, %rax
je 0x36f2
testq %r14, %r14
sete %al
movl %ebx, (%r15)
movl $0x0, 0x4(%r15)
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x36e6
leaq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1110
movb $0x0, 0x8(%r15,%rbx)
addq $0x8, %r15
jmp 0x36f5
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/sds.cpp
// Function: sdsCmp(char*, char*)
int sdsCmp(const sds s1, const sds s2)
{
	size_t l1, l2, minlen;
	
	l1 = strlen(s1);
	l2 = strlen(s2);
	minlen = l1 > l2 ? l2 : l1;
	int cmp = memcmp(s1, s2, minlen);
	if (cmp == 0)
		return l1 - l2;
	else
		return cmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1090
movq %rax, %r15
movq %rbx, %rdi
callq 0x1090
movq %rax, %r12
cmpq %rax, %r15
movq %rax, %rdx
cmovbq %r15, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10b0
subl %r12d, %r15d
testl %eax, %eax
cmovel %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/sds.cpp
// Function: sdsMakeRoomFor(char*, unsigned long)
sds sdsMakeRoomFor(sds s, size_t addlen)
{
	struct sdshdr *sh, *newsh;
	size_t free = sdsavail(s);
	size_t len, newlen;

	if (free > addlen)
		return s;
	
	sh = (struct sdshdr *)(s - sizeof(struct sdshdr));
	len = sdslen(s);
	newlen = sh->len + addlen;
	if (newlen < SDS_MAX_PERALLOC)
		newlen *= 2;
	else
		newlen += SDS_MAX_PERALLOC;
	
	newsh = (struct sdshdr *)zrealloc(sh, sizeof(struct sdshdr) + newlen + 1);
	if (newsh == NULL)
		return NULL;

	newsh->len = newlen;
	newsh->free = newlen - len;

	return newsh->buf;
}

// Assembly:
movq %rdi, %rax
movl -0x4(%rdi), %ecx
cmpq %rsi, %rcx
ja 0x381e
pushq %r14
pushq %rbx
pushq %rax
movl -0x8(%rax), %ebx
addq $-0x8, %rax
addq %rbx, %rsi
leaq (%rsi,%rsi), %rcx
movl $0x100000, %edx         # imm = 0x100000
leaq (%rsi,%rdx), %r14
cmpq %rdx, %rsi
cmovbq %rcx, %r14
leaq 0x9(%r14), %rsi
movq %rax, %rdi
callq 0x3930
testq %rax, %rax
je 0x3815
movl %r14d, (%rax)
subl %ebx, %r14d
movl %r14d, 0x4(%rax)
addq $0x8, %rax
jmp 0x3817
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/sds.cpp
// Function: sdsCat(char*, char const*)
sds sdsCat(sds s, const char *p)
{
	size_t curlen = sdslen(s);
	size_t len = strlen(p);
	
	s = sdsMakeRoomFor(s, len);
	if (s == NULL)
		return NULL;

	struct sdshdr *sh = (struct sdshdr *)(s - (sizeof(struct sdshdr)));
	memcpy(s + curlen, p, len);

	sh->len = curlen + len;
	sh->free = sh->free - len;
	s[curlen + len] = '\0';

	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl -0x8(%rdi), %r12d
movq %rsi, %rdi
callq 0x1090
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x37c7
testq %rax, %rax
je 0x3873
movq %rax, %rbx
movq %rax, %rdi
addq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1110
movq %r14, %rax
addq %r12, %rax
movl %eax, -0x8(%rbx)
subl %r14d, -0x4(%rbx)
movb $0x0, (%rbx,%rax)
jmp 0x3875
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/zmalloc.cpp
// Function: zmalloc(unsigned long)
void *zmalloc(size_t size)
{
	void *ptr = malloc(size + PREFIX_SIZE);
	if (!ptr)
		zmalloc_oom(size);
	*((size_t *)ptr) = size;
	update_zmalloc_stat_alloc(size + PREFIX_SIZE);

	return (char *)ptr + PREFIX_SIZE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x11a0
testq %rax, %rax
je 0x38c4
movq %rbx, %rcx
andq $-0x8, %rcx
addq $0x10, %rcx
testb $0x7, %bl
cmoveq %r14, %rcx
addq %rcx, 0x48fb(%rip)      # 0x81b0
movq %rbx, (%rax)
addq $0x8, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x38cc
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/zmalloc.cpp
// Function: zcalloc(unsigned long)
void *zcalloc(size_t size)
{
	void *ptr = calloc(1, size + PREFIX_SIZE);
	if (!ptr)
		zmalloc_oom(size);
	*((size_t *)ptr) = size;
	update_zmalloc_stat_add(size + PREFIX_SIZE);
	
	return (char *)ptr + PREFIX_SIZE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movl $0x1, %edi
movq %r14, %rsi
callq 0x1100
testq %rax, %rax
je 0x3928
addq %r14, 0x4897(%rip)      # 0x81b0
movq %rbx, (%rax)
addq $0x8, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x38cc
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/zmalloc.cpp
// Function: zrealloc(void*, unsigned long)
void *zrealloc(void *ptr, size_t size)
{
	void *realptr, *newptr;
	size_t old_size;

	if (ptr == NULL)
		return zmalloc(size);

	realptr = (char*)ptr - PREFIX_SIZE;
	old_size = *((size_t*)realptr);
	newptr = realloc(realptr, size + PREFIX_SIZE);
	if (!newptr)
		zmalloc_oom(size);

	*((size_t*)newptr) = size;
	update_zmalloc_stat_free(old_size);
	update_zmalloc_stat_alloc(size);

	return (char*)newptr + PREFIX_SIZE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x397b
movq -0x8(%rdi), %r14
addq $-0x8, %rdi
leaq 0x8(%rbx), %rsi
callq 0x1210
testq %rax, %rax
je 0x398a
movq %rbx, (%rax)
addq $0x7, %r14
andq $-0x8, %r14
addq $0x7, %rbx
andq $-0x8, %rbx
subq %r14, %rbx
addq %rbx, 0x4841(%rip)      # 0x81b0
addq $0x8, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3884
movq %rbx, %rdi
callq 0x38cc
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/zmalloc.cpp
// Function: zfree(void*)
void zfree(void *ptr)
{
	void *realptr;
	size_t old_size;

	if (ptr == NULL)
		return;
	realptr = (char *)ptr - PREFIX_SIZE;
	old_size = *((size_t *)ptr);
	update_zmalloc_stat_free(old_size + PREFIX_SIZE);
	free(realptr);
}

// Assembly:
testq %rdi, %rdi
je 0x39d0
movq (%rdi), %rax
addq $-0x8, %rdi
leaq 0x8(%rax), %rcx
movq %rax, %rdx
andq $-0x8, %rdx
addq $0x10, %rdx
testb $0x7, %al
cmoveq %rcx, %rdx
subq %rdx, 0x47e5(%rip)      # 0x81b0
jmp 0x1180
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/aefile.cpp
// Function: aeCreateFileEvent(int, int, int)
aeEventLoop *aeCreateFileEvent(int epollfd, int fd, int mask)
{
	aeEventLoop *el = (aeEventLoop *)zmalloc(sizeof(struct aeEventLoop));
	el->rproc = NULL;
	el->wproc = NULL;
	el->epollfd = epollfd;

	if (fd > el->maxfd)
		el->maxfd = fd;
	el->fd = fd;
	el->mask = mask;
	
	return el;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
movl $0x20, %edi
callq 0x3884
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movl %r14d, 0xc(%rax)
cmpl %ebp, (%rax)
jge 0x3a02
movl %ebp, (%rax)
movl %ebp, 0x8(%rax)
movl %ebx, 0x4(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/aefile.cpp
// Function: fileProcFromNet(aeEventLoop*, redisClient*)
void fileProcFromNet(struct aeEventLoop *el, redisClient *client)
{
	if (!(el->mask & REDIS_READABLE))
		assert(0);
	client->fd = el->fd;
	client->querybuf = (char *)malloc(REDIS_QUERY_CHUNK_BYTES * sizeof(char));
	memset(client->querybuf, 0, REDIS_QUERY_CHUNK_BYTES);
	char query[REDIS_QUERY_CHUNK_BYTES];
	size_t totlen = REDIS_QUERY_CHUNK_BYTES;
	size_t nread = 0;
	
	if((nread = read(el->fd, client->querybuf, REDIS_QUERY_CHUNK_BYTES)) == -1){
		perror("read error:");
		close(el->fd);
		delete_event(el->epollfd, el->fd, EPOLLIN);
	}
	else if(nread == 0){
		fprintf(stderr, "client close.\n");
		close(el->fd);
		delete_event(el->epollfd, el->fd, EPOLLIN);
	}
	else{
		memset(client->querybuf + nread, 0, 1);
		parseQuery(client);
		deduceCommandForQuery(client);
		modify_event(el->epollfd, el->fd, EPOLLOUT);
		free(client->querybuf);
		client->querybuf = NULL;
		el->rproc = NULL;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testb $0x1, 0x4(%rdi)
je 0x3add
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movl 0x8(%rdi), %ebp
movl %ebp, 0x8(%rsi)
movl $0x400, %edi            # imm = 0x400
callq 0x11a0
movq %rax, %r12
movq %rax, 0x10(%r14)
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x10d0
movl $0x400, %edx            # imm = 0x400
movl %ebp, %edi
movq %r12, %rsi
callq 0x11d0
testq %rax, %rax
je 0x3ad0
cmpq $-0x1, %rax
je 0x3ac3
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
movq %r14, %rdi
callq 0x404c
movq %r14, %rdi
callq 0x2585
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %edi
leaq 0x4(%rsp), %rcx
movl $0x4, (%rcx)
movl %edx, 0x4(%rcx)
movl $0x3, %esi
callq 0x11b0
movq 0x10(%r14), %rdi
callq 0x1180
xorl %eax, %eax
movq %rax, 0x10(%r14)
movq %rax, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
callq 0x12d9
jmp 0x3ab6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1285
jmp 0x3ab6
leaq 0x160d(%rip), %rdi      # 0x50f1
leaq 0x1892(%rip), %rsi      # 0x537d
leaq 0x1896(%rip), %rcx      # 0x5388
movl $0x24, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/aefile.cpp
// Function: fileProcIntoNet(aeEventLoop*, redisClient*)
void fileProcIntoNet(struct aeEventLoop *el, redisClient *client)
{
	if (!(el->mask & 2))
		assert(0);
		
	client->fd = el->fd;
	size_t nwrite = 0;

	memcpy(client->buf+client->bufpos, "\n", 1);
	++client->bufpos;
	if((nwrite = write(el->fd, client->buf, client->bufpos)) == -1){
		perror("write error: ");
		close(el->fd);
		delete_event(el->epollfd, el->fd, EPOLLOUT);
	}
	else{
		modify_event(el->epollfd, el->fd, EPOLLIN);
		memset(client->buf, 0, client->bufpos);
		client->bufpos = 0;
		el->wproc = NULL;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testb $0x2, 0x4(%rdi)
je 0x3bd9
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rdi), %eax
movl %eax, 0x8(%rsi)
leaq 0x34(%rsi), %r15
movslq 0x30(%rsi), %rax
movb $0xa, 0x34(%rsi,%rax)
movslq 0x30(%rsi), %rdx
incq %rdx
movl %edx, 0x30(%rsi)
movl 0x8(%rdi), %edi
movq %r15, %rsi
callq 0x1070
cmpq $-0x1, %rax
je 0x3bcb
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %edi
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
movl %edx, 0x4(%rcx)
movl $0x3, %esi
callq 0x11b0
movslq 0x30(%r14), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x10d0
movl $0x0, 0x30(%r14)
movq $0x0, 0x18(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8(%rbx), %rdi
movq %rbx, %rsi
callq 0x131d
jmp 0x3bc1
leaq 0x1511(%rip), %rdi      # 0x50f1
leaq 0x1796(%rip), %rsi      # 0x537d
leaq 0x17ef(%rip), %rcx      # 0x53dd
movl $0x46, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/db.cpp
// Function: dbModifyStringVal(redisDb*, void*, void*)
int dbModifyStringVal(redisDb *db, void *key, void *val)
{
	dict *d = db->dict;
	dictEntry *de = dictFind(d, key);
	if (de == NULL) 
		return REDIS_ERR;

	robj *old_val = (robj *)de->val;
	robj *new_val = (robj *)val;
	if (keyStringObjectCompare(NULL, old_val, new_val))
		return REDIS_ERR;

	decrRefCount(old_val);
	de->val = new_val;

	return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq (%rdi), %rdi
callq 0x2a6a
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x3c66
movq %rax, %r14
movq 0x8(%rax), %r15
xorl %edi, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3e6b
testl %eax, %eax
jne 0x3c66
movq %r15, %rdi
callq 0x3ff4
movq %rbx, 0x8(%r14)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/db.cpp
// Function: removeHashEntry(dict*, void*, void*)
void removeHashEntry(dict *d, void *key, void *val)
{
	unsigned int h, idx, table;
	dictEntry *cur, *prev;
	int decr = 0;
	h = (d->type->hashFunction)(key);
	for (table = 0; table < 2; ++table) {
		idx = h & d->ht[table].size_mask;
		cur = d->ht[table].table[idx];
		prev = NULL;
		if (cur != NULL) {
			if (dictCompareKeys(d, key, cur->key)) {
				d->ht[table].table[idx] = cur->next;
				decr = 1;
				break;
			}
			prev = cur;
			cur = cur->next;
		}
		while (cur != NULL) {
			if (dictCompareKeys(d, key, cur->key)) {
				prev->next = cur->next;
				decr = 1;
				break;
			}
			prev = cur;
			cur = cur->next;
		}
		if (dictIsRehashing(d))
			break;
	}
	if (decr) {
		--d->ht[table].used;
		decrRefCountVoid(key);
		decrRefCountVoid(val);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x20(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
movq %rsi, %rdi
callq *(%rax)
movl %eax, 0xc(%rsp)
leaq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
xorl %ecx, %ecx
movl $0x0, 0x8(%rsp)
movq %rcx, %r12
shlq $0x5, %r12
movq 0x10(%rsp), %rax
movl 0x18(%rax,%r12), %r13d
andl 0xc(%rsp), %r13d
movq (%rax,%r12), %rax
movq (%rax,%r13,8), %rbp
testq %rbp, %rbp
movq %rcx, 0x18(%rsp)
je 0x3cf6
movq (%r15), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x3cfc
movq 0x8(%r15), %rdi
movq (%rbp), %rdx
movq %r14, %rsi
callq *%rax
jmp 0x3d05
xorl %ebx, %ebx
xorl %ebp, %ebp
jmp 0x3d0d
xorl %eax, %eax
cmpq %r14, (%rbp)
sete %al
movq 0x10(%rbp), %rbx
testl %eax, %eax
jne 0x3d80
testq %rbx, %rbx
je 0x3d55
movq (%r15), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x3d2c
movq 0x8(%r15), %rdi
movq (%rbx), %rdx
movq %r14, %rsi
callq *%rax
jmp 0x3d34
xorl %eax, %eax
cmpq %r14, (%rbx)
sete %al
movq 0x10(%rbx), %rcx
testl %eax, %eax
jne 0x3d49
movq %rbx, %rbp
movq %rcx, %rbx
testq %rcx, %rcx
jne 0x3d12
jmp 0x3d55
movq %rcx, 0x10(%rbp)
movl $0x1, 0x8(%rsp)
cmpl $-0x1, 0x50(%r15)
movq 0x18(%rsp), %rcx
jne 0x3d76
leaq 0x1(%rcx), %rax
testq %rcx, %rcx
movq %rax, %rcx
je 0x3cb3
movl $0x2, %ecx
cmpl $0x0, 0x8(%rsp)
sete %al
jmp 0x3d96
movq 0x10(%rsp), %rax
addq %r12, %rax
movq (%rax), %rax
movq %rbx, (%rax,%r13,8)
xorl %eax, %eax
movq 0x18(%rsp), %rcx
testb %al, %al
je 0x3da9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %eax
shlq $0x5, %rax
decq 0x18(%r15,%rax)
movq %r14, %rdi
callq 0x3f17
movq 0x20(%rsp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3f17
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/object.cpp
// Function: dictStringObjectHashFuction(void const*)
unsigned int dictStringObjectHashFuction(const void *key)
{	
	const char *p = (sds)((robj *)key)->ptr;

	unsigned int hash = (unsigned int)dict_hash_function_seed;
	unsigned len = strlen(p);
	while (len--) {
		hash = ((hash << 5) + hash) + (tolower(*p++));
	}

	return hash;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x1090
movq %rax, %r14
movl $0x1505, %eax           # imm = 0x1505
testl %r14d, %r14d
je 0x3e12
xorl %r15d, %r15d
movl %eax, %ebp
shll $0x5, %ebp
addl %eax, %ebp
movsbl (%rbx,%r15), %edi
callq 0x11e0
addl %ebp, %eax
incq %r15
cmpl %r15d, %r14d
jne 0x3df7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/object.cpp
// Function: stringObjectDup(void*, void const*)
void *stringObjectDup(void *pirvdata, const void *key)
{
	assert(((robj *)key)->type == REDIS_STRING);
	
	char *s = (char *)(((robj *)key)->ptr);
	robj *k = createStringObject(s);

	return k;
}

// Assembly:
pushq %rbx
cmpl $0x1, (%rsi)
jne 0x3e4c
movq 0x8(%rsi), %rdi
callq 0x3726
movq %rax, %rbx
movl $0x10, %edi
callq 0x3884
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
popq %rbx
retq
leaq 0x1697(%rip), %rdi      # 0x54ea
leaq 0x15e5(%rip), %rsi      # 0x543f
leaq 0x16ad(%rip), %rcx      # 0x550e
movl $0x8b, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/object.cpp
// Function: createObject(int, void*)
robj *createObject(int type, void *ptr)
{
	robj *o = (robj *)zmalloc(sizeof(robj));
	o->type = type;
	o->ptr = ptr;
	o->refcount = 1;

	return o;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x10, %edi
callq 0x3884
movl %ebp, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/object.cpp
// Function: createListObject()
robj *createListObject()
{
	list *l = listCreate();
	robj *o = createObject(REDIS_LIST, l);
	listSetFreeMethod(l, decrRefCountVoid);

	return o;
}

// Assembly:
pushq %rbx
callq 0x145c
movq %rax, %rbx
movl $0x10, %edi
callq 0x3884
movabsq $0x100000002, %rcx      # imm = 0x100000002
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
leaq 0x6(%rip), %rcx         # 0x3f17
movq %rcx, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/object.cpp
// Function: freeStringObject(void*)
void freeStringObject(void *o) 
{
	robj *val = (robj *)o;
	assert(val->type == REDIS_STRING);
	sdsFree((sds)val->ptr);
	zfree(val);
}

// Assembly:
pushq %rbx
cmpl $0x1, (%rdi)
jne 0x3f61
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x375c
movq %rbx, %rdi
popq %rbx
jmp 0x39a3
leaq 0x14bd(%rip), %rdi      # 0x5425
leaq 0x14d0(%rip), %rsi      # 0x543f
leaq 0x14d4(%rip), %rcx      # 0x544a
movl $0x32, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/object.cpp
// Function: freeListObject(void*)
void freeListObject(void *o)
{
	robj *val = (robj *)o;
	assert(val->type == REDIS_LIST);
	listRelease((list *)val->ptr);
	zfree(val);
}

// Assembly:
pushq %rbx
cmpl $0x2, (%rdi)
jne 0x3f9b
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x16bc
movq %rbx, %rdi
popq %rbx
jmp 0x39a3
leaq 0x14c6(%rip), %rdi      # 0x5468
leaq 0x1496(%rip), %rsi      # 0x543f
leaq 0x14d0(%rip), %rcx      # 0x5480
movl $0x3a, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/object.cpp
// Function: freeHashObject(void*)
void freeHashObject(void *o)
{
	robj *val = (robj *)o;
	assert(val->type == REDIS_HASH);
	dictRelease((dict *)val->ptr);
	zfree(val);
}

// Assembly:
pushq %rbx
cmpl $0x3, (%rdi)
jne 0x3fd5
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2e81
movq %rbx, %rdi
popq %rbx
jmp 0x39a3
leaq 0x14c0(%rip), %rdi      # 0x549c
leaq 0x145c(%rip), %rsi      # 0x543f
leaq 0x14ca(%rip), %rcx      # 0x54b4
movl $0x42, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/object.cpp
// Function: decrRefCount(redisObject*)
void decrRefCount(robj *o)
{
	
	if (o->refcount > 1) {
		--o->refcount;
	}
	else if (o->refcount == 1) {
		switch (o->type) {
		case REDIS_STRING:
			freeStringObject(o);
			break;
		case REDIS_LIST:
			freeListObject(o);
			break;
		case REDIS_HASH:
			freeHashObject(o);
			break;
		default:
			assert(0);
		}
	}
}

// Assembly:
movl 0x4(%rdi), %eax
cmpl $0x2, %eax
jl 0x4003
decl %eax
movl %eax, 0x4(%rdi)
jmp 0x4026
cmpl $0x1, %eax
jne 0x4026
movl (%rdi), %eax
cmpl $0x3, %eax
je 0x3fba
cmpl $0x2, %eax
je 0x3f80
cmpl $0x1, %eax
jne 0x4027
jmp 0x3f46
retq
pushq %rax
leaq 0x10c2(%rip), %rdi      # 0x50f1
leaq 0x1409(%rip), %rsi      # 0x543f
leaq 0x1493(%rip), %rcx      # 0x54d0
movl $0x59, %edx
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/redis.cpp
// Function: parseQuery(redisClient*)
void parseQuery(redisClient *client)
{
	size_t pos = 0;
	int argc = 0;
	int i = 0;
	size_t diff;
	size_t buflen = strlen(client->querybuf);
	//as far as I known, it will receive the 127 ASCII at first correspondence, so the 10 and ASCII must be deleted 	
	//and the last correspondence we just exclude the 10 ASCII
	//and it may be includes other situations beyond i known.
	//so in the loop more charcters are comsidered.
	char *p = client->querybuf + buflen;
	for(i = 1; i < 10; ++i){
		--p;
		if(*p == '\n')
			break;
	}
	buflen -= i;
	memset(client->querybuf + buflen, 0, 1);
	while (pos < buflen) {
		char *p = strchr(client->querybuf + pos, ' ');
		robj *o;
	
		if (p == NULL) {
			diff = buflen - pos;
			o = parseQueryObject(client->querybuf, &pos, diff);
		}
		else {
			diff = p - (client->querybuf + pos);
			if (diff == 0) {
				++pos;
				continue;
			}
			o = parseQueryObject(client->querybuf, &pos, diff);
			//for skip ' '
			++pos;
		}
		client->argv[argc] = o;
		++argc;
	}
	client->argc = argc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq %r14, %rdi
callq 0x1090
movq %rax, %r15
leaq (%rax,%r14), %rcx
decq %rcx
movl $0x1, %eax
cmpb $0xa, (%rcx)
je 0x408f
incl %eax
decq %rcx
cmpl $0xa, %eax
jne 0x407b
movl $0xa, %eax
movl %eax, %eax
subq %rax, %r15
movb $0x0, (%r14,%r15)
je 0x4145
xorl %ebp, %ebp
xorl %r14d, %r14d
movq %r15, 0x8(%rsp)
movq 0x10(%rbx), %r12
addq %r14, %r12
movq %r12, %rdi
movl $0x20, %esi
callq 0x1080
testq %rax, %rax
je 0x40fe
movq %rax, %r13
subq %r12, %r13
je 0x4137
movq %rbx, %r15
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1110
movb $0x0, 0x10(%rsp,%r13)
movq %rbx, %rdi
movq %r15, %rbx
movq 0x8(%rsp), %r15
callq 0x3ec0
addq %r13, %r14
incq %r14
jmp 0x4128
movq %r15, %r13
subq %r14, %r13
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1110
movb $0x0, 0x10(%rsp,%r13)
movq %r14, %rdi
callq 0x3ec0
movq %r15, %r14
movq 0x20(%rbx), %rcx
movslq %ebp, %rbp
movq %rax, (%rcx,%rbp,8)
incl %ebp
jmp 0x413a
incq %r14
cmpq %r15, %r14
jb 0x40a9
jmp 0x4147
xorl %ebp, %ebp
movl %ebp, 0x18(%rbx)
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/TTLIUJJ[P]acker_redis/redis.cpp
// Function: initRedisClient()
redisClient *initRedisClient()
{
	redisClient *client = (redisClient *)zmalloc(sizeof(struct redisClient));
	redisCommand *cmd = (redisCommand *)zmalloc(sizeof(struct redisCommand));
	redisDb *db = (redisDb *)zmalloc(sizeof(struct redisDb));
	dict *d = dictCreate(&dictObjectType, NULL);
	db->dict = d;
	client->db = db;
	
	client->fd = -1;
	client->argv = (robj **)zmalloc(MAXQUERYARGC * sizeof(robj *));
	client->argc = 0;
	client->cmd = NULL;
	client->querybuf = NULL;
	client->bufpos = 0;
	memset(client->buf, 0, REDIS_REPLY_CHUNK_BYTES);

	return client;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x4038, %edi           # imm = 0x4038
callq 0x3884
movq %rax, %rbx
movl $0x18, %edi
callq 0x3884
movl $0x10, %edi
callq 0x3884
movq %rax, %r14
leaq 0x3fe5(%rip), %rdi      # 0x8170
xorl %esi, %esi
callq 0x2a1d
movq %rax, (%r14)
movq %r14, (%rbx)
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movl $0x400, %edi            # imm = 0x400
callq 0x3884
movq %rax, 0x20(%rbx)
movl $0x0, 0x18(%rbx)
leaq 0x28(%rbx), %rdi
movq $0x0, 0x10(%rbx)
movl $0x400c, %edx           # imm = 0x400C
xorl %esi, %esi
callq 0x10d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/nompelis[P]INTecplotLib/utils.c
// Function: inUtils_TrimLeadingSpaceTextline
int inUtils_TrimLeadingSpaceTextline( char *buf )
{
   size_t i,ie=0,is=0;


   if( buf == NULL ) return(1);

   while( buf[is] == ' ' ) ++is;
   while( buf[ie] != '\0' ) ++ie;

   if( is == 0 ) return(0);

   for(i=0;i<ie-is;++i) {
      buf[i] = buf[i+is];
      buf[i+is] = '\0';
   }

   return(0);
}

// Assembly:
testq %rdi, %rdi
je 0x12a0
xorl %ecx, %ecx
movq %rcx, %rax
incq %rcx
cmpb $0x20, (%rdi,%rax)
je 0x1252
xorl %edx, %edx
cmpb $0x0, (%rdi,%rdx)
leaq 0x1(%rdx), %rdx
jne 0x1260
testq %rax, %rax
sete %sil
cmpq %rdx, %rcx
sete %r8b
xorl %eax, %eax
orb %sil, %r8b
jne 0x129f
subq %rcx, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
movb -0x1(%rdi,%rcx), %sil
movb %sil, (%rdi)
movb $0x0, -0x1(%rdi,%rcx)
incq %rdi
decq %rdx
jne 0x128a
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/AlexTheMagnus[P]Project_Hex/src/ProjectHex.cc
// Function: printUnexpectedArgumentsMessage()
void printUnexpectedArgumentsMessage() {
    std::cout << RED;  //Color rojo
    std::cout << "Error, demasiados argumetos." << std::endl;
    std::cout << "El uso adecuado es: \"sudo ./Project_Hex.out <infoFile.txt>\"" << std::endl;
    std::cout << RESET;  //Reset de formato de letra (color, negrita,..)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x4b77(%rip), %rbx      # 0x6fd0
leaq 0x2ba4(%rip), %rsi      # 0x5004
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21c0
leaq 0x2b98(%rip), %rsi      # 0x500c
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x2b7a(%rip), %rsi      # 0x5029
movl $0x3b, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x2b7b(%rip), %rsi      # 0x5065
movl $0x4, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/AlexTheMagnus[P]Project_Hex/src/ProjectHex.cc
// Function: getFileInfoName[abi:cxx11](int, char**)
string getFileInfoName(int argc, char* argv[]) {
    if (argc > 2) {
        printUnexpectedArgumentsMessage();
        exit(-1);
    }
    if (argc == 2) {
        std::cerr << "info" << std::endl;

        return argv[1];
    }
    std::cerr << "info" << std::endl;

    return "info.txt";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x3, %esi
jge 0x25a6
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
movq 0x4acb(%rip), %r12      # 0x6ff0
leaq 0x2b3e(%rip), %rsi      # 0x506a
movl $0x4, %edx
movq %r12, %rdi
callq 0x21c0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
cmpl $0x2, %r15d
jne 0x2579
movq 0x8(%r14), %rsi
leaq -0x21(%rbp), %rdx
movq %rbx, %rdi
callq 0x26b0
jmp 0x2596
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2ae8(%rip), %rsi      # 0x506f
leaq 0x2ae9(%rip), %rdx      # 0x5077
movq %rbx, %rdi
callq 0x41dc
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x244c
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21d0