LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listAddNodeHead
list *listAddNodeHead(list *list, void *value)
{
    listNode *node;

    if ((node = zmalloc(sizeof(*node))) == NULL)
        return NULL;
    node->value = value;
    if (list->len == 0) {
        list->head = list->tail = node;
        node->prev = node->next = NULL;
    } else {
        node->prev = NULL;
        node->next = list->head;
        list->head->prev = node;
        list->head = node;
    }
    list->len++;
    return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x18, %edi
callq 0x19760
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x123c1
movq $0x0, -0x8(%rbp)
jmp 0x1244f
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x12404
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
jmp 0x12437
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listAddNodeTail
list *listAddNodeTail(list *list, void *value)
{
    listNode *node;

    if ((node = zmalloc(sizeof(*node))) == NULL)
        return NULL;
    node->value = value;
    if (list->len == 0) {
        list->head = list->tail = node;
        node->prev = node->next = NULL;
    } else {
        node->prev = list->tail;
        node->next = NULL;
        list->tail->next = node;
        list->tail = node;
    }
    list->len++;
    return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x18, %edi
callq 0x19760
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x12491
movq $0x0, -0x8(%rbp)
jmp 0x12523
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x124d4
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
jmp 0x1250b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listInsertNode
list *listInsertNode(list *list, listNode *old_node, void *value, int after) {
    listNode *node;

    if ((node = zmalloc(sizeof(*node))) == NULL)
        return NULL;
    node->value = value;
    if (after) {
        node->prev = old_node;
        node->next = old_node->next;
        if (list->tail == old_node) {
            list->tail = node;
        }
    } else {
        node->next = old_node;
        node->prev = old_node->prev;
        if (list->head == old_node) {
            list->head = node;
        }
    }
    if (node->prev != NULL) {
        node->prev->next = node;
    }
    if (node->next != NULL) {
        node->next->prev = node;
    }
    list->len++;
    return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x18, %edi
callq 0x19760
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x12568
movq $0x0, -0x8(%rbp)
jmp 0x12630
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpl $0x0, -0x24(%rbp)
je 0x125b1
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x125af
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x125e5
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x125e3
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x125e5
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x125fe
movq -0x30(%rbp), %rcx
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x12618
movq -0x30(%rbp), %rcx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listDelNode
void listDelNode(list *list, listNode *node)
{
    if (node->prev)
        node->prev->next = node->next;
    else
        list->head = node->next;
    if (node->next)
        node->next->prev = node->prev;
    else
        list->tail = node->prev;
    if (list->free) list->free(node->value);
    zfree(node);
    list->len--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1266f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x1267e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1269d
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
jmp 0x126ac
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x126c9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x19a30
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x28(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listGetIterator
listIter *listGetIterator(list *list, int direction)
{
    listIter *iter;

    if ((iter = zmalloc(sizeof(*iter))) == NULL) return NULL;
    if (direction == AL_START_HEAD)
        iter->next = list->head;
    else
        iter->next = list->tail;
    iter->direction = direction;
    return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x10, %edi
callq 0x19760
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x1271d
movq $0x0, -0x8(%rbp)
jmp 0x12754
cmpl $0x0, -0x14(%rbp)
jne 0x12733
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12742
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listNext
listNode *listNext(listIter *iter)
{
    listNode *current = iter->next;

    if (current != NULL) {
        if (iter->direction == AL_START_HEAD)
            iter->next = current->next;
        else
            iter->next = current->prev;
    }
    return current;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x12825
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x12815
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12823
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12825
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listDup
list *listDup(list *orig)
{
    list *copy;
    listIter iter;
    listNode *node;

    if ((copy = listCreate()) == NULL)
        return NULL;
    copy->dup = orig->dup;
    copy->free = orig->free;
    copy->match = orig->match;
    listRewind(orig, &iter);
    while((node = listNext(&iter)) != NULL) {
        void *value;

        if (copy->dup) {
            value = copy->dup(node->value);
            if (value == NULL) {
                listRelease(copy);
                return NULL;
            }
        } else
            value = node->value;
        if (listAddNodeTail(copy, value) == NULL) {
            listRelease(copy);
            return NULL;
        }
    }
    return copy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
callq 0x12280
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x12858
movq $0x0, -0x8(%rbp)
jmp 0x12924
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x12780
leaq -0x28(%rbp), %rdi
callq 0x127e0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x1291c
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x128e5
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x128e3
movq -0x18(%rbp), %rdi
callq 0x12300
movq $0x0, -0x8(%rbp)
jmp 0x12924
jmp 0x128f1
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x12460
cmpq $0x0, %rax
jne 0x12917
movq -0x18(%rbp), %rdi
callq 0x12300
movq $0x0, -0x8(%rbp)
jmp 0x12924
jmp 0x12895
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listSearchKey
listNode *listSearchKey(list *list, void *key)
{
    listIter iter;
    listNode *node;

    listRewind(list, &iter);
    while((node = listNext(&iter)) != NULL) {
        if (list->match) {
            if (list->match(node->value, key)) {
                return node;
            }
        } else {
            if (key == node->value) {
                return node;
            }
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x12780
leaq -0x28(%rbp), %rdi
callq 0x127e0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x129ae
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x12992
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
je 0x12990
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x129b6
jmp 0x129ac
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x129aa
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x129b6
jmp 0x129ac
jmp 0x1294d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listIndex
listNode *listIndex(list *list, long index) {
    listNode *n;

    if (index < 0) {
        index = (-index)-1;
        n = list->tail;
        while(index-- && n) n = n->prev;
    } else {
        n = list->head;
        while(index-- && n) n = n->next;
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jge 0x12a2a
xorl %eax, %eax
subq -0x10(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x19(%rbp)
je 0x12a12
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x12a1b
jmp 0x12a28
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x129ed
jmp 0x12a73
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x1a(%rbp)
je 0x12a5a
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0x12a63
jmp 0x12a71
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x12a35
jmp 0x12a73
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listRotate
void listRotate(list *list) {
    listNode *tail = list->tail;

    if (listLength(list) <= 1) return;

    /* Detach current tail */
    list->tail = tail->prev;
    list->tail->next = NULL;
    /* Move it as head */
    list->head->prev = tail;
    tail->prev = NULL;
    tail->next = list->head;
    list->head = tail;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x1, 0x28(%rax)
ja 0x12aa1
jmp 0x12af3
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: sdscatcolor
sds sdscatcolor(sds o, char *s, size_t len, char *color) {
    if (!isColorTerm()) return sdscatlen(o,s,len);

    int bold = strstr(color,"bold") != NULL;
    int ccode = 37; /* Defaults to white. */
    if (strstr(color,"red")) ccode = 31;
    else if (strstr(color,"red")) ccode = 31;
    else if (strstr(color,"green")) ccode = 32;
    else if (strstr(color,"yellow")) ccode = 33;
    else if (strstr(color,"blue")) ccode = 34;
    else if (strstr(color,"magenta")) ccode = 35;
    else if (strstr(color,"cyan")) ccode = 36;
    else if (strstr(color,"white")) ccode = 37;

    o = sdscatfmt(o,"\033[%i;%i;49m",bold,ccode);
    o = sdscatlen(o,s,len);
    o = sdscat(o,"\033[0m");
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
callq 0x12b00
cmpl $0x0, %eax
jne 0x12b8c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f8a0
movq %rax, -0x8(%rbp)
jmp 0x12d0f
movq -0x28(%rbp), %rdi
leaq 0x7802c(%rip), %rsi     # 0x8abc3
callq 0x106a0
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movl $0x25, -0x30(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x7800b(%rip), %rsi     # 0x8abc8
callq 0x106a0
cmpq $0x0, %rax
je 0x12bd4
movl $0x1f, -0x30(%rbp)
jmp 0x12cc2
movq -0x28(%rbp), %rdi
leaq 0x77fe9(%rip), %rsi     # 0x8abc8
callq 0x106a0
cmpq $0x0, %rax
je 0x12bf6
movl $0x1f, -0x30(%rbp)
jmp 0x12cc0
movq -0x28(%rbp), %rdi
leaq 0x77fcb(%rip), %rsi     # 0x8abcc
callq 0x106a0
cmpq $0x0, %rax
je 0x12c18
movl $0x20, -0x30(%rbp)
jmp 0x12cbe
movq -0x28(%rbp), %rdi
leaq 0x77faf(%rip), %rsi     # 0x8abd2
callq 0x106a0
cmpq $0x0, %rax
je 0x12c3a
movl $0x21, -0x30(%rbp)
jmp 0x12cbc
movq -0x28(%rbp), %rdi
leaq 0x77f94(%rip), %rsi     # 0x8abd9
callq 0x106a0
cmpq $0x0, %rax
je 0x12c59
movl $0x22, -0x30(%rbp)
jmp 0x12cba
movq -0x28(%rbp), %rdi
leaq 0x77f7a(%rip), %rsi     # 0x8abde
callq 0x106a0
cmpq $0x0, %rax
je 0x12c78
movl $0x23, -0x30(%rbp)
jmp 0x12cb8
movq -0x28(%rbp), %rdi
leaq 0x77f63(%rip), %rsi     # 0x8abe6
callq 0x106a0
cmpq $0x0, %rax
je 0x12c97
movl $0x24, -0x30(%rbp)
jmp 0x12cb6
movq -0x28(%rbp), %rdi
leaq 0x77f49(%rip), %rsi     # 0x8abeb
callq 0x106a0
cmpq $0x0, %rax
je 0x12cb4
movl $0x25, -0x30(%rbp)
jmp 0x12cb6
jmp 0x12cb8
jmp 0x12cba
jmp 0x12cbc
jmp 0x12cbe
jmp 0x12cc0
jmp 0x12cc2
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
leaq 0x77f1e(%rip), %rsi     # 0x8abf1
movb $0x0, %al
callq 0x1fec0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f8a0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x77eff(%rip), %rsi     # 0x8abfd
callq 0x1f930
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: sdsCatColorizedLdbReply
sds sdsCatColorizedLdbReply(sds o, char *s, size_t len) {
    char *color = "white";

    if (strstr(s,"<debug>")) color = "bold";
    if (strstr(s,"<redis>")) color = "green";
    if (strstr(s,"<reply>")) color = "cyan";
    if (strstr(s,"<error>")) color = "red";
    if (strstr(s,"<hint>")) color = "bold";
    if (strstr(s,"<value>") || strstr(s,"<retval>")) color = "magenta";
    if (len > 4 && isdigit(s[3])) {
        if (s[1] == '>') color = "yellow"; /* Current line. */
        else if (s[2] == '#') color = "bold"; /* Break point. */
    }
    return sdscatcolor(o,s,len,color);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x77eb0(%rip), %rax     # 0x8abeb
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x77eb8(%rip), %rsi     # 0x8ac02
callq 0x106a0
cmpq $0x0, %rax
je 0x12d60
leaq 0x77e67(%rip), %rax     # 0x8abc3
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x77e9f(%rip), %rsi     # 0x8ac0a
callq 0x106a0
cmpq $0x0, %rax
je 0x12d81
leaq 0x77e4f(%rip), %rax     # 0x8abcc
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x77e86(%rip), %rsi     # 0x8ac12
callq 0x106a0
cmpq $0x0, %rax
je 0x12da2
leaq 0x77e48(%rip), %rax     # 0x8abe6
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x77e6d(%rip), %rsi     # 0x8ac1a
callq 0x106a0
cmpq $0x0, %rax
je 0x12dc3
leaq 0x77e09(%rip), %rax     # 0x8abc8
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x77e54(%rip), %rsi     # 0x8ac22
callq 0x106a0
cmpq $0x0, %rax
je 0x12de4
leaq 0x77de3(%rip), %rax     # 0x8abc3
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x77e3a(%rip), %rsi     # 0x8ac29
callq 0x106a0
cmpq $0x0, %rax
jne 0x12e10
movq -0x10(%rbp), %rdi
leaq 0x77e2c(%rip), %rsi     # 0x8ac31
callq 0x106a0
cmpq $0x0, %rax
je 0x12e1b
leaq 0x77dc7(%rip), %rax     # 0x8abde
movq %rax, -0x20(%rbp)
cmpq $0x4, -0x18(%rbp)
jbe 0x12e79
callq 0x106e0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl 0x3(%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x12e79
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3e, %eax
jne 0x12e5d
leaq 0x77d7b(%rip), %rax     # 0x8abd2
movq %rax, -0x20(%rbp)
jmp 0x12e77
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x23, %eax
jne 0x12e75
leaq 0x77d52(%rip), %rax     # 0x8abc3
movq %rax, -0x20(%rbp)
jmp 0x12e77
jmp 0x12e79
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x12b50
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliSetPreferences
void cliSetPreferences(char **argv, int argc, int interactive) {
    if (!strcasecmp(argv[0],":set") && argc >= 2) {
        if (!strcasecmp(argv[1],"hints")) pref.hints = 1;
        else if (!strcasecmp(argv[1],"nohints")) pref.hints = 0;
        else {
            printf("%sunknown redis-cli preference '%s'\n",
                interactive ? "" : ".redisclirc: ",
                argv[1]);
        }
    } else {
        printf("%sunknown redis-cli internal command '%s'\n",
            interactive ? "" : ".redisclirc: ",
            argv[0]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x77d7a(%rip), %rsi     # 0x8ac3a
callq 0x10060
cmpl $0x0, %eax
jne 0x12f50
cmpl $0x2, -0xc(%rbp)
jl 0x12f50
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x77d5e(%rip), %rsi     # 0x8ac41
callq 0x10060
cmpl $0x0, %eax
jne 0x12ef9
movl $0x1, 0x8e581(%rip)     # 0xa1478
jmp 0x12f4e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x77d37(%rip), %rsi     # 0x8ac3f
callq 0x10060
cmpl $0x0, %eax
jne 0x12f1e
movl $0x0, 0x8e55c(%rip)     # 0xa1478
jmp 0x12f4c
movl -0x10(%rbp), %ecx
leaq 0x77d44(%rip), %rsi     # 0x8ac6c
leaq 0x7b3b9(%rip), %rax     # 0x8e2e8
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x77d02(%rip), %rdi     # 0x8ac47
movb $0x0, %al
callq 0x101d0
jmp 0x12f4e
jmp 0x12f7d
movl -0x10(%rbp), %ecx
leaq 0x77d12(%rip), %rsi     # 0x8ac6c
leaq 0x7b387(%rip), %rax     # 0x8e2e8
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
leaq 0x77d04(%rip), %rdi     # 0x8ac7a
movb $0x0, %al
callq 0x101d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliLoadPreferences
void cliLoadPreferences(void) {
    sds rcfile = getDotfilePath(REDIS_CLI_RCFILE_ENV,REDIS_CLI_RCFILE_DEFAULT);
    if (rcfile == NULL) return;
    FILE *fp = fopen(rcfile,"r");
    char buf[1024];

    if (fp) {
        while(fgets(buf,sizeof(buf),fp) != NULL) {
            sds *argv;
            int argc;

            argv = sdssplitargs(buf,&argc);
            if (argc > 0) cliSetPreferences(argv,argc,0);
            sdsfreesplitres(argv,argc);
        }
        fclose(fp);
    }
    sdsfree(rcfile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
leaq 0x77d03(%rip), %rdi     # 0x8aca5
leaq 0x77d0c(%rip), %rsi     # 0x8acb5
callq 0x13060
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x12fbe
jmp 0x13053
movq -0x8(%rbp), %rdi
leaq 0x77f10(%rip), %rsi     # 0x8aed9
callq 0x10390
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1304a
jmp 0x12fdb
leaq -0x410(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x102f0
cmpq $0x0, %rax
je 0x13041
leaq -0x410(%rbp), %rdi
leaq -0x41c(%rbp), %rsi
callq 0x20e50
movq %rax, -0x418(%rbp)
cmpl $0x0, -0x41c(%rbp)
jle 0x1302d
movq -0x418(%rbp), %rdi
movl -0x41c(%rbp), %esi
xorl %edx, %edx
callq 0x12ea0
movq -0x418(%rbp), %rdi
movl -0x41c(%rbp), %esi
callq 0x20ad0
jmp 0x12fdb
movq -0x10(%rbp), %rdi
callq 0x10190
movq -0x8(%rbp), %rdi
callq 0x1ee80
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: getDotfilePath
static sds getDotfilePath(char *envoverride, char *dotfilename) {
    char *path = NULL;
    sds dotPath = NULL;

    /* Check the env for a dotfile override. */
    path = getenv(envoverride);
    if (path != NULL && *path != '\0') {
        if (!strcmp("/dev/null", path)) {
            return NULL;
        }

        /* If the env is set, return it. */
        dotPath = sdsnew(path);
    } else {
        char *home = getenv("HOME");
        if (home != NULL && *home != '\0') {
            /* If no override is set use $HOME/<dotfilename>. */
            dotPath = sdscatprintf(sdsempty(), "%s/%s", home, dotfilename);
        }
    }
    return dotPath;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10040
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x130ce
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x130ce
movq -0x20(%rbp), %rsi
leaq 0x77e05(%rip), %rdi     # 0x8aeb0
callq 0x10330
cmpl $0x0, %eax
jne 0x130bf
movq $0x0, -0x8(%rbp)
jmp 0x1311d
movq -0x20(%rbp), %rdi
callq 0x1ed70
movq %rax, -0x28(%rbp)
jmp 0x13115
leaq 0x77de5(%rip), %rdi     # 0x8aeba
callq 0x10040
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x13113
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x13113
callq 0x1ed50
movq %rax, %rdi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0x77db7(%rip), %rsi     # 0x8aebf
movb $0x0, %al
callq 0x1fe10
movq %rax, -0x28(%rbp)
jmp 0x13115
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: showLatencyDistSamples
void showLatencyDistSamples(struct distsamples *samples, long long tot) {
    int j;

     /* We convert samples into a index inside the palette
     * proportional to the percentage a given bucket represents.
     * This way intensity of the different parts of the spectrum
     * don't change relative to the number of requests, which avoids to
     * pollute the visualization with non-latency related info. */
    printf("\033[38;5;0m"); /* Set foreground color to black. */
    for (j = 0; ; j++) {
        int coloridx =
            ceil((float) samples[j].count / tot * (spectrum_palette_size-1));
        int color = spectrum_palette[coloridx];
        printf("\033[48;5;%dm%c", (int)color, samples[j].character);
        samples[j].count = 0;
        if (samples[j].max == 0) break; /* Last sample. */
    }
    printf("\033[0m\n");
    fflush(stdout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x77b7a(%rip), %rdi     # 0x8acc1
movb $0x0, %al
callq 0x101d0
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cvtsi2ssq 0x8(%rax), %xmm0
cvtsi2ssq -0x10(%rbp), %xmm1
divss %xmm1, %xmm0
movl 0x8e302(%rip), %eax     # 0xa147c
subl $0x1, %eax
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x10670
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
movq 0x8e2e4(%rip), %rax     # 0xa1480
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %edx
leaq 0x77b09(%rip), %rdi     # 0x8accb
movb $0x0, %al
callq 0x101d0
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x131f7
jmp 0x13207
jmp 0x131f9
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x13155
leaq 0x77aca(%rip), %rdi     # 0x8acd8
movb $0x0, %al
callq 0x101d0
movq 0x8bda4(%rip), %rax     # 0x9efc0
movq (%rax), %rdi
callq 0x10430
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: showLatencyDistLegend
void showLatencyDistLegend(void) {
    int j;

    printf("---------------------------------------------\n");
    printf(". - * #          .01 .125 .25 .5 milliseconds\n");
    printf("1,2,3,...,9      from 1 to 9     milliseconds\n");
    printf("A,B,C,D,E        10,20,30,40,50  milliseconds\n");
    printf("F,G,H,I,J        .1,.2,.3,.4,.5       seconds\n");
    printf("K,L,M,N,O,P,Q,?  1,2,4,8,16,30,60,>60 seconds\n");
    printf("From 0 to 100%%: ");
    for (j = 0; j < spectrum_palette_size; j++) {
        printf("\033[48;5;%dm ", spectrum_palette[j]);
    }
    printf("\033[0m\n");
    printf("---------------------------------------------\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x77a9f(%rip), %rdi     # 0x8acde
movb $0x0, %al
callq 0x101d0
leaq 0x77ac0(%rip), %rdi     # 0x8ad0d
movb $0x0, %al
callq 0x101d0
leaq 0x77ae1(%rip), %rdi     # 0x8ad3c
movb $0x0, %al
callq 0x101d0
leaq 0x77b02(%rip), %rdi     # 0x8ad6b
movb $0x0, %al
callq 0x101d0
leaq 0x77b23(%rip), %rdi     # 0x8ad9a
movb $0x0, %al
callq 0x101d0
leaq 0x77b44(%rip), %rdi     # 0x8adc9
movb $0x0, %al
callq 0x101d0
leaq 0x77b65(%rip), %rdi     # 0x8adf8
movb $0x0, %al
callq 0x101d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x8e1d2(%rip), %eax     # 0xa147c
jge 0x132d3
movq 0x8e1cd(%rip), %rax     # 0xa1480
movslq -0x4(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x77b49(%rip), %rdi     # 0x8ae0a
movb $0x0, %al
callq 0x101d0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x132a1
leaq 0x779fe(%rip), %rdi     # 0x8acd8
movb $0x0, %al
callq 0x101d0
leaq 0x779f6(%rip), %rdi     # 0x8acde
movb $0x0, %al
callq 0x101d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: sendSync
unsigned long long sendSync(int fd) {
    /* To start we need to send the SYNC command and return the payload.
     * The hiredis client lib does not understand this part of the protocol
     * and we don't want to mess with its buffers, so everything is performed
     * using direct low-level I/O. */
    char buf[4096], *p;
    ssize_t nread;

    /* Send the SYNC command. */
    if (write(fd,"SYNC\r\n",6) != 6) {
        fprintf(stderr,"Error writing to master\n");
        exit(1);
    }

    /* Read $<payload>\r\n, making sure to read just up to "\n" */
    p = buf;
    while(1) {
        nread = read(fd,p,1);
        if (nread <= 0) {
            fprintf(stderr,"Error reading bulk length while SYNCing\n");
            exit(1);
        }
        if (*p == '\n' && p != buf) break;
        if (*p != '\n') p++;
    }
    *p = '\0';
    if (buf[0] == '-') {
        printf("SYNC with master failed: %s\n", buf);
        exit(1);
    }
    return strtoull(buf+1,NULL,10);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1020, %rsp           # imm = 0x1020
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
leaq 0x77afe(%rip), %rsi     # 0x8ae16
movl $0x6, %edx
callq 0x10150
cmpq $0x6, %rax
je 0x1334a
movq 0x8bcc1(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
leaq 0x77ae4(%rip), %rsi     # 0x8ae1d
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
leaq -0x1010(%rbp), %rax
movq %rax, -0x1018(%rbp)
movl -0x4(%rbp), %edi
movq -0x1018(%rbp), %rsi
movl $0x1, %edx
callq 0x102b0
movq %rax, -0x1020(%rbp)
cmpq $0x0, -0x1020(%rbp)
jg 0x1339f
movq 0x8bc6c(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
leaq 0x77aa8(%rip), %rsi     # 0x8ae36
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
movq -0x1018(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x133c3
movq -0x1018(%rbp), %rax
leaq -0x1010(%rbp), %rcx
cmpq %rcx, %rax
je 0x133c3
jmp 0x133e9
movq -0x1018(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0x133e4
movq -0x1018(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1018(%rbp)
jmp 0x13358
movq -0x1018(%rbp), %rax
movb $0x0, (%rax)
movsbl -0x1010(%rbp), %eax
cmpl $0x2d, %eax
jne 0x1341e
leaq -0x1010(%rbp), %rsi
leaq 0x77a52(%rip), %rdi     # 0x8ae5f
movb $0x0, %al
callq 0x101d0
movl $0x1, %edi
callq 0x10600
leaq -0x1010(%rbp), %rdi
addq $0x1, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x10310
addq $0x1020, %rsp           # imm = 0x1020
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: bytesToHuman
void bytesToHuman(char *s, long long n) {
    double d;

    if (n < 0) {
        *s = '-';
        s++;
        n = -n;
    }
    if (n < 1024) {
        /* Bytes */
        sprintf(s,"%lldB",n);
        return;
    } else if (n < (1024*1024)) {
        d = (double)n/(1024);
        sprintf(s,"%.2fK",d);
    } else if (n < (1024LL*1024*1024)) {
        d = (double)n/(1024*1024);
        sprintf(s,"%.2fM",d);
    } else if (n < (1024LL*1024*1024*1024)) {
        d = (double)n/(1024LL*1024*1024);
        sprintf(s,"%.2fG",d);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jge 0x13474
movq -0x8(%rbp), %rax
movb $0x2d, (%rax)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
xorl %eax, %eax
subq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x400, -0x10(%rbp)     # imm = 0x400
jge 0x13499
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x779ef(%rip), %rsi     # 0x8ae7c
movb $0x0, %al
callq 0x105f0
jmp 0x13551
cmpq $0x100000, -0x10(%rbp)  # imm = 0x100000
jge 0x134d3
cvtsi2sdq -0x10(%rbp), %xmm0
movsd 0x73cff(%rip), %xmm1    # 0x871b0
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
leaq 0x779b8(%rip), %rsi     # 0x8ae82
movb $0x1, %al
callq 0x105f0
jmp 0x1354f
cmpq $0x40000000, -0x10(%rbp) # imm = 0x40000000
jge 0x1350d
cvtsi2sdq -0x10(%rbp), %xmm0
movsd 0x73cbd(%rip), %xmm1    # 0x871a8
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
leaq 0x77984(%rip), %rsi     # 0x8ae88
movb $0x1, %al
callq 0x105f0
jmp 0x1354d
movabsq $0x10000000000, %rax    # imm = 0x10000000000
cmpq %rax, -0x10(%rbp)
jge 0x1354b
cvtsi2sdq -0x10(%rbp), %xmm0
movsd 0x73c75(%rip), %xmm1    # 0x871a0
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
leaq 0x7794a(%rip), %rsi     # 0x8ae8e
movb $0x1, %al
callq 0x105f0
jmp 0x1354d
jmp 0x1354f
jmp 0x13551
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: powerLawRand
long long powerLawRand(long long min, long long max, double alpha) {
    double pl, r;

    max += 1;
    r = ((double)rand()) / RAND_MAX;
    pl = pow(
        ((pow(max,alpha+1) - pow(min,alpha+1))*r + pow(min,alpha+1)),
        (1.0/(alpha+1)));
    return (max-1-(long long)pl)+min;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
callq 0x106c0
cvtsi2sd %eax, %xmm0
movsd 0x73c2e(%rip), %xmm1    # 0x871c0
divsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
cvtsi2sdq -0x10(%rbp), %xmm0
movsd 0x73c0f(%rip), %xmm1    # 0x871b8
addsd -0x18(%rbp), %xmm1
callq 0x10170
movsd %xmm0, -0x40(%rbp)
cvtsi2sdq -0x8(%rbp), %xmm0
movsd 0x73bf2(%rip), %xmm1    # 0x871b8
addsd -0x18(%rbp), %xmm1
callq 0x10170
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
cvtsi2sdq -0x8(%rbp), %xmm0
movsd 0x73bbf(%rip), %xmm1    # 0x871b8
addsd -0x18(%rbp), %xmm1
callq 0x10170
movsd -0x38(%rbp), %xmm2
movaps %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x73b98(%rip), %xmm2    # 0x871b8
addsd -0x18(%rbp), %xmm2
movsd 0x73b8b(%rip), %xmm1    # 0x871b8
divsd %xmm2, %xmm1
callq 0x10170
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
subq $0x1, %rax
cvttsd2si -0x20(%rbp), %rcx
subq %rcx, %rax
addq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: compute_something_fast
unsigned long compute_something_fast(void) {
    unsigned char s[256], i, j, t;
    int count = 1000, k;
    unsigned long output = 0;

    for (k = 0; k < 256; k++) s[k] = k;

    i = 0;
    j = 0;
    while(count--) {
        i++;
        j = j + s[i];
        t = s[i];
        s[i] = s[j];
        s[j] = t;
        output += s[(s[i]+s[j])&255];
    }
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl $0x3e8, -0x108(%rbp)    # imm = 0x3E8
movq $0x0, -0x118(%rbp)
movl $0x0, -0x10c(%rbp)
cmpl $0x100, -0x10c(%rbp)    # imm = 0x100
jge 0x1371d
movl -0x10c(%rbp), %eax
movb %al, %cl
movslq -0x10c(%rbp), %rax
movb %cl, -0x100(%rbp,%rax)
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0x136ea
movb $0x0, -0x101(%rbp)
movb $0x0, -0x102(%rbp)
movl -0x108(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x108(%rbp)
cmpl $0x0, %eax
je 0x137f7
movb -0x101(%rbp), %al
addb $0x1, %al
movb %al, -0x101(%rbp)
movzbl -0x102(%rbp), %eax
movzbl -0x101(%rbp), %ecx
movzbl -0x100(%rbp,%rcx), %ecx
addl %ecx, %eax
movb %al, -0x102(%rbp)
movzbl -0x101(%rbp), %eax
movb -0x100(%rbp,%rax), %al
movb %al, -0x103(%rbp)
movzbl -0x102(%rbp), %eax
movb -0x100(%rbp,%rax), %cl
movzbl -0x101(%rbp), %eax
movb %cl, -0x100(%rbp,%rax)
movb -0x103(%rbp), %cl
movzbl -0x102(%rbp), %eax
movb %cl, -0x100(%rbp,%rax)
movzbl -0x101(%rbp), %eax
movzbl -0x100(%rbp,%rax), %eax
movzbl -0x102(%rbp), %ecx
movzbl -0x100(%rbp,%rcx), %ecx
addl %ecx, %eax
andl $0xff, %eax
cltq
movzbl -0x100(%rbp,%rax), %eax
addq -0x118(%rbp), %rax
movq %rax, -0x118(%rbp)
jmp 0x1372b
movq -0x118(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: slaveMode
static void slaveMode(void) {
    int fd = context->fd;
    unsigned long long payload = sendSync(fd);
    char buf[1024];
    int original_output = config.output;

    fprintf(stderr,"SYNC with master, discarding %llu "
                   "bytes of bulk transfer...\n", payload);

    /* Discard the payload. */
    while(payload) {
        ssize_t nread;

        nread = read(fd,buf,(payload > sizeof(buf)) ? sizeof(buf) : payload);
        if (nread <= 0) {
            fprintf(stderr,"Error reading RDB payload while SYNCing\n");
            exit(1);
        }
        payload -= nread;
    }
    fprintf(stderr,"SYNC done. Logging commands from master.\n");

    /* Now we can use hiredis to read the incoming protocol. */
    config.output = OUTPUT_CSV;
    while (cliReadReply(0) == REDIS_OK);
    config.output = original_output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq 0x8cb56(%rip), %rax     # 0xa15d8
movl 0x84(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x13300
movq %rax, -0x10(%rbp)
movl 0x8ca8b(%rip), %eax     # 0xa1528
movl %eax, -0x414(%rbp)
movq 0x8a546(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x7737c(%rip), %rsi     # 0x8be34
movb $0x0, %al
callq 0x10360
cmpq $0x0, -0x10(%rbp)
je 0x14b67
movl -0x4(%rbp), %eax
movl %eax, -0x42c(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x428(%rbp)
cmpq $0x400, -0x10(%rbp)     # imm = 0x400
jbe 0x14af9
movl $0x400, %eax            # imm = 0x400
movq %rax, -0x438(%rbp)
jmp 0x14b04
movq -0x10(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x428(%rbp), %rsi
movl -0x42c(%rbp), %edi
movq -0x438(%rbp), %rdx
callq 0x102b0
movq %rax, -0x420(%rbp)
cmpq $0x0, -0x420(%rbp)
jg 0x14b50
movq 0x8a4bb(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
leaq 0x77332(%rip), %rsi     # 0x8be71
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
movq -0x420(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x14abf
movq 0x8a482(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
leaq 0x77322(%rip), %rsi     # 0x8be9a
movb $0x0, %al
callq 0x10360
movl $0x2, 0x8c99f(%rip)     # 0xa1528
xorl %edi, %edi
callq 0x17150
cmpl $0x0, %eax
jne 0x14b97
jmp 0x14b89
movl -0x414(%rbp), %eax
movl %eax, 0x8c985(%rip)     # 0xa1528
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: scanMode
static void scanMode(void) {
    redisReply *reply;
    unsigned long long cur = 0;

    do {
        if (config.pattern)
            reply = redisCommand(context,"SCAN %llu MATCH %s",
                cur,config.pattern);
        else
            reply = redisCommand(context,"SCAN %llu",cur);
        if (reply == NULL) {
            printf("I/O error\n");
            exit(1);
        } else if (reply->type == REDIS_REPLY_ERROR) {
            printf("ERROR: %s\n", reply->str);
            exit(1);
        } else {
            unsigned int j;

            cur = strtoull(reply->element[0]->str,NULL,10);
            for (j = 0; j < reply->element[1]->elements; j++)
                printf("%s\n", reply->element[1]->element[j]->str);
        }
        freeReplyObject(reply);
    } while(cur != 0);

    exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x0, -0x10(%rbp)
cmpq $0x0, 0x8b4d0(%rip)     # 0xa1508
je 0x16060
movq 0x8b597(%rip), %rdi     # 0xa15d8
movq -0x10(%rbp), %rdx
movq 0x8b4bc(%rip), %rcx     # 0xa1508
leaq 0x76723(%rip), %rsi     # 0x8c776
movb $0x0, %al
callq 0x1d7f0
movq %rax, -0x8(%rbp)
jmp 0x1607d
movq 0x8b571(%rip), %rdi     # 0xa15d8
movq -0x10(%rbp), %rdx
leaq 0x763a4(%rip), %rsi     # 0x8c416
movb $0x0, %al
callq 0x1d7f0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1609c
leaq 0x75cce(%rip), %rdi     # 0x8bd59
movb $0x0, %al
callq 0x101d0
movl $0x1, %edi
callq 0x10600
movq -0x8(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x160c5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
leaq 0x7654a(%rip), %rdi     # 0x8c5fe
movb $0x0, %al
callq 0x101d0
movl $0x1, %edi
callq 0x10600
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x10310
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x20(%rcx), %rax
jae 0x16136
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rsi
leaq 0x75e17(%rip), %rdi     # 0x8bf3b
movb $0x0, %al
callq 0x101d0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x160ed
jmp 0x16138
jmp 0x1613a
movq -0x8(%rbp), %rdi
callq 0x1b290
cmpq $0x0, -0x10(%rbp)
jne 0x16030
xorl %edi, %edi
callq 0x10600
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: intrinsicLatencyMode
static void intrinsicLatencyMode(void) {
    long long test_end, run_time, max_latency = 0, runs = 0;

    run_time = config.intrinsic_latency_duration*1000000;
    test_end = ustime() + run_time;
    signal(SIGINT, intrinsicLatencyModeStop);

    while(1) {
        long long start, end, latency;

        start = ustime();
        compute_something_fast();
        end = ustime();
        latency = end-start;
        runs++;
        if (latency <= 0) continue;

        /* Reporting */
        if (latency > max_latency) {
            max_latency = latency;
            printf("Max latency so far: %lld microseconds.\n", max_latency);
        }

        double avg_us = (double)run_time/runs;
        double avg_ns = avg_us * 1e3;
        if (force_cancel_loop || end > test_end) {
            printf("\n%lld total runs "
                "(avg latency: "
                "%.4f microseconds / %.2f nanoseconds per run).\n",
                runs, avg_us, avg_ns);
            printf("Worst run took %.0fx longer than the average latency.\n",
                max_latency / avg_us);
            exit(0);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
imull $0xf4240, 0x8b0d2(%rip), %eax # imm = 0xF4240
cltq
movq %rax, -0x10(%rbp)
callq 0x17110
addq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x2, %edi
leaq 0x1fdf(%rip), %rsi      # 0x18430
callq 0x10340
callq 0x17110
movq %rax, -0x28(%rbp)
callq 0x136c0
callq 0x17110
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x38(%rbp)
jg 0x1648e
jmp 0x16456
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jle 0x164b2
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x76348(%rip), %rdi     # 0x8c7f3
movb $0x0, %al
callq 0x101d0
cvtsi2sdq -0x10(%rbp), %xmm0
cvtsi2sdq -0x20(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd 0x70d11(%rip), %xmm0    # 0x871e0
mulsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movl 0x8b101(%rip), %eax     # 0xa15e0
cmpl $0x0, %eax
jne 0x164ee
movq -0x30(%rbp), %rax
cmpq -0x8(%rbp), %rax
jle 0x1652a
movq -0x20(%rbp), %rsi
movsd -0x40(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
leaq 0x76318(%rip), %rdi     # 0x8c81b
movb $0x2, %al
callq 0x101d0
cvtsi2sdq -0x18(%rbp), %xmm0
divsd -0x40(%rbp), %xmm0
leaq 0x7634e(%rip), %rdi     # 0x8c86a
movb $0x1, %al
callq 0x101d0
xorl %edi, %edi
callq 0x10600
jmp 0x16456
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: noninteractive
static int noninteractive(int argc, char **argv) {
    int retval = 0;
    if (config.stdinarg) {
        argv = zrealloc(argv, (argc+1)*sizeof(char*));
        argv[argc] = readArgFromStdin();
        retval = issueCommand(argc+1, argv);
    } else {
        retval = issueCommand(argc, argv);
    }
    return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x0, 0x8a8cf(%rip)     # 0xa151c
je 0x16c91
movq -0x10(%rbp), %rdi
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x198d0
movq %rax, -0x10(%rbp)
callq 0x196a0
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x4(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %edi
addl $0x1, %edi
movq -0x10(%rbp), %rsi
callq 0x19670
movl %eax, -0x14(%rbp)
jmp 0x16ca0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x19670
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: convertToSds
static char **convertToSds(int count, char** args) {
  int j;
  char **sds = zmalloc(sizeof(char*)*count);

  for(j = 0; j < count; j++)
    sds[j] = sdsnew(args[j]);

  return sds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movslq -0x4(%rbp), %rdi
shlq $0x3, %rdi
callq 0x19760
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x16d0a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1ed70
movq %rax, %rdx
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x16cd7
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliVersion
static sds cliVersion(void) {
    sds version;
    version = sdscatprintf(sdsempty(), "%s", REDIS_VERSION);

    /* Add git commit and working tree status when available */
    if (strtoll(redisGitSHA1(),NULL,16)) {
        version = sdscatprintf(version, " (git:%s", redisGitSHA1());
        if (strtoll(redisGitDirty(),NULL,10))
            version = sdscatprintf(version, "-dirty");
        version = sdscat(version, ")");
    }
    return version;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x1ed50
movq %rax, %rdi
leaq 0x702ab(%rip), %rsi     # 0x87032
leaq 0x74f6f(%rip), %rdx     # 0x8bcfd
movb $0x0, %al
callq 0x1fe10
movq %rax, -0x8(%rbp)
callq 0x19fd0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x10350
cmpq $0x0, %rax
je 0x16e21
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x19fd0
movq -0x10(%rbp), %rdi
movq %rax, %rdx
leaq 0x74f34(%rip), %rsi     # 0x8bd04
movb $0x0, %al
callq 0x1fe10
movq %rax, -0x8(%rbp)
callq 0x19fe0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x10350
cmpq $0x0, %rax
je 0x16e0d
movq -0x8(%rbp), %rdi
leaq 0x74f0b(%rip), %rsi     # 0x8bd0d
movb $0x0, %al
callq 0x1fe10
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x770e7(%rip), %rsi     # 0x8deff
callq 0x1f930
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)