LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/elasticqueue.c
// Function: elasticqueue_init
struct elasticqueue *
elasticqueue_init(size_t reclen)
{
	struct elasticqueue * EQ;

	/* Sanity check. */
	assert(reclen > 0);

	/* Allocate structure. */
	if ((EQ = malloc(sizeof(struct elasticqueue))) == NULL)
		goto err0;
	EQ->reclen = reclen;

	/* Create (empty) elastic array. */
	if ((EQ->EA = elasticarray_init(0, EQ->reclen)) == NULL)
		goto err1;

	/* The queue is empty so far. */
	EQ->offset = EQ->len = 0;

	/* Success! */
	return (EQ);

err1:
	free(EQ);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x8994
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x2220
testq %rax, %rax
je 0x8987
movq %rax, %rbx
movq %r14, 0x18(%rax)
xorl %edi, %edi
movq %r14, %rsi
callq 0x6edc
movq %rax, (%rbx)
testq %rax, %rax
je 0x897f
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
jmp 0x8989
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x15c2(%rip), %rdi      # 0x9f5d
leaq 0x1c68(%rip), %rsi      # 0xa60a
leaq 0x1c8a(%rip), %rcx      # 0xa633
pushq $0x1b
popq %rdx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../libcperciva/datastruct/elasticqueue.c
// Function: elasticqueue_delete
void
elasticqueue_delete(struct elasticqueue * EQ)
{
	size_t i;
	void * oldpos;
	void * newpos;

	/* Return immediately if the queue is empty. */
	if (EQ->len == 0)
		return;

	/* Adjust pointers to remove the record from the logical queue. */
	EQ->offset += 1;
	EQ->len -= 1;

	/* Should we move everything to the front of the array? */
	if (EQ->offset > EQ->len) {
		/* Move records. */
		for (i = 0; i < EQ->len; i++) {
			newpos = elasticarray_get(EQ->EA, i, EQ->reclen);
			oldpos = elasticarray_get(EQ->EA, i + EQ->offset,
			    EQ->reclen);
			memcpy(newpos, oldpos, EQ->reclen);
		}

		/* Remove the unused space at the end. */
		elasticarray_shrink(EQ->EA, EQ->offset, EQ->reclen);

		/* And remember that everything is now at the front. */
		EQ->offset = 0;
	}
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x8a59
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
incq %rcx
movq %rcx, 0x8(%rdi)
decq %rax
movq %rax, 0x10(%rdi)
cmpq %rax, %rcx
jbe 0x8a54
xorl %r14d, %r14d
movq (%rbx), %rdi
cmpq %rax, %r14
jae 0x8a42
movq 0x18(%rbx), %rdx
movq %r14, %rsi
callq 0x7164
movq %rax, %r15
movq 0x8(%rbx), %rsi
addq %r14, %rsi
movq (%rbx), %rdi
movq 0x18(%rbx), %rdx
callq 0x7164
movq 0x18(%rbx), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x2200
incq %r14
movq 0x10(%rbx), %rax
jmp 0x8a00
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdx
callq 0x70d1
andq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Xyene[P]macro8080/keyboard.c
// Function: handle_in
uint8_t handle_in(uint8_t dev) {
  switch (dev) {
    case 16:
      return has_keyboard_input() ? 0x03 : 0x02;
    case 17: {
      char ret = has_keyboard_input() ? read_keyboard_input() : '\0';
      return ret;
    }
    case 255:
      return 0;
    default:
      printf("Invalid device read %02X\n", dev);
      return 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0xff, %edi
je 0x6545
cmpl $0x11, %edi
je 0x6533
cmpl $0x10, %edi
jne 0x6549
callq 0x6566
testl %eax, %eax
sete %bl
xorb $0x3, %bl
jmp 0x655d
callq 0x6566
testl %eax, %eax
je 0x6545
callq 0x6618
movl %eax, %ebx
jmp 0x655d
xorl %ebx, %ebx
jmp 0x655d
movzbl %dil, %esi
leaq 0xac2(%rip), %rdi       # 0x7016
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3060
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Xyene[P]macro8080/terminal.c
// Function: handle_out
void handle_out(uint8_t dev, uint8_t A) {
  // printf("Printing %02X to dev=%02X\n", A, dev);
  if (dev == 0x11) {
    char c = A & 0x7F;
    if ((' ' <= c && c <= '~') || c == '\r' || c == '\n') {
      terminal_out(c);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x11, %edi
jne 0x66b0
movl %esi, %eax
andb $0x7f, %al
cmpb $0x20, %al
setae %cl
cmpb $0x7f, %al
setne %dl
testb %dl, %cl
je 0x6691
movzbl %al, %edi
popq %rbp
jmp 0x6654
cmpb $0xa, %sil
je 0x6688
movzbl %sil, %ecx
cmpl $0xd, %ecx
je 0x6688
cmpl $0x8d, %ecx
je 0x6688
cmpl $0x8a, %ecx
je 0x6688
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetSetBlock
int anetSetBlock(char *err, int fd, int non_block) {
    int flags;

    /* Set the socket blocking (if non_block is zero) or non-blocking.
     * Note that fcntl(2) for F_GETFL and F_SETFL can't be
     * interrupted by a signal. */
    if ((flags = fcntl(fd, F_GETFL)) == -1) {
        anetSetError(err, "fcntl(F_GETFL): %s", strerror(errno));
        return ANET_ERR;
    }

    if (non_block)
        flags |= O_NONBLOCK;
    else
        flags &= ~O_NONBLOCK;

    if (fcntl(fd, F_SETFL, flags) == -1) {
        anetSetError(err, "fcntl(F_SETFL,O_NONBLOCK): %s", strerror(errno));
        return ANET_ERR;
    }
    return ANET_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
xorl %ebp, %ebp
pushq $0x3
popq %rsi
movl %r14d, %edi
xorl %eax, %eax
callq 0x10530
cmpl $-0x1, %eax
je 0x1089d
xorl %edx, %edx
testl %r15d, %r15d
setne %dl
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
shll $0xb, %edx
orl %eax, %edx
pushq $0x4
popq %rsi
movl %r14d, %edi
xorl %eax, %eax
callq 0x10530
cmpl $-0x1, %eax
jne 0x108c3
leaq 0x2a77c(%rip), %r14     # 0x3b017
jmp 0x108a4
leaq 0x2a760(%rip), %r14     # 0x3b004
callq 0x100a0
movl (%rax), %edi
callq 0x10690
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetKeepAlive
int anetKeepAlive(char *err, int fd, int interval)
{
    int val = 1;

    if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)) == -1)
    {
        anetSetError(err, "setsockopt SO_KEEPALIVE: %s", strerror(errno));
        return ANET_ERR;
    }

#ifdef __linux__
    /* Default settings are more or less garbage, with the keepalive time
     * set to 7200 by default on Linux. Modify settings to make the feature
     * actually useful. */

    /* Send first probe after interval. */
    val = interval;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
        anetSetError(err, "setsockopt TCP_KEEPIDLE: %s\n", strerror(errno));
        return ANET_ERR;
    }

    /* Send next probes after the specified interval. Note that we set the
     * delay as interval / 3, as we send three probes before detecting
     * an error (see the next setsockopt call). */
    val = interval/3;
    if (val == 0) val = 1;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) {
        anetSetError(err, "setsockopt TCP_KEEPINTVL: %s\n", strerror(errno));
        return ANET_ERR;
    }

    /* Consider the socket in error state after three we send three ACK
     * probes without getting a reply. */
    val = 3;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) < 0) {
        anetSetError(err, "setsockopt TCP_KEEPCNT: %s\n", strerror(errno));
        return ANET_ERR;
    }
#else
    ((void) interval); /* Avoid unused var warning for non Linux systems. */
#endif

    return ANET_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
pushq $0x1
popq %r15
pushq $0x9
popq %rdx
pushq $0x4
popq %r8
movl %esi, %edi
movl %r15d, %esi
callq 0x10120
cmpl $-0x1, %eax
je 0x10a24
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 0x10a2d
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 0x10a36
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 0x10a5c
leaq 0x2a66a(%rip), %r14     # 0x3b08c
jmp 0x10a3d
leaq 0x2a60a(%rip), %r14     # 0x3b035
jmp 0x10a3d
leaq 0x2a61d(%rip), %r14     # 0x3b051
jmp 0x10a3d
leaq 0x2a631(%rip), %r14     # 0x3b06e
callq 0x100a0
movl (%rax), %edi
callq 0x10690
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
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/src/anet.c
// Function: anetSendTimeout
int anetSendTimeout(char *err, int fd, long long ms) {
    struct timeval tv;

    tv.tv_sec = ms/1000;
    tv.tv_usec = (ms%1000)*1000;
    if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) {
        anetSetError(err, "setsockopt SO_SNDTIMEO: %s", strerror(errno));
        return ANET_ERR;
    }
    return ANET_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rax
movl %esi, %r9d
movq %rdi, %rbx
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rsp, %rcx
movq %rax, (%rcx)
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
movq %rax, 0x8(%rcx)
pushq $0x1
popq %rsi
pushq $0x15
popq %rdx
pushq $0x10
popq %r8
movl %r9d, %edi
callq 0x10120
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x10bd7
callq 0x100a0
movl (%rax), %edi
callq 0x10690
leaq 0x2a4fa(%rip), %rsi     # 0x3b0c1
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetGenericResolve
int anetGenericResolve(char *err, char *host, char *ipbuf, size_t ipbuf_len,
                       int flags)
{
    struct addrinfo hints, *info;
    int rv;

    memset(&hints,0,sizeof(hints));
    if (flags & ANET_IP_ONLY) hints.ai_flags = AI_NUMERICHOST;
    hints.ai_family = AF_UNSPEC;
    hints.ai_socktype = SOCK_STREAM;  /* specify socktype to avoid dups */

    if ((rv = getaddrinfo(host, NULL, &hints, &info)) != 0) {
        anetSetError(err, "%s", gai_strerror(rv));
        return ANET_ERR;
    }
    if (info->ai_family == AF_INET) {
        struct sockaddr_in *sa = (struct sockaddr_in *)info->ai_addr;
        inet_ntop(AF_INET, &(sa->sin_addr), ipbuf, ipbuf_len);
    } else {
        struct sockaddr_in6 *sa = (struct sockaddr_in6 *)info->ai_addr;
        inet_ntop(AF_INET6, &(sa->sin6_addr), ipbuf, ipbuf_len);
    }

    freeaddrinfo(info);
    return ANET_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
testb $0x1, %r8b
je 0x10c11
movl $0x4, 0x10(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
leaq 0x10(%rsp), %rdx
movq %rax, 0x4(%rdx)
xorl %r15d, %r15d
leaq 0x8(%rsp), %rcx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x10670
testl %eax, %eax
je 0x10c5b
movl %eax, %edi
callq 0x10220
leaq 0x2a3ea(%rip), %rsi     # 0x3b032
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
pushq $-0x1
popq %r15
jmp 0x10c90
movq 0x8(%rsp), %rax
xorl %ecx, %ecx
cmpl $0x2, 0x4(%rax)
setne %cl
movq 0x18(%rax), %rax
leal 0x2(,%rcx,8), %edi
leaq (%rax,%rcx,4), %rsi
addq $0x4, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x10040
movq 0x8(%rsp), %rdi
callq 0x10730
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetUnixGenericConnect
int anetUnixGenericConnect(char *err, char *path, int flags)
{
    int s;
    struct sockaddr_un sa;

    if ((s = anetCreateSocket(err,AF_LOCAL)) == ANET_ERR)
        return ANET_ERR;

    sa.sun_family = AF_LOCAL;
    strncpy(sa.sun_path,path,sizeof(sa.sun_path)-1);
    if (flags & ANET_CONNECT_NONBLOCK) {
        if (anetNonBlock(err,s) != ANET_OK)
            return ANET_ERR;
    }
    if (connect(s,(struct sockaddr*)&sa,sizeof(sa)) == -1) {
        if (errno == EINPROGRESS &&
            flags & ANET_CONNECT_NONBLOCK)
            return s;

        anetSetError(err, "connect: %s", strerror(errno));
        close(s);
        return ANET_ERR;
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
callq 0x10fe6
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x10fd7
movl %eax, %ebp
leaq 0x4(%rsp), %rdi
movw $0x1, -0x2(%rdi)
pushq $0x6b
popq %rdx
movq %r12, %rsi
callq 0x100b0
testb $0x1, %r15b
je 0x10f8d
movq %r14, %rdi
movl %ebp, %esi
callq 0x10968
testl %eax, %eax
jne 0x10fd7
leaq 0x2(%rsp), %rsi
pushq $0x6e
popq %rdx
movl %ebp, %edi
callq 0x10640
cmpl $-0x1, %eax
jne 0x10fd5
callq 0x100a0
movl (%rax), %edi
cmpl $0x73, %edi
sete %al
testb %al, %r15b
jne 0x10fd5
callq 0x10690
leaq 0x2a11d(%rip), %rsi     # 0x3b0dc
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
movl %ebp, %edi
callq 0x102a0
jmp 0x10fd7
movl %ebp, %ebx
movl %ebx, %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/src/anet.c
// Function: anetCreateSocket
static int anetCreateSocket(char *err, int domain) {
    int s;
    if ((s = socket(domain, SOCK_STREAM, 0)) == -1) {
        anetSetError(err, "creating socket: %s", strerror(errno));
        return ANET_ERR;
    }

    /* Make sure connection-intensive things like the redis benchmark
     * will be able to close/open sockets a zillion of times */
    if (anetSetReuseAddr(err,s) == ANET_ERR) {
        close(s);
        return ANET_ERR;
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x10740
cmpl $-0x1, %eax
je 0x11017
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x116d9
cmpl $-0x1, %eax
jne 0x1103a
movl %ebp, %edi
callq 0x102a0
jmp 0x11037
callq 0x100a0
movl (%rax), %edi
callq 0x10690
leaq 0x2a0fc(%rip), %rsi     # 0x3b126
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetRead
int anetRead(int fd, char *buf, int count)
{
    ssize_t nread, totlen = 0;
    while(totlen != count) {
        nread = read(fd,buf,count-totlen);
        if (nread == 0) return totlen;
        if (nread == -1) return -1;
        totlen += nread;
        buf += nread;
    }
    return totlen;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
movslq %edx, %r12
xorl %r15d, %r15d
pushq $-0x1
popq %r13
movq %r12, %rdx
subq %r15, %rdx
je 0x1109b
movl %ebp, %edi
movq %r14, %rsi
callq 0x102f0
cmpq $-0x1, %rax
je 0x11098
testq %rax, %rax
je 0x11093
addq %rax, %r15
addq %rax, %r14
jmp 0x1106e
movl %r15d, %ebx
jmp 0x1109b
movl %r13d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetWrite
int anetWrite(int fd, char *buf, int count)
{
    ssize_t nwritten, totlen = 0;
    while(totlen != count) {
        nwritten = write(fd,buf,count-totlen);
        if (nwritten == 0) return totlen;
        if (nwritten == -1) return -1;
        totlen += nwritten;
        buf += nwritten;
    }
    return totlen;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
movslq %edx, %r12
xorl %r15d, %r15d
pushq $-0x1
popq %r13
movq %r12, %rdx
subq %r15, %rdx
je 0x110f5
movl %ebp, %edi
movq %r14, %rsi
callq 0x10170
cmpq $-0x1, %rax
je 0x110f2
testq %rax, %rax
je 0x110ed
addq %rax, %r15
addq %rax, %r14
jmp 0x110c8
movl %r15d, %ebx
jmp 0x110f5
movl %r13d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetTcpServer
static int _anetTcpServer(char *err, int port, char *bindaddr, int af, int backlog)
{
    int s = -1, rv;
    char _port[6];  /* strlen("65535") */
    struct addrinfo hints, *servinfo, *p;

    snprintf(_port,6,"%d",port);
    memset(&hints,0,sizeof(hints));
    hints.ai_family = af;
    hints.ai_socktype = SOCK_STREAM;
    hints.ai_flags = AI_PASSIVE;    /* No effect if bindaddr != NULL */

    if ((rv = getaddrinfo(bindaddr,_port,&hints,&servinfo)) != 0) {
        anetSetError(err, "%s", gai_strerror(rv));
        return ANET_ERR;
    }
    for (p = servinfo; p != NULL; p = p->ai_next) {
        if ((s = socket(p->ai_family,p->ai_socktype,p->ai_protocol)) == -1)
            continue;

        if (af == AF_INET6 && anetV6Only(err,s) == ANET_ERR) goto error;
        if (anetSetReuseAddr(err,s) == ANET_ERR) goto error;
        if (anetListen(err,s,p->ai_addr,p->ai_addrlen,backlog) == ANET_ERR) goto error;
        goto end;
    }
    if (p == NULL) {
        anetSetError(err, "unable to bind socket, errno: %d", errno);
        goto error;
    }

error:
    if (s != -1) close(s);
    s = ANET_ERR;
end:
    freeaddrinfo(servinfo);
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebp
movl %ecx, %r12d
movq %rdx, %r14
movl %esi, %ecx
movq %rdi, %rbx
leaq 0x2a043(%rip), %rdx     # 0x3b174
leaq 0x12(%rsp), %r13
pushq $0x6
popq %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x10200
xorps %xmm0, %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
movups %xmm0, 0x18(%rdx)
andq $0x0, 0x28(%rdx)
movl %r12d, 0x4(%rdx)
pushq $0x1
popq %rax
movl %eax, 0x8(%rdx)
movl %eax, (%rdx)
movq %rsp, %r15
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rcx
callq 0x10670
testl %eax, %eax
je 0x111b7
movl %eax, %edi
callq 0x10220
leaq 0x29eab(%rip), %rsi     # 0x3b032
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
pushq $-0x1
popq %r14
jmp 0x11271
movl 0x4(%r15), %edi
movl 0x8(%r15), %esi
movl 0xc(%r15), %edx
callq 0x10740
cmpl $-0x1, %eax
jne 0x111dc
addq $0x28, %r15
movq (%r15), %r15
testq %r15, %r15
jne 0x1119d
callq 0x100a0
movl (%rax), %edx
leaq 0x29f89(%rip), %rsi     # 0x3b156
movq %rbx, %rdi
xorl %eax, %eax
callq 0x108d0
jmp 0x11264
movl %eax, %r14d
cmpl $0xa, %r12d
jne 0x11207
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
pushq $0x29
popq %rsi
pushq $0x1a
popq %rdx
pushq $0x4
popq %r8
movl %r14d, %edi
callq 0x10120
cmpl $-0x1, %eax
je 0x11234
movq %rbx, %rdi
movl %r14d, %esi
callq 0x116d9
cmpl $-0x1, %eax
je 0x1125c
movq 0x18(%r15), %rdx
movl 0x10(%r15), %ecx
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %r8d
callq 0x1131a
cmpl $-0x1, %eax
jne 0x11268
jmp 0x1125c
callq 0x100a0
movl (%rax), %edi
callq 0x10690
leaq 0x29f30(%rip), %rsi     # 0x3b177
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
movl %r14d, %edi
callq 0x102a0
movl %r14d, %edi
callq 0x102a0
pushq $-0x1
popq %r14
movq (%rsp), %rdi
callq 0x10730
movl %r14d, %eax
addq $0x48, %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/src/anet.c
// Function: anetUnixServer
int anetUnixServer(char *err, char *path, mode_t perm, int backlog)
{
    int s;
    struct sockaddr_un sa;

    if ((s = anetCreateSocket(err,AF_LOCAL)) == ANET_ERR)
        return ANET_ERR;

    memset(&sa,0,sizeof(sa));
    sa.sun_family = AF_LOCAL;
    strncpy(sa.sun_path,path,sizeof(sa.sun_path)-1);
    if (anetListen(err,s,(struct sockaddr*)&sa,sizeof(sa),backlog) == ANET_ERR)
        return ANET_ERR;
    if (perm)
        chmod(sa.sun_path, perm);
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %r15d
movl %edx, 0x4(%rsp)
movq %rsi, %rbx
movq %rdi, %r13
callq 0x10fe6
pushq $-0x1
popq %r14
cmpl $-0x1, %eax
je 0x11308
movl %eax, %ebp
leaq 0xc(%rsp), %r12
andw $0x0, 0x6a(%r12)
movw $0x1, -0x2(%r12)
pushq $0x6b
popq %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x100b0
leaq 0xa(%rsp), %rdx
pushq $0x6e
popq %rcx
movq %r13, %rdi
movl %ebp, %esi
movl %r15d, %r8d
callq 0x1131a
cmpl $-0x1, %eax
je 0x11308
movl 0x4(%rsp), %esi
testl %esi, %esi
je 0x11305
movq %r12, %rdi
callq 0x104f0
movl %ebp, %r14d
movl %r14d, %eax
addq $0x78, %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/src/anet.c
// Function: anetTcpAccept
int anetTcpAccept(char *err, int s, char *ip, size_t ip_len, int *port) {
    int fd;
    struct sockaddr_storage sa;
    socklen_t salen = sizeof(sa);
    if ((fd = anetGenericAccept(err,s,(struct sockaddr*)&sa,&salen)) == -1)
        return ANET_ERR;

    if (sa.ss_family == AF_INET) {
        struct sockaddr_in *s = (struct sockaddr_in *)&sa;
        if (ip) inet_ntop(AF_INET,(void*)&(s->sin_addr),ip,ip_len);
        if (port) *port = ntohs(s->sin_port);
    } else {
        struct sockaddr_in6 *s = (struct sockaddr_in6 *)&sa;
        if (ip) inet_ntop(AF_INET6,(void*)&(s->sin6_addr),ip,ip_len);
        if (port) *port = ntohs(s->sin6_port);
    }
    return fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
leaq 0x4(%rsp), %rcx
movl $0x80, (%rcx)
leaq 0x8(%rsp), %rdx
callq 0x11410
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x11400
cmpw $0x2, 0x8(%rsp)
jne 0x113d5
testq %r15, %r15
je 0x113ed
leaq 0xc(%rsp), %rsi
pushq $0x2
jmp 0x113e1
testq %r15, %r15
je 0x113ed
leaq 0x10(%rsp), %rsi
pushq $0xa
popq %rdi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x10040
testq %rbx, %rbx
je 0x11400
movzwl 0xa(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%rbx)
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetGenericAccept
static int anetGenericAccept(char *err, int s, struct sockaddr *sa, socklen_t *len) {
    int fd;
    while(1) {
        fd = accept(s,sa,len);
        if (fd == -1) {
            if (errno == EINTR)
                continue;
            else {
                anetSetError(err, "accept: %s", strerror(errno));
                return ANET_ERR;
            }
        }
        break;
    }
    return fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r14
movl %ebp, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x105d0
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x1145c
callq 0x100a0
movl (%rax), %edi
cmpl $0x4, %edi
je 0x11423
callq 0x10690
leaq 0x29d42(%rip), %rsi     # 0x3b191
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetPeerToString
int anetPeerToString(int fd, char *ip, size_t ip_len, int *port) {
    struct sockaddr_storage sa;
    socklen_t salen = sizeof(sa);

    if (getpeername(fd,(struct sockaddr*)&sa,&salen) == -1) goto error;
    if (ip_len == 0) goto error;

    if (sa.ss_family == AF_INET) {
        struct sockaddr_in *s = (struct sockaddr_in *)&sa;
        if (ip) inet_ntop(AF_INET,(void*)&(s->sin_addr),ip,ip_len);
        if (port) *port = ntohs(s->sin_port);
    } else if (sa.ss_family == AF_INET6) {
        struct sockaddr_in6 *s = (struct sockaddr_in6 *)&sa;
        if (ip) inet_ntop(AF_INET6,(void*)&(s->sin6_addr),ip,ip_len);
        if (port) *port = ntohs(s->sin6_port);
    } else if (sa.ss_family == AF_UNIX) {
        if (ip) strncpy(ip,"/unixsocket",ip_len);
        if (port) *port = 0;
    } else {
        goto error;
    }
    return 0;

error:
    if (ip) {
        if (ip_len >= 2) {
            ip[0] = '?';
            ip[1] = '\0';
        } else if (ip_len == 1) {
            ip[0] = '\0';
        }
    }
    if (port) *port = 0;
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
leaq 0x10(%rsp), %rsi
callq 0x101a0
testq %r15, %r15
je 0x114db
cmpl $-0x1, %eax
je 0x114db
movzwl 0x10(%rsp), %eax
cmpl $0x1, %eax
je 0x1152f
cmpl $0xa, %eax
je 0x11505
cmpl $0x2, %eax
jne 0x114db
testq %r14, %r14
je 0x1151d
leaq 0x14(%rsp), %rsi
pushq $0x2
jmp 0x11511
testq %r14, %r14
je 0x114f9
cmpq $0x2, %r15
jb 0x114ef
movb $0x3f, (%r14)
incq %r14
jmp 0x114f5
cmpq $0x1, %r15
jne 0x114f9
movb $0x0, (%r14)
pushq $-0x1
popq %rax
testq %rbx, %rbx
je 0x11557
xorl %ecx, %ecx
jmp 0x11552
testq %r14, %r14
je 0x1151d
leaq 0x18(%rsp), %rsi
pushq $0xa
popq %rdi
movq %r14, %rdx
movl %r15d, %ecx
callq 0x10040
testq %rbx, %rbx
je 0x11564
movzwl 0x12(%rsp), %ecx
rolw $0x8, %cx
xorl %eax, %eax
jmp 0x11552
testq %r14, %r14
je 0x11546
leaq 0x29bad(%rip), %rsi     # 0x3b0e8
movq %r14, %rdi
movq %r15, %rdx
callq 0x100b0
xorl %ecx, %ecx
movl $0x0, %eax
testq %rbx, %rbx
je 0x11557
movzwl %cx, %ecx
movl %ecx, (%rbx)
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x11557
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetSockName
int anetSockName(int fd, char *ip, size_t ip_len, int *port) {
    struct sockaddr_storage sa;
    socklen_t salen = sizeof(sa);

    if (getsockname(fd,(struct sockaddr*)&sa,&salen) == -1) {
        if (port) *port = 0;
        ip[0] = '?';
        ip[1] = '\0';
        return -1;
    }
    if (sa.ss_family == AF_INET) {
        struct sockaddr_in *s = (struct sockaddr_in *)&sa;
        if (ip) inet_ntop(AF_INET,(void*)&(s->sin_addr),ip,ip_len);
        if (port) *port = ntohs(s->sin_port);
    } else {
        struct sockaddr_in6 *s = (struct sockaddr_in6 *)&sa;
        if (ip) inet_ntop(AF_INET6,(void*)&(s->sin6_addr),ip,ip_len);
        if (port) *port = ntohs(s->sin6_port);
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
leaq 0x10(%rsp), %rsi
callq 0x105e0
cmpl $-0x1, %eax
je 0x11645
cmpw $0x2, 0x10(%rsp)
jne 0x11658
testq %r14, %r14
je 0x11670
leaq 0x14(%rsp), %rsi
pushq $0x2
jmp 0x11664
testq %rbx, %rbx
je 0x1164d
andl $0x0, (%rbx)
movw $0x3f, (%r14)
pushq $-0x1
popq %rax
jmp 0x11685
testq %r14, %r14
je 0x11670
leaq 0x18(%rsp), %rsi
pushq $0xa
popq %rdi
movq %r14, %rdx
movl %r15d, %ecx
callq 0x10040
xorl %eax, %eax
testq %rbx, %rbx
je 0x11685
movzwl 0x12(%rsp), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
movl %ecx, (%rbx)
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/anet.c
// Function: anetSetReuseAddr
static int anetSetReuseAddr(char *err, int fd) {
    int yes = 1;
    /* Make sure connection-intensive things like the redis benckmark
     * will be able to close/open sockets a zillion of times */
    if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1) {
        anetSetError(err, "setsockopt SO_REUSEADDR: %s", strerror(errno));
        return ANET_ERR;
    }
    return ANET_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %eax
movq %rdi, %rbx
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x10120
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x1172b
callq 0x100a0
movl (%rax), %edi
callq 0x10690
leaq 0x29a1f(%rip), %rsi     # 0x3b13a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x108d0
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/adlist.c
// Function: listRelease
void listRelease(list *list)
{
    unsigned long len;
    listNode *current, *next;

    current = list->head;
    len = list->len;
    while(len--) {
        next = current->next;
        if (list->free) list->free(current->value);
        zfree(current);
        current = next;
    }
    zfree(list);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x28(%rdi), %r15
subq $0x1, %r15
jb 0x1178a
movq 0x8(%r14), %r12
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x1177d
movq 0x10(%r14), %rdi
callq *%rax
movq %r14, %rdi
callq 0x1653d
movq %r12, %r14
jmp 0x11764
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1653d
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x163fd
testq %rax, %rax
je 0x117cd
movq %r14, 0x10(%rax)
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x117d1
andq $0x0, (%rax)
movq (%rbx), %rdx
movq %rax, (%rdx)
jmp 0x117db
xorl %ebx, %ebx
jmp 0x117e9
movq %rax, 0x8(%rbx)
andq $0x0, (%rax)
xorl %edx, %edx
movq %rax, (%rbx)
movq %rdx, 0x8(%rax)
incq %rcx
movq %rcx, 0x28(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x163fd
testq %rax, %rax
je 0x1182b
movq %r14, 0x10(%rax)
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x1182f
movq 0x8(%rbx), %rdx
andq $0x0, 0x8(%rax)
movq %rax, 0x8(%rdx)
movq %rax, 0x8(%rbx)
jmp 0x1183d
xorl %ebx, %ebx
jmp 0x11847
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
andq $0x0, 0x8(%rax)
xorl %edx, %edx
movq %rdx, (%rax)
incq %rcx
movq %rcx, 0x28(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x163fd
testq %rax, %rax
je 0x11893
movq %r15, 0x10(%rax)
testl %ebp, %ebp
je 0x11897
movq %r14, (%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
cmpq %r14, 0x8(%rbx)
jne 0x1188e
movq %rax, 0x8(%rbx)
movq %r14, %rcx
jmp 0x118ae
xorl %ebx, %ebx
jmp 0x118c2
movq %r14, 0x8(%rax)
movq (%r14), %rcx
movq %rcx, (%rax)
cmpq %r14, (%rbx)
jne 0x118a9
movq %rax, (%rbx)
testq %rcx, %rcx
je 0x118bb
movq %rax, 0x8(%rcx)
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x118be
movq %rax, (%r14)
incq 0x28(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
leaq 0x8(%rax), %rdx
testq %rax, %rax
cmoveq %rdi, %rdx
leaq 0x8(%rdi), %rsi
testq %rcx, %rcx
cmovneq %rcx, %rsi
movq %rcx, (%rdx)
movq %rax, (%rsi)
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x1190c
movq 0x10(%r14), %rdi
callq *%rax
movq %r14, %rdi
callq 0x1653d
decq 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x11734
testq %rax, %rax
je 0x119ea
movq %rax, %rbx
movups 0x10(%r14), %xmm0
movups %xmm0, 0x10(%rax)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movq (%r14), %rcx
testq %rcx, %rcx
je 0x119ec
movq 0x8(%rcx), %r14
movq 0x10(%rcx), %rax
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x119cf
movq %rax, %rdi
callq *%rcx
testq %rax, %rax
je 0x119e2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x117f4
movq %r14, %rcx
testq %rax, %rax
jne 0x119af
movq %rbx, %rdi
callq 0x11752
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r12
movq %r12, %r15
testq %r12, %r12
je 0x11a31
movq 0x8(%r15), %r12
movq 0x10(%r15), %rdi
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x11a2c
movq %rbx, %rsi
callq *%rax
testl %eax, %eax
je 0x11a08
jmp 0x11a31
cmpq %rbx, %rdi
jne 0x11a08
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/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:
movq %rdi, %rax
testq %rsi, %rsi
js 0x11a5c
movq (%rax), %rax
addq $-0x1, %rsi
jae 0x11a73
testq %rax, %rax
je 0x11a73
addq $0x8, %rax
jmp 0x11a48
addq $0x8, %rax
incq %rsi
movq (%rax), %rax
testq %rsi, %rsi
je 0x11a73
incq %rsi
testq %rax, %rax
jne 0x11a63
retq
// File: /workspace/github_c_makefile_star2_O2/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:
cmpq $0x2, 0x28(%rdi)
jb 0x11a9c
movq 0x8(%rdi), %rax
movq (%rax), %rcx
movq %rcx, 0x8(%rdi)
andq $0x0, 0x8(%rcx)
movq (%rdi), %rcx
movq %rax, (%rcx)
andq $0x0, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, (%rdi)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x11aa0
testl %eax, %eax
je 0x11b1f
leaq 0x2d17f(%rip), %rsi     # 0x3ec75
movq %r12, %rdi
callq 0x106c0
xorl %ebp, %ebp
testq %rax, %rax
setne %bpl
leaq 0x2d16c(%rip), %rsi     # 0x3ec7a
movq %r12, %rdi
callq 0x106c0
testq %rax, %rax
je 0x11b35
pushq $0x1f
jmp 0x11b93
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x194d0
leaq 0x2d142(%rip), %rsi     # 0x3ec7e
movq %r12, %rdi
callq 0x106c0
testq %rax, %rax
je 0x11b4d
pushq $0x20
jmp 0x11b93
leaq 0x2d130(%rip), %rsi     # 0x3ec84
movq %r12, %rdi
callq 0x106c0
testq %rax, %rax
je 0x11b65
pushq $0x21
jmp 0x11b93
leaq 0x2d11f(%rip), %rsi     # 0x3ec8b
movq %r12, %rdi
callq 0x106c0
testq %rax, %rax
je 0x11b7d
pushq $0x22
jmp 0x11b93
leaq 0x2d10c(%rip), %rsi     # 0x3ec90
movq %r12, %rdi
callq 0x106c0
testq %rax, %rax
je 0x11bcc
pushq $0x23
popq %rcx
leaq 0x2d108(%rip), %rsi     # 0x3eca3
movq %r15, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x19834
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x194d0
leaq 0x2ef8b(%rip), %rsi     # 0x40b47
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1952f
leaq 0x2d0c5(%rip), %rsi     # 0x3ec98
movq %r12, %rdi
callq 0x106c0
xorl %ecx, %ecx
cmpq $0x1, %rax
adcl $0x24, %ecx
jmp 0x11b94
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2d0d5(%rip), %rsi     # 0x3ecd6
movq %r14, %rdi
callq 0x106c0
testq %rax, %rax
jne 0x11cc6
leaq 0x2d0b6(%rip), %rsi     # 0x3eccf
movq %r14, %rdi
callq 0x106c0
movq %rax, (%rsp)
leaq 0x2d09b(%rip), %rsi     # 0x3ecc7
movq %r14, %rdi
callq 0x106c0
movq %rax, %r12
leaq 0x2d081(%rip), %rsi     # 0x3ecbf
movq %r14, %rdi
callq 0x106c0
movq %rax, %rbp
leaq 0x2d067(%rip), %rsi     # 0x3ecb7
movq %r14, %rdi
callq 0x106c0
movq %rax, %r13
leaq 0x2d04d(%rip), %rsi     # 0x3ecaf
movq %r14, %rdi
callq 0x106c0
testq %rax, %rax
leaq 0x2d029(%rip), %rax     # 0x3ec9d
leaq 0x2cffa(%rip), %rcx     # 0x3ec75
cmovneq %rcx, %rax
testq %r13, %r13
leaq 0x2cff5(%rip), %rdx     # 0x3ec7e
cmoveq %rax, %rdx
testq %rbp, %rbp
leaq 0x2d001(%rip), %rax     # 0x3ec98
cmoveq %rdx, %rax
testq %r12, %r12
leaq 0x2cfd5(%rip), %r12     # 0x3ec7a
cmoveq %rax, %r12
cmpq $0x0, (%rsp)
cmovneq %rcx, %r12
leaq 0x2d025(%rip), %rsi     # 0x3ecde
movq %r14, %rdi
callq 0x106c0
testq %rax, %rax
je 0x11ccd
leaq 0x2cfc3(%rip), %r12     # 0x3ec90
cmpq $0x5, %rbx
jb 0x11d07
callq 0x10710
movq (%rax), %rax
movsbq 0x3(%r14), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x11d07
cmpb $0x3e, 0x1(%r14)
jne 0x11cf7
leaq 0x2cf8f(%rip), %r12     # 0x3ec84
jmp 0x11d07
cmpb $0x23, 0x2(%r14)
leaq 0x2cf72(%rip), %rax     # 0x3ec75
cmoveq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ad2
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r15
movq (%rdi), %r14
leaq 0x2cfa9(%rip), %rsi     # 0x3ece7
movq %r14, %rdi
callq 0x10080
cmpl $0x2, %ebp
jl 0x11d96
testl %eax, %eax
jne 0x11d96
movq 0x8(%r15), %r14
leaq 0x2cf94(%rip), %rsi     # 0x3ecee
movq %r14, %rdi
callq 0x10080
testl %eax, %eax
je 0x11dc5
leaq 0x2cf7f(%rip), %rsi     # 0x3ecec
movq %r14, %rdi
callq 0x10080
testl %eax, %eax
je 0x11dce
testl %ebx, %ebx
leaq 0x2cf97(%rip), %rax     # 0x3ed19
leaq 0x2e457(%rip), %rsi     # 0x401e0
cmoveq %rax, %rsi
leaq 0x2cf60(%rip), %rdi     # 0x3ecf4
jmp 0x11db1
testl %ebx, %ebx
leaq 0x2cf7a(%rip), %rax     # 0x3ed19
leaq 0x2e43a(%rip), %rsi     # 0x401e0
cmoveq %rax, %rsi
leaq 0x2cf76(%rip), %rdi     # 0x3ed27
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x101f0
movb $0x1, 0x4462c(%rip)     # 0x563f8
jmp 0x11dd5
movb $0x0, 0x44623(%rip)     # 0x563f8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x410, %rsp            # imm = 0x410
leaq 0x2cf5b(%rip), %rdi     # 0x3ed52
leaq 0x2cf64(%rip), %rsi     # 0x3ed62
callq 0x11e90
testq %rax, %rax
je 0x11e7f
movq %rax, %rbx
leaq 0x3008b(%rip), %rsi     # 0x41e9d
movq %rax, %rdi
callq 0x103e0
testq %rax, %rax
je 0x11e77
movq %rax, %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10330
testq %rax, %rax
je 0x11e6f
movq %r15, %rdi
movq %r12, %rsi
callq 0x1a100
movq %rax, %r13
movl 0xc(%rsp), %esi
testl %esi, %esi
jle 0x11e65
movq %r13, %rdi
xorl %edx, %edx
callq 0x11d26
movl 0xc(%rsp), %esi
movq %r13, %rdi
callq 0x19f36
jmp 0x11e2c
movq %r14, %rdi
callq 0x101b0
movq %rbx, %rdi
callq 0x18f40
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x10050
testq %rax, %rax
je 0x11ecb
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x11ecb
leaq 0x2cf8d(%rip), %rdi     # 0x3ee3d
movq %r14, %rsi
callq 0x10380
testl %eax, %eax
je 0x11f07
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18ed2
leaq 0x2cf75(%rip), %rdi     # 0x3ee47
callq 0x10050
testq %rax, %rax
je 0x11f07
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x11f07
callq 0x18ec4
leaq 0x2cf5c(%rip), %rsi     # 0x3ee4c
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x197b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2ce4c(%rip), %rdi     # 0x3ed6e
xorl %eax, %eax
callq 0x101f0
cvtsi2ss %r14, %xmm0
movss %xmm0, 0x4(%rsp)
addq $0x10, %rbx
leaq 0x2ce39(%rip), %r14     # 0x3ed78
cvtsi2ssq -0x8(%rbx), %xmm1
divss 0x4(%rsp), %xmm1
movl 0x444ab(%rip), %eax     # 0x563fc
decl %eax
cvtsi2ss %eax, %xmm0
mulss %xmm1, %xmm0
callq 0x10340
cvttss2si %xmm0, %eax
movq 0x44495(%rip), %rcx     # 0x56400
cltq
movl (%rcx,%rax,4), %esi
movl (%rbx), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x101f0
andq $0x0, -0x8(%rbx)
cmpq $0x0, -0x10(%rbx)
leaq 0x18(%rbx), %rbx
jne 0x11f3f
leaq 0x2ebb4(%rip), %rdi     # 0x40b47
callq 0x100e0
movq 0x42021(%rip), %rax     # 0x53fc0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10470