LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeDeleteTimeEvent
int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id)
{
    aeTimeEvent *te = eventLoop->timeEventHead;
    while(te) {
        if (te->id == id) {
            te->id = AE_DELETED_EVENT_ID;
            return AE_OK;
        }
        te = te->next;
    }
    return AE_ERR; /* NO event with the specified ID found */
}

// Assembly:
addq $0x28, %rdi
pushq $-0x1
popq %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x16cd9
cmpq %rsi, (%rdi)
je 0x16cd3
addq $0x30, %rdi
jmp 0x16cc0
orq $-0x1, (%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeWait
int aeWait(int fd, int mask, long long milliseconds) {
    struct pollfd pfd;
    int retmask = 0, retval;

    memset(&pfd, 0, sizeof(pfd));
    pfd.fd = fd;
    if (mask & AE_READABLE) pfd.events |= POLLIN;
    if (mask & AE_WRITABLE) pfd.events |= POLLOUT;

    if ((retval = poll(&pfd, 1, milliseconds))== 1) {
        if (pfd.revents & POLLIN) retmask |= AE_READABLE;
        if (pfd.revents & POLLOUT) retmask |= AE_WRITABLE;
	if (pfd.revents & POLLERR) retmask |= AE_WRITABLE;
        if (pfd.revents & POLLHUP) retmask |= AE_WRITABLE;
        return retmask;
    } else {
        return retval;
    }
}

// Assembly:
pushq %rax
andq $0x0, (%rsp)
movl %edi, (%rsp)
movw $0x4, %ax
testb $0x1, %sil
je 0x1704b
movw $0x1, 0x4(%rsp)
movw $0x5, %ax
testb $0x2, %sil
je 0x17056
movw %ax, 0x4(%rsp)
movq %rsp, %rdi
pushq $0x1
popq %rsi
callq 0x104e0
cmpl $0x1, %eax
jne 0x17084
movzwl 0x6(%rsp), %ecx
movl %ecx, %eax
andl $0x1, %eax
movl %ecx, %edx
shrl %edx
andl $0x2, %edx
orl %eax, %edx
movl %edx, %eax
orl $0x2, %eax
testb $0x18, %cl
cmovel %edx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeMain
void aeMain(aeEventLoop *eventLoop) {
    eventLoop->stop = 0;
    while (!eventLoop->stop) {
        if (eventLoop->beforesleep != NULL)
            eventLoop->beforesleep(eventLoop);
        aeProcessEvents(eventLoop, AE_ALL_EVENTS);
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
andl $0x0, 0x30(%rdi)
xorl %eax, %eax
pushq $0x3
popq %rbp
testl %eax, %eax
jne 0x170b6
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x170a7
movq %rbx, %rdi
callq *%rax
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16cda
movl 0x30(%rbx), %eax
jmp 0x17095
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/crc64.c
// Function: crc64
uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l) {
    uint64_t j;

    for (j = 0; j < l; j++) {
        uint8_t byte = s[j];
        crc = crc64_tab[(uint8_t)crc ^ byte] ^ (crc >> 8);
    }
    return crc;
}

// Assembly:
movq %rdi, %rax
xorl %ecx, %ecx
leaq 0x29e78(%rip), %rdi     # 0x40f50
cmpq %rcx, %rdx
je 0x170f6
movzbl (%rsi,%rcx), %r8d
movzbl %al, %r9d
xorl %r8d, %r9d
shrq $0x8, %rax
xorq (%rdi,%r9,8), %rax
incq %rcx
jmp 0x170d8
retq
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/hiredis.c
// Function: redisReaderCreate
redisReader *redisReaderCreate(void) {
    redisReader *r;

    r = calloc(sizeof(redisReader),1);
    if (r == NULL)
        return NULL;

    r->err = 0;
    r->errstr[0] = '\0';
    r->fn = &defaultFunctions;
    r->buf = sdsempty();
    r->maxbuf = REDIS_READER_MAX_BUF;
    if (r->buf == NULL) {
        free(r);
        return NULL;
    }

    r->ridx = -1;
    return r;
}

// Assembly:
pushq %rbx
pushq $0x1
popq %rsi
movl $0x230, %edi            # imm = 0x230
callq 0x10370
testq %rax, %rax
je 0x171a3
movq %rax, %rbx
leaq 0x3f1b1(%rip), %rax     # 0x56320
movq %rax, 0x220(%rbx)
callq 0x18ec4
movq %rax, 0x88(%rbx)
movq $0x4000, 0xa0(%rbx) # imm = 0x4000
testq %rax, %rax
je 0x1719b
orl $-0x1, 0x210(%rbx)
jmp 0x171a5
movq %rbx, %rdi
callq 0x10060
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/hiredis.c
// Function: intlen
static int intlen(int i) {
    int len = 0;
    if (i < 0) {
        len++;
        i = -i;
    }
    do {
        len++;
        i /= 10;
    } while(i);
    return len;
}

// Assembly:
movl %edi, %ecx
negl %ecx
cmovsl %edi, %ecx
shrl $0x1f, %edi
pushq $0xa
popq %rsi
incl %edi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
cmpl $0x9, %ecx
movl %eax, %ecx
ja 0x17f93
movl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/hiredis.c
// Function: _redisSetError
void __redisSetError(redisContext *c, int type, const char *str) {
    size_t len;

    c->err = type;
    if (str != NULL) {
        len = strlen(str);
        len = len < (sizeof(c->errstr)-1) ? len : (sizeof(c->errstr)-1);
        memcpy(c->errstr,str,len);
        c->errstr[len] = '\0';
    } else {
        /* Only REDIS_ERR_IO may lack a description! */
        assert(type == REDIS_ERR_IO);
        strerror_r(errno,c->errstr,sizeof(c->errstr));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
testq %rdx, %rdx
je 0x181d3
movq %rdx, %r14
movq %rdx, %rdi
callq 0x101c0
cmpq $0x7f, %rax
pushq $0x7f
popq %r15
cmovbq %rax, %r15
leaq 0x4(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x10400
movb $0x0, 0x4(%rbx,%r15)
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x1, %esi
jne 0x181f5
callq 0x100a0
movl (%rax), %edi
addq $0x4, %rbx
movl $0x80, %edx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x10140
leaq 0x296e2(%rip), %rdi     # 0x418de
leaq 0x295e3(%rip), %rsi     # 0x417e6
leaq 0x296e9(%rip), %rcx     # 0x418f3
movl $0x3d8, %edx            # imm = 0x3D8
callq 0x10250
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/hiredis.c
// Function: redisFree
void redisFree(redisContext *c) {
    if (c->fd > 0)
        close(c->fd);
    if (c->obuf != NULL)
        sdsfree(c->obuf);
    if (c->reader != NULL)
        redisReaderFree(c->reader);
    free(c);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rdi), %edi
testl %edi, %edi
jle 0x18227
callq 0x102a0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x18238
callq 0x18f40
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x18249
callq 0x171aa
movq %rbx, %rdi
popq %rbx
jmp 0x10060
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/hiredis.c
// Function: redisFreeKeepFd
int redisFreeKeepFd(redisContext *c) {
	int fd = c->fd;
	c->fd = -1;
	redisFree(c);
	return fd;
}

// Assembly:
pushq %rbx
movl 0x84(%rdi), %ebx
orl $-0x1, 0x84(%rdi)
callq 0x18214
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/hiredis.c
// Function: redisContextInit
static redisContext *redisContextInit(void) {
    redisContext *c;

    c = calloc(1,sizeof(redisContext));
    if (c == NULL)
        return NULL;

    c->err = 0;
    c->errstr[0] = '\0';
    c->obuf = sdsempty();
    c->reader = redisReaderCreate();
    return c;
}

// Assembly:
pushq %rbx
pushq $0x1
popq %rdi
movl $0xa0, %esi
callq 0x10370
movq %rax, %rbx
testq %rax, %rax
je 0x182cb
callq 0x18ec4
movq %rax, 0x90(%rbx)
callq 0x17152
movq %rax, 0x98(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/hiredis.c
// Function: redisvAppendCommand
int redisvAppendCommand(redisContext *c, const char *format, va_list ap) {
    char *cmd;
    int len;

    len = redisvFormatCommand(&cmd,format,ap);
    if (len == -1) {
        __redisSetError(c,REDIS_ERR_OOM,"Out of memory");
        return REDIS_ERR;
    }

    if (__redisAppendCommand(c,cmd,len) != REDIS_OK) {
        free(cmd);
        return REDIS_ERR;
    }

    free(cmd);
    return REDIS_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x17914
cmpl $-0x1, %eax
je 0x18747
movq 0x8(%rsp), %rsi
movslq %eax, %rdx
movq %rbx, %rdi
callq 0x186c5
movl %eax, %ebx
movq 0x8(%rsp), %rdi
callq 0x10060
xorl %eax, %eax
negl %ebx
sbbl %eax, %eax
jmp 0x1875c
leaq 0x291fa(%rip), %rdx     # 0x41948
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x18192
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/hiredis.c
// Function: redisAppendCommandArgv
int redisAppendCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen) {
    char *cmd;
    int len;

    len = redisFormatCommandArgv(&cmd,argc,argv,argvlen);
    if (len == -1) {
        __redisSetError(c,REDIS_ERR_OOM,"Out of memory");
        return REDIS_ERR;
    }

    if (__redisAppendCommand(c,cmd,len) != REDIS_OK) {
        free(cmd);
        return REDIS_ERR;
    }

    free(cmd);
    return REDIS_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x18029
cmpl $-0x1, %eax
je 0x1881e
movq (%rsp), %r14
movslq %eax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x186c5
movl %eax, %ebx
movq %r14, %rdi
callq 0x10060
xorl %eax, %eax
negl %ebx
sbbl %eax, %eax
jmp 0x18833
leaq 0x29123(%rip), %rdx     # 0x41948
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x18192
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdsnewlen
sds sdsnewlen(const void *init, size_t initlen) {
    void *sh;
    sds s;
    char type = sdsReqType(initlen);
    /* Empty strings are usually created in order to append. Use type 8
     * since type 5 is not good at this. */
    if (type == SDS_TYPE_5 && initlen == 0) type = SDS_TYPE_8;
    int hdrlen = sdsHdrSize(type);
    unsigned char *fp; /* flags pointer. */

    sh = s_malloc(hdrlen+initlen+1);
    if (!init)
        memset(sh, 0, hdrlen+initlen+1);
    if (sh == NULL) return NULL;
    s = (char*)sh+hdrlen;
    fp = ((unsigned char*)s)-1;
    switch(type) {
        case SDS_TYPE_5: {
            *fp = type | (initlen << SDS_TYPE_BITS);
            break;
        }
        case SDS_TYPE_8: {
            SDS_HDR_VAR(8,s);
            sh->len = initlen;
            sh->alloc = initlen;
            *fp = type;
            break;
        }
        case SDS_TYPE_16: {
            SDS_HDR_VAR(16,s);
            sh->len = initlen;
            sh->alloc = initlen;
            *fp = type;
            break;
        }
        case SDS_TYPE_32: {
            SDS_HDR_VAR(32,s);
            sh->len = initlen;
            sh->alloc = initlen;
            *fp = type;
            break;
        }
        case SDS_TYPE_64: {
            SDS_HDR_VAR(64,s);
            sh->len = initlen;
            sh->alloc = initlen;
            *fp = type;
            break;
        }
    }
    if (initlen && init)
        memcpy(s, init, initlen);
    s[initlen] = '\0';
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x18e7d
testb %al, %al
movzbl %al, %eax
pushq $0x1
popq %rbp
cmovnel %eax, %ebp
testq %rbx, %rbx
cmovnel %eax, %ebp
movsbl %bpl, %edi
callq 0x18ea9
movl %eax, %r13d
leaq (%rbx,%r13), %r12
incq %r12
movq %r12, %rdi
callq 0x10450
movq %rax, %r15
testq %r14, %r14
jne 0x18dea
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x10270
testq %r15, %r15
je 0x18e0f
addq %r13, %r15
movzbl %bpl, %eax
leaq 0x28dcb(%rip), %rcx     # 0x41bc8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal (,%rbx,8), %eax
jmp 0x18e44
xorl %r15d, %r15d
jmp 0x18e6b
movq %rbx, -0x11(%r15)
movq %rbx, -0x9(%r15)
movb $0x4, %al
jmp 0x18e44
movw %bx, -0x5(%r15)
movw %bx, -0x3(%r15)
movb $0x2, %al
jmp 0x18e44
movl %ebx, -0x9(%r15)
movl %ebx, -0x5(%r15)
movb $0x3, %al
jmp 0x18e44
movb %bl, -0x3(%r15)
movb %bl, -0x2(%r15)
movb $0x1, %al
testq %r14, %r14
sete %cl
movb %al, -0x1(%r15)
testq %rbx, %rbx
sete %al
orb %cl, %al
jne 0x18e66
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x10400
movb $0x0, (%r15,%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdsReqType
static inline char sdsReqType(size_t string_size) {
    if (string_size < 32)
        return SDS_TYPE_5;
    if (string_size < 0xff)
        return SDS_TYPE_8;
    if (string_size < 0xffff)
        return SDS_TYPE_16;
    if (string_size < 0xffffffff)
        return SDS_TYPE_32;
    return SDS_TYPE_64;
}

// Assembly:
cmpq $0x20, %rdi
jae 0x18e86
xorl %eax, %eax
retq
movb $0x1, %al
cmpq $0xff, %rdi
jb 0x18e85
movb $0x2, %al
cmpq $0xffff, %rdi           # imm = 0xFFFF
jb 0x18e85
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rdi
movb $0x4, %al
sbbb $0x0, %al
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdsMakeRoomFor
sds sdsMakeRoomFor(sds s, size_t addlen) {
    void *sh, *newsh;
    size_t avail = sdsavail(s);
    size_t len, newlen;
    char type, oldtype = s[-1] & SDS_TYPE_MASK;
    int hdrlen;

    /* Return ASAP if there is enough space left. */
    if (avail >= addlen) return s;

    len = sdslen(s);
    sh = (char*)s-sdsHdrSize(oldtype);
    newlen = (len+addlen);
    if (newlen < SDS_MAX_PREALLOC)
        newlen *= 2;
    else
        newlen += SDS_MAX_PREALLOC;

    type = sdsReqType(newlen);

    /* Don't use type 5: the user is appending to the string and type 5 is
     * not able to remember empty space, so sdsMakeRoomFor() must be called
     * at every appending operation. */
    if (type == SDS_TYPE_5) type = SDS_TYPE_8;

    hdrlen = sdsHdrSize(type);
    if (oldtype==type) {
        newsh = s_realloc(sh, hdrlen+newlen+1);
        if (newsh == NULL) return NULL;
        s = (char*)newsh+hdrlen;
    } else {
        /* Since the header size changes, need to move the string forward,
         * and can't use realloc */
        newsh = s_malloc(hdrlen+newlen+1);
        if (newsh == NULL) return NULL;
        memcpy((char*)newsh+hdrlen, s, len+1);
        s_free(sh);
        s = (char*)newsh+hdrlen;
        s[-1] = type;
        sdssetlen(s, len);
    }
    sdssetalloc(s, newlen);
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r13
movq %rdi, %rbx
callq 0x190d7
cmpq %r13, %rax
jae 0x190c5
movzbl -0x1(%rbx), %ebp
movq %rbx, %rdi
callq 0x18f08
movq %rax, %r14
andl $0x7, %ebp
movl %ebp, %edi
callq 0x18ea9
movl %eax, %eax
movq %rbx, %r12
subq %rax, %r12
movq %r14, 0x10(%rsp)
addq %r14, %r13
leaq (,%r13,2), %rax
movl $0x100000, %ecx         # imm = 0x100000
leaq (%rcx,%r13), %r14
cmpq %rcx, %r13
cmovbq %rax, %r14
movq %r14, %rdi
callq 0x18e7d
movzbl %al, %eax
cmpb $0x2, %al
pushq $0x1
popq %r15
cmovael %eax, %r15d
movsbl %r15b, %r13d
movl %r13d, %edi
callq 0x18ea9
movl %eax, %eax
movq %rax, 0x8(%rsp)
leaq (%r14,%rax), %rsi
incq %rsi
cmpb %r13b, %bpl
jne 0x19069
movq %r12, %rdi
callq 0x104b0
testq %rax, %rax
je 0x190c3
movq %rax, %rbx
addq 0x8(%rsp), %rbx
jmp 0x190b6
movq %rsi, %rdi
callq 0x10450
testq %rax, %rax
je 0x190c3
movq %rax, %r13
movq %rax, %rbp
addq 0x8(%rsp), %rbp
movq 0x10(%rsp), %rdx
incq %rdx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x10400
movq %r12, %rdi
callq 0x10060
movq 0x8(%rsp), %rax
movb %r15b, -0x1(%r13,%rax)
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
callq 0x18f73
movq %rbp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1911e
jmp 0x190c5
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/./sds.h
// Function: sdsavail
static inline size_t sdsavail(const sds s) {
    unsigned char flags = s[-1];
    switch(flags&SDS_TYPE_MASK) {
        case SDS_TYPE_5: {
            return 0;
        }
        case SDS_TYPE_8: {
            SDS_HDR_VAR(8,s);
            return sh->alloc - sh->len;
        }
        case SDS_TYPE_16: {
            SDS_HDR_VAR(16,s);
            return sh->alloc - sh->len;
        }
        case SDS_TYPE_32: {
            SDS_HDR_VAR(32,s);
            return sh->alloc - sh->len;
        }
        case SDS_TYPE_64: {
            SDS_HDR_VAR(64,s);
            return sh->alloc - sh->len;
        }
    }
    return 0;
}

// Assembly:
movzbl -0x1(%rdi), %eax
andl $0x7, %eax
decl %eax
cmpl $0x3, %eax
ja 0x1911b
leaq 0x28b18(%rip), %rcx     # 0x41c04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0x2(%rdi), %eax
movzbl -0x3(%rdi), %ecx
jmp 0x19117
movl -0x5(%rdi), %eax
subl -0x9(%rdi), %eax
retq
movq -0x9(%rdi), %rax
subq -0x11(%rdi), %rax
retq
movzwl -0x3(%rdi), %eax
movzwl -0x5(%rdi), %ecx
subq %rcx, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdsRemoveFreeSpace
sds sdsRemoveFreeSpace(sds s) {
    void *sh, *newsh;
    char type, oldtype = s[-1] & SDS_TYPE_MASK;
    int hdrlen;
    size_t len = sdslen(s);
    sh = (char*)s-sdsHdrSize(oldtype);

    type = sdsReqType(len);
    hdrlen = sdsHdrSize(type);
    if (oldtype==type) {
        newsh = s_realloc(sh, hdrlen+len+1);
        if (newsh == NULL) return NULL;
        s = (char*)newsh+hdrlen;
    } else {
        newsh = s_malloc(hdrlen+len+1);
        if (newsh == NULL) return NULL;
        memcpy((char*)newsh+hdrlen, s, len+1);
        s_free(sh);
        s = (char*)newsh+hdrlen;
        s[-1] = type;
        sdssetlen(s, len);
    }
    sdssetalloc(s, len);
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movzbl -0x1(%rdi), %r15d
callq 0x18f08
movq %rax, %rbx
andl $0x7, %r15d
movl %r15d, %edi
callq 0x18ea9
movl %eax, %eax
movq %r14, %r12
subq %rax, %r12
movq %rbx, %rdi
callq 0x18e7d
movl %eax, %ebp
movsbl %al, %edi
callq 0x18ea9
movl %eax, %r13d
leaq (%rbx,%r13), %rsi
incq %rsi
cmpb %bpl, %r15b
jne 0x191b4
movq %r12, %rdi
callq 0x104b0
testq %rax, %rax
je 0x19200
movq %rax, %r15
addq %r13, %r15
jmp 0x191f3
movq %rsi, %rdi
callq 0x10450
testq %rax, %rax
je 0x19200
movq %rbx, %rdx
incq %rdx
movq %rax, %r15
addq %r13, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %r14
callq 0x10400
movq %r12, %rdi
callq 0x10060
movb %bpl, -0x1(%r14,%r13)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x18f73
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1911e
jmp 0x19203
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/./sds.h
// Function: sdsalloc
static inline size_t sdsalloc(const sds s) {
    unsigned char flags = s[-1];
    switch(flags&SDS_TYPE_MASK) {
        case SDS_TYPE_5:
            return SDS_TYPE_5_LEN(flags);
        case SDS_TYPE_8:
            return SDS_HDR(8,s)->alloc;
        case SDS_TYPE_16:
            return SDS_HDR(16,s)->alloc;
        case SDS_TYPE_32:
            return SDS_HDR(32,s)->alloc;
        case SDS_TYPE_64:
            return SDS_HDR(64,s)->alloc;
    }
    return 0;
}

// Assembly:
movzbl -0x1(%rdi), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x19272
leaq 0x289d2(%rip), %rdx     # 0x41c24
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
retq
movq -0x9(%rdi), %rax
retq
movzwl -0x3(%rdi), %eax
retq
movl -0x5(%rdi), %eax
retq
movzbl -0x2(%rdi), %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdsgrowzero
sds sdsgrowzero(sds s, size_t len) {
    size_t curlen = sdslen(s);

    if (len <= curlen) return s;
    s = sdsMakeRoomFor(s,len-curlen);
    if (s == NULL) return NULL;

    /* Make sure added region doesn't contain garbage */
    memset(s+curlen,0,(len-curlen+1)); /* also set trailing \0 byte */
    sdssetlen(s, len);
    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x18f08
movq %r14, %r15
subq %rax, %r15
jbe 0x194c1
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18fbb
testq %rax, %rax
je 0x194bf
movq %rax, %rbx
addq %rax, %r12
incq %r15
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x10270
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18f73
jmp 0x194c1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdscatlen
sds sdscatlen(sds s, const void *t, size_t len) {
    size_t curlen = sdslen(s);

    s = sdsMakeRoomFor(s,len);
    if (s == NULL) return NULL;
    memcpy(s+curlen, t, len);
    sdssetlen(s, curlen+len);
    s[curlen+len] = '\0';
    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
callq 0x18f08
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x18fbb
movq %rax, %r15
testq %rax, %rax
je 0x19520
movq %r15, %rdi
addq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x10400
addq %rbx, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x18f73
movb $0x0, (%r15,%r14)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdscpylen
sds sdscpylen(sds s, const char *t, size_t len) {
    if (sdsalloc(s) < len) {
        s = sdsMakeRoomFor(s,len-sdslen(s));
        if (s == NULL) return NULL;
    }
    memcpy(s, t, len);
    s[len] = '\0';
    sdssetlen(s, len);
    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1923d
cmpq %r14, %rax
jae 0x195b3
movq %rbx, %rdi
callq 0x18f08
movq %r14, %rsi
subq %rax, %rsi
movq %rbx, %rdi
callq 0x18fbb
movq %rax, %rbx
testq %rax, %rax
je 0x195da
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10400
movb $0x0, (%rbx,%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18f73
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %ebx, %ebx
jmp 0x195d1
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdscatvprintf
sds sdscatvprintf(sds s, const char *fmt, va_list ap) {
    va_list cpy;
    char staticbuf[1024], *buf = staticbuf, *t;
    size_t buflen = strlen(fmt)*2;

    /* We try to start using a static buffer for speed.
     * If not possible we revert to heap allocation. */
    if (buflen > sizeof(staticbuf)) {
        buf = s_malloc(buflen);
        if (buf == NULL) return NULL;
    } else {
        buflen = sizeof(staticbuf);
    }

    /* Try with buffers two times bigger every time we fail to
     * fit the string in the current buffer size. */
    while(1) {
        buf[buflen-2] = '\0';
        va_copy(cpy,ap);
        vsnprintf(buf, buflen, fmt, cpy);
        va_end(cpy);
        if (buf[buflen-2] != '\0') {
            if (buf != staticbuf) s_free(buf);
            buflen *= 2;
            buf = s_malloc(buflen);
            if (buf == NULL) return NULL;
            continue;
        }
        break;
    }

    /* Finally concat the obtained string to the SDS string and return it. */
    t = sdscat(s, buf);
    if (buf != staticbuf) s_free(buf);
    return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
movq %rsi, %rdi
callq 0x101c0
movq %rax, %rbx
addq %rax, %rbx
movl $0x400, %ebp            # imm = 0x400
leaq 0x30(%rsp), %r12
movq %r12, %r13
cmpq $0x401, %rbx            # imm = 0x401
jb 0x1971f
movq %rbx, %rdi
callq 0x10450
movq %rax, %r13
movq %rbx, %rbp
testq %rax, %rax
je 0x19775
leaq 0x10(%rsp), %rbx
movb $0x0, -0x2(%rbp,%r13)
movq 0x10(%r14), %rax
movq %rax, 0x20(%rsp)
movups (%r14), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x10110
cmpb $0x0, -0x2(%rbp,%r13)
je 0x19779
cmpq %r12, %r13
je 0x19762
movq %r13, %rdi
callq 0x10060
addq %rbp, %rbp
movq %rbp, %rdi
callq 0x10450
movq %rax, %r13
testq %rax, %rax
jne 0x19724
xorl %ebx, %ebx
jmp 0x1979b
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x1952f
movq %rax, %rbx
leaq 0x30(%rsp), %rax
cmpq %rax, %r13
je 0x1979b
movq %r13, %rdi
callq 0x10060
movq %rbx, %rax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdstrim
sds sdstrim(sds s, const char *cset) {
    char *start, *end, *sp, *ep;
    size_t len;

    sp = start = s;
    ep = end = s+sdslen(s)-1;
    while(sp <= end && strchr(cset, *sp)) sp++;
    while(ep > sp && strchr(cset, *ep)) ep--;
    len = (sp > ep) ? 0 : ((ep-sp)+1);
    if (s != sp) memmove(s, sp, len);
    s[len] = '\0';
    sdssetlen(s,len);
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x18f08
movq %rax, %r14
leaq (%rbx,%rax), %rbp
decq %rbp
xorl %r13d, %r13d
leaq (%rbx,%r13), %r12
cmpq %rbp, %r12
ja 0x19ba7
movsbl (%r12), %esi
movq %r15, %rdi
callq 0x101e0
testq %rax, %rax
je 0x19ba7
incq %r13
jmp 0x19b87
subq %r13, %r14
cmpq %r12, %rbp
jbe 0x19bc8
movsbl (%rbp), %esi
movq %r15, %rdi
callq 0x101e0
testq %rax, %rax
je 0x19bc8
decq %rbp
decq %r14
jmp 0x19baa
xorl %eax, %eax
cmpq %rbp, %r12
cmovaq %rax, %r14
testq %r13, %r13
je 0x19be4
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x10540
movb $0x0, (%rbx,%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18f73
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdsrange
void sdsrange(sds s, int start, int end) {
    size_t newlen, len = sdslen(s);

    if (len == 0) return;
    if (start < 0) {
        start = len+start;
        if (start < 0) start = 0;
    }
    if (end < 0) {
        end = len+end;
        if (end < 0) end = 0;
    }
    newlen = (start > end) ? 0 : (end-start)+1;
    if (newlen != 0) {
        if (start >= (signed)len) {
            newlen = 0;
        } else if (end >= (signed)len) {
            end = len-1;
            newlen = (start > end) ? 0 : (end-start)+1;
        }
    } else {
        start = 0;
    }
    if (start && newlen) memmove(s, s+start, newlen);
    s[newlen] = 0;
    sdssetlen(s,newlen);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
callq 0x18f08
testq %rax, %rax
je 0x19ca8
leal (%rax,%r12), %ecx
xorl %r14d, %r14d
testl %ecx, %ecx
cmovlel %r14d, %ecx
testl %r12d, %r12d
cmovnsl %r12d, %ecx
leal (%rax,%r15), %edx
testl %edx, %edx
cmovlel %r14d, %edx
testl %r15d, %r15d
cmovnsl %r15d, %edx
movl %edx, %esi
subl %ecx, %esi
leal 0x1(%rsi), %edi
cmovbl %r14d, %edi
movl %eax, %esi
subl %ecx, %esi
jle 0x19c8d
testl %edi, %edi
je 0x19c8d
leal -0x1(%rax), %r8d
xorl %r9d, %r9d
cmpl %r8d, %ecx
cmoval %r9d, %esi
cmpl %eax, %edx
cmovbl %edi, %esi
movslq %esi, %r14
testl %ecx, %ecx
je 0x19c8d
testl %esi, %esi
je 0x19c8d
movl %ecx, %esi
addq %rbx, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x10540
movb $0x0, (%rbx,%r14)
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18f73
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdsfreesplitres
void sdsfreesplitres(sds *tokens, int count) {
    if (!tokens) return;
    while(count--)
        sdsfree(tokens[count]);
    s_free(tokens);
}

// Assembly:
testq %rdi, %rdi
je 0x19f68
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
decq %r14
cmpq $-0x1, %r14
je 0x19f59
movq (%rbx,%r14,8), %rdi
callq 0x18f40
jmp 0x19f45
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10060
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/sds.c
// Function: sdsjoin
sds sdsjoin(char **argv, int argc, char *sep) {
    sds join = sdsempty();
    int j;

    for (j = 0; j < argc; j++) {
        join = sdscat(join, argv[j]);
        if (j != argc-1) join = sdscat(join,sep);
    }
    return join;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
callq 0x18ec4
leal -0x1(%r14), %r12d
xorl %r13d, %r13d
testl %r14d, %r14d
cmovlel %r13d, %r14d
cmpq %r13, %r14
je 0x1a4af
movq (%r15,%r13,8), %rsi
movq %rax, %rdi
callq 0x1952f
cmpq %r13, %r12
je 0x1a4aa
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1952f
incq %r13
jmp 0x1a489
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/net.c
// Function: redisKeepAlive
int redisKeepAlive(redisContext *c, int interval) {
    int val = 1;
    int fd = c->fd;

    if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)) == -1){
        __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
        return REDIS_ERR;
    }

    val = interval;

#ifdef _OSX
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &val, sizeof(val)) < 0) {
        __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
        return REDIS_ERR;
    }
#else
#ifndef __sun
    val = interval;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
        __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
        return REDIS_ERR;
    }

    val = interval/3;
    if (val == 0) val = 1;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) {
        __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
        return REDIS_ERR;
    }

    val = 3;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) < 0) {
        __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));
        return REDIS_ERR;
    }
#endif
#endif

    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
movl 0x84(%rdi), %ebp
pushq $0x1
popq %r15
pushq $0x9
popq %rdx
pushq $0x4
popq %r8
movl %ebp, %edi
movl %r15d, %esi
callq 0x10120
cmpl $-0x1, %eax
je 0x1a5d4
leaq 0x4(%rsp), %rcx
movl %r14d, (%rcx)
pushq $0x6
popq %rsi
pushq $0x4
popq %rdx
movl %ebp, %edi
movl %edx, %r8d
callq 0x10120
testl %eax, %eax
js 0x1a5d4
pushq $0x3
popq %rcx
movl %r14d, %eax
cltd
idivl %ecx
addl $0x2, %r14d
cmpl $0x5, %r14d
cmovbl %r15d, %eax
leaq 0x4(%rsp), %rcx
movl %eax, (%rcx)
pushq $0x6
popq %rsi
pushq $0x5
popq %rdx
pushq $0x4
popq %r8
movl %ebp, %edi
callq 0x10120
testl %eax, %eax
js 0x1a5d4
leaq 0x4(%rsp), %rcx
movl $0x3, (%rcx)
pushq $0x6
popq %rdx
pushq $0x4
popq %r8
movl %ebp, %edi
movl %edx, %esi
callq 0x10120
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x1a5f1
callq 0x100a0
movl (%rax), %edi
callq 0x10690
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18192
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/net.c
// Function: _redisSetErrorFromErrno
static void __redisSetErrorFromErrno(redisContext *c, int type, const char *prefix) {
    char buf[128] = { 0 };
    size_t len = 0;

    if (prefix != NULL)
        len = snprintf(buf,sizeof(buf),"%s: ",prefix);
    strerror_r(errno,buf+len,sizeof(buf)-len);
    __redisSetError(c,type,buf);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rsi, %rsi
je 0x1a6b6
movq %rsi, %rcx
leaq 0x27854(%rip), %rdx     # 0x41ef6
movq %rsp, %rdi
movl $0x80, %esi
xorl %eax, %eax
callq 0x10200
movslq %eax, %r14
jmp 0x1a6b9
xorl %r14d, %r14d
callq 0x100a0
movl (%rax), %edi
leaq (%rsp,%r14), %rsi
movl $0x80, %edx
subq %r14, %rdx
callq 0x10140
pushq $0x1
popq %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x18192
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/hiredis/net.c
// Function: redisContextConnectUnix
int redisContextConnectUnix(redisContext *c, const char *path, const struct timeval *timeout) {
    int blocking = (c->flags & REDIS_BLOCK);
    struct sockaddr_un sa;

    if (redisCreateSocket(c,AF_LOCAL) < 0)
        return REDIS_ERR;
    if (redisSetBlocking(c,0) != REDIS_OK)
        return REDIS_ERR;

    sa.sun_family = AF_LOCAL;
    strncpy(sa.sun_path,path,sizeof(sa.sun_path)-1);
    if (connect(c->fd, (struct sockaddr*)&sa, sizeof(sa)) == -1) {
        if (errno == EINPROGRESS && !blocking) {
            /* This is ok. */
        } else {
            if (redisContextWaitReady(c,timeout) != REDIS_OK)
                return REDIS_ERR;
        }
    }

    /* Reset socket to be blocking after connect(2). */
    if (blocking && redisSetBlocking(c,1) != REDIS_OK)
        return REDIS_ERR;

    c->flags |= REDIS_CONNECTED;
    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x88(%rdi), %r12d
pushq $0x1
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x10740
cmpl $-0x1, %eax
je 0x1aacd
movl %eax, 0x84(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1ab19
pushq $-0x1
popq %rbp
testl %eax, %eax
jne 0x1ab0a
leaq 0x4(%rsp), %rdi
movw $0x1, -0x2(%rdi)
pushq $0x6b
popq %rdx
movq %r15, %rsi
callq 0x100b0
movl 0x84(%rbx), %edi
leaq 0x2(%rsp), %rsi
pushq $0x6e
popq %rdx
callq 0x10640
cmpl $-0x1, %eax
je 0x1aadc
testb $0x1, %r12b
je 0x1ab01
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x1ab19
testl %eax, %eax
jne 0x1ab0a
jmp 0x1ab01
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1a65c
pushq $-0x1
popq %rbp
jmp 0x1ab0a
callq 0x100a0
movl (%rax), %eax
xorl $0x73, %eax
movl %r12d, %ecx
andl $0x1, %ecx
orl %eax, %ecx
je 0x1ab01
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ab8b
testl %eax, %eax
jne 0x1ab0a
jmp 0x1aab6
orb $0x2, 0x88(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: linenoiseAddCompletion
void linenoiseAddCompletion(linenoiseCompletions *lc, const char *str) {
    size_t len = strlen(str);
    char *copy, **cvec;

    copy = malloc(len+1);
    if (copy == NULL) return;
    memcpy(copy,str,len+1);
    cvec = realloc(lc->cvec,sizeof(char*)*(lc->len+1));
    if (cvec == NULL) {
        free(copy);
        return;
    }
    lc->cvec = cvec;
    lc->cvec[lc->len++] = copy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x101c0
movq %rax, %r12
incq %r12
movq %r12, %rdi
callq 0x10450
testq %rax, %rax
je 0x1ad1e
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x10400
movq (%rbx), %rax
movq 0x8(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x104b0
testq %rax, %rax
je 0x1ad2a
movq %rax, 0x8(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movq %r14, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10060
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: refreshShowHints
void refreshShowHints(struct abuf *ab, struct linenoiseState *l, int plen) {
    char seq[64];
    if (hintsCallback && plen+l->len < l->cols) {
        int color = -1, bold = 0;
        char *hint = hintsCallback(l->buf,&color,&bold);
        if (hint) {
            int hintlen = strlen(hint);
            int hintmaxlen = l->cols-(plen+l->len);
            if (hintlen > hintmaxlen) hintlen = hintmaxlen;
            if (bold == 1 && color == -1) color = 37;
            if (color != -1 || bold != 0)
                snprintf(seq,64,"\033[%d;%d;49m",bold,color);
            abAppend(ab,seq,strlen(seq));
            abAppend(ab,hint,hintlen);
            if (color != -1 || bold != 0)
                abAppend(ab,"\033[0m",4);
            /* Call the function to free the hint returned. */
            if (freeHintsCallback) freeHintsCallback(hint);
        }
    }
}

// Assembly:
movq 0x3b874(%rip), %rax     # 0x565b8
testq %rax, %rax
je 0x1ae53
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %r15d
movq %rsi, %r12
movslq %edx, %rcx
addq 0x38(%rsi), %rcx
cmpq 0x40(%rsi), %rcx
jae 0x1ae47
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
orl $-0x1, (%rsi)
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
movq 0x8(%r12), %rdi
callq *%rax
testq %rax, %rax
je 0x1ae47
movq %rax, %r14
movq %rax, %rdi
callq 0x101c0
movl 0x40(%r12), %ebp
addl 0x38(%r12), %r15d
subl %r15d, %ebp
cmpl %ebp, %eax
cmovll %eax, %ebp
movl 0xc(%rsp), %ecx
movl %ecx, %edx
xorl $0x1, %edx
movl 0x8(%rsp), %r8d
movl %r8d, %eax
notl %eax
orl %eax, %edx
jne 0x1add5
movl $0x25, 0x8(%rsp)
pushq $0x25
popq %r8
jmp 0x1add9
orl %ecx, %eax
je 0x1adef
leaq 0x27264(%rip), %rdx     # 0x42044
leaq 0x10(%rsp), %rdi
pushq $0x40
popq %rsi
xorl %eax, %eax
callq 0x10200
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x101c0
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x1ae54
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x1ae54
cmpl $-0x1, 0x8(%rsp)
jne 0x1ae24
cmpl $0x0, 0xc(%rsp)
je 0x1ae36
leaq 0x25d1c(%rip), %rsi     # 0x40b47
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x1ae54
movq 0x3b783(%rip), %rax     # 0x565c0
testq %rax, %rax
je 0x1ae47
movq %r14, %rdi
callq *%rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: abAppend
static void abAppend(struct abuf *ab, const char *s, int len) {
    char *new = realloc(ab->b,ab->len+len);

    if (new == NULL) return;
    memcpy(new+ab->len,s,len);
    ab->b = new;
    ab->len += len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
movslq 0x8(%rbx), %rsi
movslq %edx, %r14
addq %r14, %rsi
callq 0x104b0
testq %rax, %rax
je 0x1ae9c
movq %rax, %r12
movslq 0x8(%rbx), %r13
movq %rax, %rdi
addq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10400
movq %r12, (%rbx)
addl %r13d, %r14d
movl %r14d, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: linenoiseEditInsert
int linenoiseEditInsert(struct linenoiseState *l, char c) {
    if (l->len < l->buflen) {
        if (l->len == l->pos) {
            l->buf[l->pos] = c;
            l->pos++;
            l->len++;
            l->buf[l->len] = '\0';
            if ((!mlmode && l->plen+l->len < l->cols && !hintsCallback)) {
                /* Avoid a full update of the line in the
                 * trivial case. */
                if (write(l->ofd,&c,1) == -1) return -1;
            } else {
                refreshLine(l);
            }
        } else {
            memmove(l->buf+l->pos+1,l->buf+l->pos,l->len-l->pos);
            l->buf[l->pos] = c;
            l->len++;
            l->pos++;
            l->buf[l->len] = '\0';
            refreshLine(l);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movb %bpl, 0x7(%rsp)
movq 0x38(%rdi), %rax
cmpq 0x10(%rdi), %rax
jae 0x1af66
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x28(%rdi), %rdi
movq %rax, %rdx
subq %rdi, %rdx
jne 0x1af2a
movb %bpl, (%rcx,%rax)
incq 0x28(%rbx)
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
movb $0x0, 0x1(%rax,%rcx)
cmpl $0x0, 0x3b6b3(%rip)     # 0x565a8
jne 0x1af5e
movq 0x38(%rbx), %rax
addq 0x20(%rbx), %rax
cmpq 0x40(%rbx), %rax
jae 0x1af5e
cmpq $0x0, 0x3b6ab(%rip)     # 0x565b8
jne 0x1af5e
movl 0x4(%rbx), %edi
leaq 0x7(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x10170
cmpq $-0x1, %rax
jne 0x1af66
pushq $-0x1
popq %rax
jmp 0x1af68
leaq (%rcx,%rdi), %rsi
addq %rcx, %rdi
incq %rdi
callq 0x10540
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rcx
movb %bpl, (%rax,%rcx)
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
incq 0x28(%rbx)
movb $0x0, 0x1(%rax,%rcx)
movq %rbx, %rdi
callq 0x1af6f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: linenoiseEditHistoryNext
void linenoiseEditHistoryNext(struct linenoiseState *l, int dir) {
    if (history_len > 1) {
        /* Update the current history entry before to
         * overwrite it with the next one. */
        free(history[history_len - 1 - l->history_index]);
        history[history_len - 1 - l->history_index] = strdup(l->buf);
        /* Show the new entry */
        l->history_index += (dir == LINENOISE_HISTORY_PREV) ? 1 : -1;
        if (l->history_index < 0) {
            l->history_index = 0;
            return;
        } else if (l->history_index >= history_len) {
            l->history_index = history_len-1;
            return;
        }
        strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen);
        l->buf[l->buflen-1] = '\0';
        l->len = l->pos = strlen(l->buf);
        refreshLine(l);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x3b237(%rip), %r14d    # 0x565c8
cmpl $0x2, %r14d
jl 0x1b445
movl %esi, %ebp
movq %rdi, %rbx
movq 0x3b229(%rip), %r15     # 0x565d0
movl 0x50(%rdi), %eax
notl %eax
addl %r14d, %eax
cltq
movq (%r15,%rax,8), %rdi
callq 0x10060
movq 0x8(%rbx), %rdi
callq 0x10680
movl 0x50(%rbx), %ecx
movl %ecx, %edx
notl %edx
addl %r14d, %edx
movslq %edx, %rdx
movq %rax, (%r15,%rdx,8)
xorl %eax, %eax
cmpl $0x1, %ebp
sete %al
leal -0x1(,%rax,2), %eax
addl %ecx, %eax
movl %eax, 0x50(%rbx)
js 0x1b438
cmpl %r14d, %eax
jae 0x1b43e
notl %eax
addl %eax, %r14d
movslq %r14d, %rax
movq (%r15,%rax,8), %rsi
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
callq 0x100b0
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rdi
callq 0x101c0
movq %rax, 0x28(%rbx)
movq %rax, 0x38(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1af6f
andl $0x0, 0x50(%rbx)
jmp 0x1b445
decl %r14d
movl %r14d, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: linenoiseEditDelete
void linenoiseEditDelete(struct linenoiseState *l) {
    if (l->len > 0 && l->pos < l->len) {
        memmove(l->buf+l->pos,l->buf+l->pos+1,l->len-l->pos-1);
        l->len--;
        l->buf[l->len] = '\0';
        refreshLine(l);
    }
}

// Assembly:
pushq %rbx
movq 0x38(%rdi), %rdx
testq %rdx, %rdx
je 0x1b49d
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpq %rdx, %rax
jae 0x1b49d
movq 0x8(%rbx), %rdi
leaq (%rdi,%rax), %rsi
incq %rsi
addq %rax, %rdi
notq %rax
addq %rax, %rdx
callq 0x10540
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq -0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
movb $0x0, -0x1(%rax,%rcx)
movq %rbx, %rdi
popq %rbx
jmp 0x1af6f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: linenoiseEditBackspace
void linenoiseEditBackspace(struct linenoiseState *l) {
    if (l->pos > 0 && l->len > 0) {
        memmove(l->buf+l->pos-1,l->buf+l->pos,l->len-l->pos);
        l->pos--;
        l->len--;
        l->buf[l->len] = '\0';
        refreshLine(l);
    }
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x1b4ed
movq %rdi, %rbx
movq 0x38(%rdi), %rdx
testq %rdx, %rdx
je 0x1b4ed
movq 0x8(%rbx), %rsi
leaq (%rsi,%rax), %rdi
decq %rdi
addq %rax, %rsi
subq %rax, %rdx
callq 0x10540
decq 0x28(%rbx)
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq -0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
movb $0x0, -0x1(%rax,%rcx)
movq %rbx, %rdi
popq %rbx
jmp 0x1af6f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: linenoiseEditDeletePrevWord
void linenoiseEditDeletePrevWord(struct linenoiseState *l) {
    size_t old_pos = l->pos;
    size_t diff;

    while (l->pos > 0 && l->buf[l->pos-1] == ' ')
        l->pos--;
    while (l->pos > 0 && l->buf[l->pos-1] != ' ')
        l->pos--;
    diff = old_pos - l->pos;
    memmove(l->buf+l->pos,l->buf+old_pos,l->len-old_pos+1);
    l->len -= diff;
    refreshLine(l);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x28(%rdi), %rax
leaq -0x1(%rax), %rcx
xorl %r14d, %r14d
cmpq $-0x1, %rcx
je 0x1b52d
cmpb $0x20, (%rsi,%rcx)
jne 0x1b52d
movq %rcx, 0x28(%rbx)
incq %r14
decq %rcx
jmp 0x1b505
cmpb $0x20, (%rsi,%rcx)
je 0x1b532
movq %rcx, 0x28(%rbx)
incq %r14
decq %rcx
cmpq %r14, %rax
jne 0x1b51d
leaq (%rsi,%rcx), %rdi
incq %rdi
addq %rax, %rsi
movq 0x38(%rbx), %rdx
subq %rax, %rdx
incq %rdx
callq 0x10540
subq %r14, 0x38(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1af6f
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: linenoisePrintKeyCodes
void linenoisePrintKeyCodes(void) {
    char quit[4];

    printf("Linenoise key codes debugging mode.\n"
            "Press keys to see scan codes. Type 'quit' at any time to exit.\n");
    if (enableRawMode(STDIN_FILENO) == -1) return;
    memset(quit,' ',4);
    while(1) {
        char c;
        int nread;

        nread = read(STDIN_FILENO,&c,1);
        if (nread <= 0) continue;
        memmove(quit,quit+1,sizeof(quit)-1); /* shift string to left. */
        quit[sizeof(quit)-1] = c; /* Insert current char on the right. */
        if (memcmp(quit,"quit",sizeof(quit)) == 0) break;

        printf("'%c' %02x (%d) (type quit to exit)\n",
            isprint(c) ? c : '?', (int)c, (int)c);
        printf("\r"); /* Go left edge manually, we are in raw mode. */
        fflush(stdout);
    }
    disableRawMode(STDIN_FILENO);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x26b4b(%rip), %rdi     # 0x420bb
callq 0x100e0
callq 0x1b63d
cmpl $-0x1, %eax
je 0x1b62e
leaq 0x5(%rsp), %r13
movl $0x20202020, -0x1(%r13) # imm = 0x20202020
leaq 0x3(%rsp), %rbx
pushq $0x1
popq %r14
pushq $0xd
popq %rbp
movq 0x38a1d(%rip), %r15     # 0x53fc0
xorl %edi, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x102f0
testl %eax, %eax
jle 0x1b5a3
movzwl (%r13), %eax
movb 0x2(%r13), %cl
movb %cl, 0x6(%rsp)
movw %ax, 0x4(%rsp)
movsbl 0x3(%rsp), %r12d
movb %r12b, 0x7(%rsp)
cmpl $0x74697571, 0x4(%rsp)  # imm = 0x74697571
je 0x1b61b
callq 0x10710
movq (%rax), %rax
movslq %r12d, %rcx
movzwl (%rax,%rcx,2), %eax
btl $0xe, %eax
pushq $0x3f
popq %rsi
jae 0x1b5f6
movl %r12d, %esi
leaq 0x26a53(%rip), %rdi     # 0x42050
movl %r12d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x101f0
movl %ebp, %edi
callq 0x10070
movq (%r15), %rdi
callq 0x10470
jmp 0x1b5a3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b702
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq