LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/aap[P]pdp11/util.c
// Function: writen
int
writen(int fd, void *data, int n)
{
	int m;

	while(n > 0){
		m = write(fd, data, n);
		if(m <= 0)
			return -1;
		data += m;
		n -= m;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testl %edx, %edx
jle 0x6959
movl %edx, %ebp
movq %rsi, %r14
movl %edi, %r15d
movl %ebp, %edx
movl %r15d, %edi
movq %r14, %rsi
callq 0x2080
testl %eax, %eax
jle 0x6954
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %rcx, %r14
subl %eax, %ebp
jg 0x6932
jmp 0x6959
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aap[P]pdp11/util.c
// Function: dial
int
dial(char *host, int port)
{
	char portstr[32];
	int sockfd;
	struct addrinfo *result, *rp, hints;

	memset(&hints, 0, sizeof(hints));
	hints.ai_family = AF_UNSPEC;
	hints.ai_socktype = SOCK_STREAM;

	snprintf(portstr, 32, "%d", port);
	if(getaddrinfo(host, portstr, &hints, &result)){
		perror("error: getaddrinfo");
		return -1;
	}

	for(rp = result; rp; rp = rp->ai_next){
		sockfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
		if(sockfd < 0)
			continue;
		if(connect(sockfd, rp->ai_addr, rp->ai_addrlen) >= 0)
			goto win;
		close(sockfd);
	}
	freeaddrinfo(result);
	perror("error");
	return -1;

win:
	freeaddrinfo(result);
	return sockfd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movl %esi, %ecx
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %r14
movaps %xmm0, (%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movl $0x1, 0x8(%r14)
leaq 0xdf2(%rip), %rdx       # 0x778b
leaq 0x10(%rsp), %r15
movl $0x20, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x20b0
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2210
testl %eax, %eax
jne 0x6a25
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0x6a2e
movl 0x4(%r14), %edi
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
callq 0x2240
testl %eax, %eax
js 0x69ff
movl %eax, %ebx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movl %eax, %edi
callq 0x21f0
testl %eax, %eax
jns 0x6a0f
movl %ebx, %edi
callq 0x20f0
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x69ce
movq 0x8(%rsp), %rdi
jmp 0x6a30
movq 0x8(%rsp), %rdi
callq 0x2230
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xd62(%rip), %rdi       # 0x778e
jmp 0x6a3c
xorl %edi, %edi
callq 0x2230
leaq 0xd65(%rip), %rdi       # 0x77a1
callq 0x21c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x6a19
// File: /workspace/github_c_makefile_star2_O3/aap[P]pdp11/util.c
// Function: serve
void
serve(int port, void (*handlecon)(int, void*), void *arg)
{
	int sockfd, confd;
	socklen_t len;
	struct sockaddr_in server, client;
	int x;

	sockfd = socket(AF_INET, SOCK_STREAM, 0);
	if(sockfd < 0){
		perror("error: socket");
		return;
	}

	x = 1;
	setsockopt (sockfd, SOL_SOCKET, SO_REUSEADDR, (void *)&x, sizeof x);

	memset(&server, 0, sizeof(server));
	server.sin_family = AF_INET;
	server.sin_addr.s_addr = INADDR_ANY;
	server.sin_port = htons(port);
	if(bind(sockfd, (struct sockaddr*)&server, sizeof(server)) < 0){
		perror("error: bind");
		return;
	}
	listen(sockfd, 5);
	len = sizeof(client);
	while(confd = accept(sockfd, (struct sockaddr*)&client, &len),
	      confd >= 0)
		handlecon(confd, arg);
	perror("error: accept");
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2240
testl %eax, %eax
jns 0x6a8a
leaq 0xd2e(%rip), %rdi       # 0x77a7
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21c0
movl %eax, %ebp
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x2060
leaq 0x20(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movw $0x2, (%rsi)
movl $0x0, 0x4(%rsi)
rolw $0x8, %r15w
movw %r15w, 0x2(%rsi)
movl %ebp, %edi
movl $0x10, %edx
callq 0x2180
testl %eax, %eax
jns 0x6aea
leaq 0xccd(%rip), %rdi       # 0x77b5
jmp 0x6b3b
movl %ebp, %edi
movl $0x5, %esi
callq 0x2160
leaq 0x8(%rsp), %rdx
movl $0x10, (%rdx)
leaq 0x10(%rsp), %rsi
movl %ebp, %edi
callq 0x21d0
testl %eax, %eax
js 0x6b34
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movl %eax, %edi
movq %rbx, %rsi
callq *%r14
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
testl %eax, %eax
jns 0x6b1b
leaq 0xc86(%rip), %rdi       # 0x77c1
callq 0x21c0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Bmp/main.c
// Function: main
int main(int argc, char *argv[])
{
	struct bmp *bmp = NULL;

	if (argc != 4)
	{
		fprintf(stderr, "%s <*.BMP|*.bmp|*.bkg> <*.pal> outfile\n", argv[0]);
		return EXIT_FAILURE;
	}

	if ((bmp = convertbmp(argv[1], argv[2])))
	{
		writeImage(argv[3], bmp->width, bmp->height, bmp->data, argv[3]);
		closebmp(bmp);
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
cmpl $0x4, %edi
jne 0x1612
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x1761
xorl %ebx, %ebx
testq %rax, %rax
je 0x160a
movq %rax, %r15
movq 0x18(%r14), %rdi
movzwl 0x2(%rax), %esi
movzwl 0x4(%rax), %edx
movq 0x10(%rax), %rcx
movq %rdi, %r8
callq 0x13a6
movq %r15, %rdi
callq 0x1732
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x121e
movl $0x1, %ebx
jmp 0x160a
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Bmp/bmp.c
// Function: openbmp
struct bmp *openbmp(char *filename)
{
	struct bmp *newbmp = NULL;
	FILE *fin = NULL;
	unsigned int filesize = 0;

	if (!(fin = fopen(filename, "rb")))
	{
		perror("fopen()");
		return NULL;
	}
	if (!(newbmp = malloc(sizeof (struct bmp))))
	{
		perror("malloc()");
		return NULL;
	}

        fseek(fin, 0, SEEK_END);
        filesize = ftell(fin);
        fseek(fin, 0, SEEK_SET);
	if (!(newbmp->buf = malloc(sizeof (char) * filesize)))
	{
		perror("malloc()");
		free(newbmp);
		fclose(fin);
		return NULL;
	}
	if (fread(newbmp->buf, 1, filesize, fin) != filesize)
	{
		perror("fread()");
		free(newbmp);
		fclose(fin);
		return NULL;
	}
	memcpy(newbmp, newbmp->buf, 3 * sizeof (unsigned short));
	if (newbmp->sig != 0x0021)
	{
		fprintf(stderr, "[-] Wrong signature\n");
		free(newbmp->buf);
		free(newbmp);
		fclose(fin);
		return NULL;
	}
	newbmp->data = NULL;
	fclose(fin);
	return newbmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xa6d(%rip), %rsi       # 0x20a0
callq 0x1140
testq %rax, %rax
je 0x16d5
movq %rax, %r14
movl $0x18, %edi
callq 0x1110
testq %rax, %rax
je 0x16de
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1120
movq %r14, %rdi
callq 0x10d0
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1120
movl %r15d, %r12d
movq %r12, %rdi
callq 0x1110
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x16ec
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x1050
cmpq %r12, %rax
jne 0x16f5
movzwl 0x4(%r15), %eax
movw %ax, 0x4(%rbx)
movl (%r15), %eax
movl %eax, (%rbx)
cmpw $0x21, %ax
jne 0x1713
movq $0x0, 0x10(%rbx)
movq %r14, %rdi
callq 0x1070
jmp 0x1723
leaq 0x92b(%rip), %rdi       # 0x2007
jmp 0x16e5
leaq 0x9be(%rip), %rdi       # 0x20a3
callq 0x1150
jmp 0x1721
leaq 0x9b0(%rip), %rdi       # 0x20a3
jmp 0x16fc
leaq 0x9b0(%rip), %rdi       # 0x20ac
callq 0x1150
movq %rbx, %rdi
callq 0x1040
movq %r14, %rdi
callq 0x1070
jmp 0x1721
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x123c
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Bmp/bmp.c
// Function: closebmp
void closebmp(struct bmp *nbmp)
{
	if (nbmp)
	{
		if (nbmp->buf)
			free(nbmp->buf);
		if (nbmp->data)
			free(nbmp->data);
		free(nbmp);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x1760
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x1749
callq 0x1040
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1757
callq 0x1040
movq %rbx, %rdi
popq %rbx
jmp 0x1040
retq
// File: /workspace/github_c_makefile_star2_O3/w4kfu[P]HommI/Bmp/bmp.c
// Function: convertbmp
struct bmp* convertbmp(char *filename, char *palettefile)
{
	struct bmp *newbmp = NULL;
	unsigned char *pal = NULL;
	unsigned char *newdata = NULL;
	struct color *rgb = NULL;
	unsigned int y, x;

	if (!(pal = open_palette(palettefile)))
		return NULL;
	if (!(newbmp = openbmp(filename)))
	{
		free(pal);
		return NULL;
	}
	if (!(newdata = malloc(sizeof (char) * newbmp->width * newbmp->height * 3)))
	{
		perror("malloc()");
		free(pal);
		free(newbmp);
		return NULL;
	}
	newbmp->data = newdata;
	rgb = (struct color *)pal;
	for (y = 0; y < newbmp->height; y++)
	{
		for (x = 0; x < newbmp->width; x++)
		{
			memcpy(newdata, &rgb[*(newbmp->buf + (3 * 2) + (x + (y * newbmp->width)))], 3);
			newdata += 3;
		}
	}
	free(pal);
	return newbmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x185c
testq %rax, %rax
je 0x1832
movq %rax, %r14
movq %rbx, %rdi
callq 0x1624
testq %rax, %rax
je 0x182a
movq %rax, %rbx
movzwl 0x2(%rax), %r15d
movzwl 0x4(%rax), %r12d
movq %r15, %rax
imulq %r12, %rax
leaq (%rax,%rax,2), %rdi
callq 0x1110
testq %rax, %rax
je 0x1843
movq %rax, 0x10(%rbx)
testw %r12w, %r12w
je 0x1820
xorl %ecx, %ecx
xorl %edx, %edx
testw %r15w, %r15w
je 0x1810
movzwl %r15w, %edi
xorl %esi, %esi
movl %edi, %edi
imulq %rcx, %rdi
addq 0x8(%rbx), %rdi
movzbl 0x6(%rsi,%rdi), %edi
leaq (%rdi,%rdi,2), %rdi
movb 0x2(%r14,%rdi), %r8b
movb %r8b, 0x2(%rax)
movzwl (%r14,%rdi), %edi
movw %di, (%rax)
addq $0x3, %rax
movzwl 0x2(%rbx), %r15d
movzwl %r15w, %edi
incq %rsi
cmpl %edi, %esi
jb 0x17d1
movzwl 0x4(%rbx), %r12d
jmp 0x1813
xorl %r15d, %r15d
incl %edx
movzwl %r12w, %esi
incq %rcx
cmpl %esi, %edx
jb 0x17c5
movq %r14, %rdi
callq 0x1040
jmp 0x1834
movq %r14, %rdi
callq 0x1040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x859(%rip), %rdi       # 0x20a3
callq 0x1150
movq %r14, %rdi
callq 0x1040
movq %rbx, %rdi
jmp 0x182d
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/./sh_bisect.h
// Function: bisect_left
void *
bisect_left(const void *key, const void *arr,
            size_t el_num, size_t el_size,
            int (*compare) (const void *, const void *))
{
    size_t low = 0;
    size_t high = el_num;
    size_t mid;
    char *off;

    ASSERT_BISECT_ARGS();

    while (low < high) {
        mid = low + ((high - low) >> 1);
        off = (char *) arr + mid * el_size;
        if ((*compare) (key, off) > 0) {
            low = mid + 1;
        } else {
            high = mid;
        }
    }

    return (char *) arr + low * el_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
testq %rdi, %rdi
je 0x19fe
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1a07
cmpq $0x0, 0x8(%rsp)
je 0x1a10
cmpq $0x0, 0x10(%rsp)
je 0x1a19
movq %rdx, %r15
testq %rdx, %rdx
je 0x19e1
movq %rdi, %r13
xorl %ebp, %ebp
movq %r15, %r12
subq %rbp, %r12
shrq %r12
leaq (%r12,%rbp), %r14
movq %r14, %rsi
imulq 0x8(%rsp), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq *0x10(%rsp)
testl %eax, %eax
jg 0x19d4
movq %r14, %r15
jmp 0x19da
addq %r12, %rbp
incq %rbp
cmpq %r15, %rbp
jb 0x19ab
jmp 0x19e3
xorl %ebp, %ebp
imulq 0x8(%rsp), %rbp
addq %rbp, %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x192a(%rip), %rdi      # 0x332f
jmp 0x1a20
leaq 0x199e(%rip), %rdi      # 0x33ac
jmp 0x1a20
leaq 0x1825(%rip), %rdi      # 0x323c
jmp 0x1a20
leaq 0x189b(%rip), %rdi      # 0x32bb
leaq 0x1914(%rip), %rsi      # 0x333b
leaq 0x191b(%rip), %rcx      # 0x3349
movl $0x5c, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_create
BAMS *
bams_create(size_t key_size, int (*compare) (const void *, const void *))
{
    BAMS *set;

    assert(NULL != compare);

    set = (BAMS *) malloc(sizeof (BAMS));
    if (!set) {
        return NULL;
    }

    if (key_size) {
        set->key_size = key_size;
        set->type = COPY_DATA;
    } else {
        set->key_size = sizeof (void *);
        set->type = COPY_POINTER;
    }
    set->compare = compare;
    set->head = NULL;
    set->size = 0;

    return set;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1b4f
movq %rsi, %rbx
movq %rdi, %r14
movl $0x28, %edi
callq 0x1090
testq %rax, %rax
je 0x1b47
xorl %ecx, %ecx
testq %r14, %r14
setne %cl
movl $0x8, %edx
cmovneq %r14, %rdx
movq %rdx, (%rax)
movl %ecx, 0x20(%rax)
movq %rbx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x18c6(%rip), %rdi      # 0x341c
leaq 0x18cf(%rip), %rsi      # 0x342c
leaq 0x18cf(%rip), %rcx      # 0x3433
movl $0x52, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_insert
int
bams_insert(BAMS * set, const void *key)
{
    SET_NODE *curr;
    /** void *keys; */
    void *t;
    /** size_t length = 1; */
    SET_NODE *node;
    SET_NODE *next;

    assert(NULL != set);
    assert(NULL != key);

    curr = set->head;
    node = make_node(set, key);
    if (!node) {
        return 0;
    }

    node->next = curr;
    set->head = node;
    set->size += 1;

    /*
     * Normalize 
     */
    while (curr != NULL) {
        if ((node->length) >= (curr->length)) {
            next = curr->next;

            t = merge_into(curr->keys, curr->length, node->keys,
                           node->length, set->key_size, set->compare);
            if (NULL == t) {
                return 1;       /*
                                 * return norm error ! 
                                 */
            }
            curr->keys = t;
            curr->length += node->length;
            set->head = curr;

            /*
             * free node 
             */
            free(node->keys);
            free(node);

            node = curr;
            curr = next;
        } else
            break;
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1c76
movq %rsi, %r15
testq %rsi, %rsi
je 0x1c95
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movl $0x18, %edi
callq 0x1090
testq %rax, %rax
je 0x1c61
movq %rax, %rbp
movq (%rbx), %r12
movq %r12, %rdi
callq 0x1090
testq %rax, %rax
je 0x1c59
movq %rax, %r13
cmpl $0x0, 0x20(%rbx)
jne 0x1bd1
movq %rsp, %rax
movq %r15, (%rax)
movq %rax, %r15
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1070
movq %r13, 0x10(%rbp)
movq $0x1, 0x8(%rbp)
movq %r14, (%rbp)
movq %rbp, 0x10(%rbx)
incq 0x18(%rbx)
movl $0x1, %r15d
testq %r14, %r14
je 0x1c64
movq 0x8(%rbp), %rcx
movq 0x8(%r14), %rsi
cmpq %rsi, %rcx
jb 0x1c64
movq (%r14), %r12
movq 0x10(%r14), %rdi
movq 0x10(%rbp), %rdx
movq (%rbx), %r8
movq 0x8(%rbx), %r9
callq 0x1801
testq %rax, %rax
je 0x1c64
movq %rax, 0x10(%r14)
movq 0x8(%rbp), %rax
addq %rax, 0x8(%r14)
movq %r14, 0x10(%rbx)
movq 0x10(%rbp), %rdi
callq 0x1030
movq %rbp, %rdi
callq 0x1030
movq %r14, %rbp
movq %r12, %r14
testq %r12, %r12
jne 0x1c02
jmp 0x1c64
movq %rbp, %rdi
callq 0x1030
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17f5(%rip), %rdi      # 0x3472
leaq 0x17a8(%rip), %rsi      # 0x342c
leaq 0x17f3(%rip), %rcx      # 0x347e
movl $0x71, %edx
callq 0x1050
leaq 0x1808(%rip), %rdi      # 0x34a4
leaq 0x1789(%rip), %rsi      # 0x342c
leaq 0x17d4(%rip), %rcx      # 0x347e
movl $0x72, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_min
const void *
bams_min(const BAMS * set)
{
    SET_NODE *curr;
    void *min_key = NULL;

    assert(NULL != set);

    curr = set->head;
    if (set->size > 0) {
        assert(curr != NULL);
        assert(curr->keys != NULL);

        min_key = curr->keys;
        while (NULL != curr->next) {
            curr = curr->next;
            if ((*(set->compare)) (min_key, curr->keys) > 0) {
                min_key = curr->keys;
            }
        }
    }

    if (set->type == COPY_POINTER) {
        return *(void **) min_key;
    } else {
        return min_key;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1d0e
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x1cf9
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x1d2d
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x1d4c
movq (%rax), %r15
testq %r15, %r15
je 0x1cfc
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq *0x8(%rbx)
testl %eax, %eax
jle 0x1cf4
movq 0x10(%r15), %r14
movq (%r15), %r15
jmp 0x1cdd
xorl %r14d, %r14d
cmpl $0x0, 0x20(%rbx)
jne 0x1d05
movq (%r14), %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x175d(%rip), %rdi      # 0x3472
leaq 0x1710(%rip), %rsi      # 0x342c
leaq 0x178d(%rip), %rcx      # 0x34b0
movl $0xa4, %edx
callq 0x1050
leaq 0x179f(%rip), %rdi      # 0x34d3
leaq 0x16f1(%rip), %rsi      # 0x342c
leaq 0x176e(%rip), %rcx      # 0x34b0
movl $0xa8, %edx
callq 0x1050
leaq 0x178d(%rip), %rdi      # 0x34e0
leaq 0x16d2(%rip), %rsi      # 0x342c
leaq 0x174f(%rip), %rcx      # 0x34b0
movl $0xa9, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_max
const void *
bams_max(const BAMS * set)
{
    SET_NODE *curr;
    size_t key_size;
    char *last = NULL;
    char *max_key = NULL;

    assert(NULL != set);

    curr = set->head;
    key_size = set->key_size;

    if (set->size > 0) {
        assert(curr != NULL);
        assert(curr->keys != NULL);

        max_key = (char *) curr->keys + (curr->length - 1) * key_size;
        while (NULL != curr->next) {
            curr = curr->next;
            last = (char *) curr->keys + (curr->length - 1) * key_size;
            if ((*(set->compare)) (last, max_key) > 0) {
                max_key = last;
            }
        }
    }

    if (set->type == COPY_POINTER) {
        return *(void **) max_key;
    } else {
        return max_key;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x1e05
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x1de7
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x1e24
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x1e43
movq (%rbx), %r12
movq (%rax), %r13
movq 0x8(%rax), %rax
decq %rax
imulq %r12, %rax
addq %rax, %r14
testq %r13, %r13
je 0x1dec
movq 0x8(%r13), %r15
decq %r15
imulq %r12, %r15
addq 0x10(%r13), %r15
movq %r15, %rdi
movq %r14, %rsi
callq *0x8(%rbx)
testl %eax, %eax
jg 0x1dd9
movq %r14, %r15
movq (%r13), %r13
movq %r15, %r14
testq %r13, %r13
jne 0x1dba
jmp 0x1def
xorl %r15d, %r15d
jmp 0x1def
movq %r14, %r15
cmpl $0x0, 0x20(%rbx)
jne 0x1df8
movq (%r15), %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1666(%rip), %rdi      # 0x3472
leaq 0x1619(%rip), %rsi      # 0x342c
leaq 0x16d9(%rip), %rcx      # 0x34f3
movl $0xc3, %edx
callq 0x1050
leaq 0x16a8(%rip), %rdi      # 0x34d3
leaq 0x15fa(%rip), %rsi      # 0x342c
leaq 0x16ba(%rip), %rcx      # 0x34f3
movl $0xc9, %edx
callq 0x1050
leaq 0x1696(%rip), %rdi      # 0x34e0
leaq 0x15db(%rip), %rsi      # 0x342c
leaq 0x169b(%rip), %rcx      # 0x34f3
movl $0xca, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_count_less
size_t
bams_count_less(const BAMS * set, const void *key)
{
    SET_NODE *curr;
    size_t key_size;
    char *off;
    size_t less = 0;
    const void *tkey;

    assert(NULL != set);
    assert(NULL != key);

    curr = set->head;
    key_size = set->key_size;

    if (set->type == COPY_POINTER) {
        POINTER_ADDR(key, tkey);
    }

    while (NULL != curr) {
        off = (char *) bisect_left(key, curr->keys, curr->length,
                                   key_size, set->compare);
        assert(off >= (char *) curr->keys);
        less += off - (char *) curr->keys;
        curr = curr->next;
    }

    return (size_t) (less / key_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x1f08
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1f27
movq %rdi, %r14
movq 0x10(%rdi), %r13
cmpl $0x0, 0x20(%rdi)
jne 0x1e9c
leaq 0x8(%rsp), %rax
movq %rbx, (%rax)
movq %rax, %rbx
movq (%r14), %r15
xorl %r12d, %r12d
testq %r13, %r13
je 0x1ed3
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rsi
movq 0x8(%r14), %r8
movq %rbx, %rdi
movq %r15, %rcx
callq 0x1969
movq 0x10(%r13), %rcx
cmpq %rcx, %rax
jb 0x1ee9
addq %rax, %r12
subq %rcx, %r12
movq (%r13), %r13
jmp 0x1ea2
movq %r12, %rax
xorl %edx, %edx
divq %r15
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1659(%rip), %rdi      # 0x3549
leaq 0x1535(%rip), %rsi      # 0x342c
leaq 0x1618(%rip), %rcx      # 0x3516
movl $0xf3, %edx
callq 0x1050
leaq 0x1563(%rip), %rdi      # 0x3472
leaq 0x1516(%rip), %rsi      # 0x342c
leaq 0x15f9(%rip), %rcx      # 0x3516
movl $0xe6, %edx
callq 0x1050
leaq 0x1576(%rip), %rdi      # 0x34a4
leaq 0x14f7(%rip), %rsi      # 0x342c
leaq 0x15da(%rip), %rcx      # 0x3516
movl $0xe7, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_count_equal
size_t
bams_count_equal(const BAMS * set, const void *key)
{
    SET_NODE *curr;
    size_t key_size;
    char *low, *high;
    size_t equal = 0;
    const void *tkey;

    assert(NULL != set);
    assert(NULL != key);

    curr = set->head;
    key_size = set->key_size;

    if (set->type == COPY_POINTER) {
        POINTER_ADDR(key, tkey);
    }

    while (NULL != curr) {
        low = (char *) bisect_left(key, curr->keys, curr->length,
                                   key_size, set->compare);
        high = (char *) bisect_right(key, curr->keys, curr->length,
                                     key_size, set->compare);
        assert(high >= low);
        equal += high - low;
        curr = curr->next;
    }

    return (size_t) (equal / key_size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1fff
movq %rsi, %rbx
testq %rsi, %rsi
je 0x201e
movq %rdi, %r14
movq 0x10(%rdi), %rbp
cmpl $0x0, 0x20(%rdi)
jne 0x1f7c
movq %rsp, %rax
movq %rbx, (%rax)
movq %rax, %rbx
movq (%r14), %r15
xorl %r12d, %r12d
testq %rbp, %rbp
je 0x1fc9
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rsi
movq 0x8(%r14), %r8
movq %rbx, %rdi
movq %r15, %rcx
callq 0x1969
movq %rax, %r13
movq 0x8(%rbp), %rdx
movq 0x10(%rbp), %rsi
movq 0x8(%r14), %r8
movq %rbx, %rdi
movq %r15, %rcx
callq 0x1a38
cmpq %r13, %rax
jb 0x1fe0
subq %r13, %r12
addq %rax, %r12
movq (%rbp), %rbp
jmp 0x1f82
movq %r12, %rax
xorl %edx, %edx
divq %r15
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15b1(%rip), %rdi      # 0x3598
leaq 0x143e(%rip), %rsi      # 0x342c
leaq 0x156f(%rip), %rcx      # 0x3564
movl $0x113, %edx            # imm = 0x113
callq 0x1050
leaq 0x146c(%rip), %rdi      # 0x3472
leaq 0x141f(%rip), %rsi      # 0x342c
leaq 0x1550(%rip), %rcx      # 0x3564
movl $0x104, %edx            # imm = 0x104
callq 0x1050
leaq 0x147f(%rip), %rdi      # 0x34a4
leaq 0x1400(%rip), %rsi      # 0x342c
leaq 0x1531(%rip), %rcx      # 0x3564
movl $0x105, %edx            # imm = 0x105
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_count_great
size_t
bams_count_great(const BAMS * set, const void *key)
{
    SET_NODE *curr;
    size_t key_size;
    char *low, *high;
    size_t great = 0;
    const void *tkey;

    assert(NULL != set);
    assert(NULL != key);

    curr = set->head;
    key_size = set->key_size;

    if (set->type == COPY_POINTER) {
        POINTER_ADDR(key, tkey);
    }

    while (NULL != curr) {
        low = (char *) bisect_right(key, curr->keys, curr->length,
                                    key_size, set->compare);
        high = (char *) curr->keys + curr->length * key_size;
        assert(high >= low);
        great += high - low;
        curr = curr->next;
    }

    return (size_t) (great / key_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x20eb
movq %rsi, %rbx
testq %rsi, %rsi
je 0x210a
movq %rdi, %r14
movq 0x10(%rdi), %r13
cmpl $0x0, 0x20(%rdi)
jne 0x2077
leaq 0x8(%rsp), %rax
movq %rbx, (%rax)
movq %rax, %rbx
movq (%r14), %r15
xorl %r12d, %r12d
testq %r13, %r13
je 0x20b6
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rsi
movq 0x8(%r14), %r8
movq %rbx, %rdi
movq %r15, %rcx
callq 0x1a38
movq 0x8(%r13), %rcx
imulq %r15, %rcx
addq 0x10(%r13), %rcx
cmpq %rax, %rcx
jb 0x20cc
subq %rax, %r12
addq %rcx, %r12
movq (%r13), %r13
jmp 0x207d
movq %r12, %rax
xorl %edx, %edx
divq %r15
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x14c5(%rip), %rdi      # 0x3598
leaq 0x1352(%rip), %rsi      # 0x342c
leaq 0x14c3(%rip), %rcx      # 0x35a4
movl $0x132, %edx            # imm = 0x132
callq 0x1050
leaq 0x1380(%rip), %rdi      # 0x3472
leaq 0x1333(%rip), %rsi      # 0x342c
leaq 0x14a4(%rip), %rcx      # 0x35a4
movl $0x124, %edx            # imm = 0x124
callq 0x1050
leaq 0x1393(%rip), %rdi      # 0x34a4
leaq 0x1314(%rip), %rsi      # 0x342c
leaq 0x1485(%rip), %rcx      # 0x35a4
movl $0x125, %edx            # imm = 0x125
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_less
void *
bams_less(const BAMS * set, const void *key, size_t *key_num)
{
    SET_NODE *curr;
    size_t key_size;
    char *off;
    char *r = NULL;
    char *t;
    size_t less = 0;
    const void *tkey;

    assert(NULL != set);
    assert(NULL != key);
    assert(NULL != key_num);

    curr = set->head;
    key_size = set->key_size;

    if (set->type == COPY_POINTER) {
        POINTER_ADDR(key, tkey);
    }

    *key_num = 0;
    while (NULL != curr) {
        off = (char *) bisect_left(key, curr->keys, curr->length,
                                   key_size, set->compare);
        assert(off >= (char *) curr->keys);
        less = (size_t) ((off - (char *) curr->keys) / key_size);
        if (less > 0) {
            t = merge_into(r, *key_num, curr->keys, less,
                           key_size, set->compare);
            /*
             * free(r); 
             */
            r = t;
            *key_num += less;
        }
        curr = curr->next;
    }

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
testq %rdi, %rdi
je 0x2227
movq %rsi, %r13
testq %rsi, %rsi
je 0x2246
cmpq $0x0, 0x8(%rsp)
je 0x2265
movq %rdi, %r15
movq 0x10(%rdi), %rbx
cmpl $0x0, 0x20(%rdi)
jne 0x2175
leaq 0x10(%rsp), %rax
movq %r13, (%rax)
movq %rax, %r13
movq (%r15), %r12
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
testq %rbx, %rbx
je 0x21ed
movq $0x0, (%rsp)
movq 0x8(%rsp), %r14
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
movq 0x8(%r15), %r8
movq %r13, %rdi
movq %r12, %rcx
callq 0x1969
movq 0x10(%rbx), %rcx
subq %rcx, %rax
jb 0x2208
cmpq %rax, %r12
ja 0x21e3
xorl %edx, %edx
divq %r12
movq %rax, %rbp
movq (%r14), %rsi
movq 0x8(%r15), %r9
movq (%rsp), %rdi
movq %rcx, %rdx
movq %rax, %rcx
movq %r12, %r8
callq 0x1801
movq %rax, (%rsp)
addq %rbp, (%r14)
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x2196
jmp 0x21f5
movq $0x0, (%rsp)
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x133a(%rip), %rdi      # 0x3549
leaq 0x1216(%rip), %rsi      # 0x342c
leaq 0x13bb(%rip), %rcx      # 0x35d8
movl $0x154, %edx            # imm = 0x154
callq 0x1050
leaq 0x1244(%rip), %rdi      # 0x3472
leaq 0x11f7(%rip), %rsi      # 0x342c
leaq 0x139c(%rip), %rcx      # 0x35d8
movl $0x145, %edx            # imm = 0x145
callq 0x1050
leaq 0x1257(%rip), %rdi      # 0x34a4
leaq 0x11d8(%rip), %rsi      # 0x342c
leaq 0x137d(%rip), %rcx      # 0x35d8
movl $0x146, %edx            # imm = 0x146
callq 0x1050
leaq 0x13a2(%rip), %rdi      # 0x360e
leaq 0x11b9(%rip), %rsi      # 0x342c
leaq 0x135e(%rip), %rcx      # 0x35d8
movl $0x147, %edx            # imm = 0x147
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_great
void *
bams_great(const BAMS * set, const void *key, size_t *key_num)
{
    SET_NODE *curr;
    size_t key_size;
    char *low, *high;
    char *r = NULL;
    char *t;
    size_t great = 0;
    const void *tkey;

    assert(NULL != set);
    assert(NULL != key);
    assert(NULL != key_num);

    curr = set->head;
    key_size = set->key_size;

    if (set->type == COPY_POINTER) {
        POINTER_ADDR(key, tkey);
    }

    *key_num = 0;
    while (NULL != curr) {
        low = (char *) bisect_right(key, curr->keys, curr->length,
                                    key_size, set->compare);
        high = (char *) curr->keys + curr->length * key_size;
        assert(high >= low);
        great = (size_t) ((high - low) / key_size);
        if (great > 0) {
            t = merge_into(r, *key_num, low, great,
                           key_size, set->compare);
            /*
             * free(r); 
             */
            r = t;
            *key_num += great;
        }
        curr = curr->next;
    }

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
testq %rdi, %rdi
je 0x2556
movq %rsi, %r13
testq %rsi, %rsi
je 0x2575
cmpq $0x0, 0x8(%rsp)
je 0x2594
movq %rdi, %r15
movq 0x10(%rdi), %rbx
cmpl $0x0, 0x20(%rdi)
jne 0x2499
leaq 0x10(%rsp), %rax
movq %r13, (%rax)
movq %rax, %r13
movq (%r15), %r12
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
testq %rbx, %rbx
je 0x251c
movq $0x0, (%rsp)
movq 0x8(%rsp), %r14
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
movq 0x8(%r15), %r8
movq %r13, %rdi
movq %r12, %rcx
callq 0x1a38
movq %rax, %rcx
movq 0x8(%rbx), %rax
imulq %r12, %rax
addq 0x10(%rbx), %rax
subq %rcx, %rax
jb 0x2537
cmpq %rax, %r12
ja 0x2512
xorl %edx, %edx
divq %r12
movq %rax, %rbp
movq (%r14), %rsi
movq 0x8(%r15), %r9
movq (%rsp), %rdi
movq %rcx, %rdx
movq %rax, %rcx
movq %r12, %r8
callq 0x1801
movq %rax, (%rsp)
addq %rbp, (%r14)
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x24ba
jmp 0x2524
movq $0x0, (%rsp)
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x105a(%rip), %rdi      # 0x3598
leaq 0xee7(%rip), %rsi       # 0x342c
leaq 0x1113(%rip), %rcx      # 0x365f
movl $0x1aa, %edx            # imm = 0x1AA
callq 0x1050
leaq 0xf15(%rip), %rdi       # 0x3472
leaq 0xec8(%rip), %rsi       # 0x342c
leaq 0x10f4(%rip), %rcx      # 0x365f
movl $0x19a, %edx            # imm = 0x19A
callq 0x1050
leaq 0xf28(%rip), %rdi       # 0x34a4
leaq 0xea9(%rip), %rsi       # 0x342c
leaq 0x10d5(%rip), %rcx      # 0x365f
movl $0x19b, %edx            # imm = 0x19B
callq 0x1050
leaq 0x1073(%rip), %rdi      # 0x360e
leaq 0xe8a(%rip), %rsi       # 0x342c
leaq 0x10b6(%rip), %rcx      # 0x365f
movl $0x19c, %edx            # imm = 0x19C
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_array
void *
bams_array(const BAMS * set, size_t *key_num)
{
    SET_NODE *curr;
    char *r = NULL;
    char *t;

    assert(NULL != set);
    assert(NULL != key_num);

    curr = set->head;
    *key_num = 0;
    while (NULL != curr) {
        t = merge_into(r, *key_num, curr->keys, curr->length,
                       set->key_size, set->compare);
        /*
         * free(r); 
         */
        r = t;
        *key_num += curr->length;
        curr = curr->next;
    }

    return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x260f
movq %rsi, %rbx
testq %rsi, %rsi
je 0x262e
movq %rdi, %r14
movq 0x10(%rdi), %r15
movq $0x0, (%rbx)
testq %r15, %r15
je 0x2607
xorl %esi, %esi
xorl %eax, %eax
movq 0x8(%r15), %rcx
movq 0x10(%r15), %rdx
movq (%r14), %r8
movq 0x8(%r14), %r9
movq %rax, %rdi
callq 0x1801
movq (%rbx), %rsi
addq 0x8(%r15), %rsi
movq %rsi, (%rbx)
movq (%r15), %r15
testq %r15, %r15
jne 0x25dc
jmp 0x2609
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xe5c(%rip), %rdi       # 0x3472
leaq 0xe0f(%rip), %rsi       # 0x342c
leaq 0x1072(%rip), %rcx      # 0x3696
movl $0x1c2, %edx            # imm = 0x1C2
callq 0x1050
leaq 0xfd9(%rip), %rdi       # 0x360e
leaq 0xdf0(%rip), %rsi       # 0x342c
leaq 0x1053(%rip), %rcx      # 0x3696
movl $0x1c3, %edx            # imm = 0x1C3
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_clear
void
bams_clear(BAMS * set)
{
    SET_NODE *curr;
    SET_NODE *next;

    assert(NULL != set);

    curr = set->head;
    while (NULL != curr) {
        next = curr->next;
        free(curr->keys);
        free(curr);
        curr = next;
    }
    set->head = NULL;
    set->size = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x26b9
movq %rdi, %rbx
movq 0x10(%rdi), %r14
addq $0x10, %rbx
testq %r14, %r14
je 0x26ad
movq (%r14), %r15
movq 0x10(%r14), %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
testq %r15, %r15
jne 0x2691
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0xdb2(%rip), %rdi       # 0x3472
leaq 0xd65(%rip), %rsi       # 0x342c
leaq 0x1010(%rip), %rcx      # 0x36de
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_free
void
bams_free(BAMS * set)
{
    SET_NODE *curr;
    SET_NODE *next;

    assert(NULL != set);

    curr = set->head;
    while (NULL != curr) {
        next = curr->next;
        free(curr->keys);
        free(curr);
        curr = next;
    }
    free(set);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2717
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x270a
movq (%r14), %r15
movq 0x10(%r14), %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
testq %r15, %r15
jne 0x26ee
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
leaq 0xd54(%rip), %rdi       # 0x3472
leaq 0xd07(%rip), %rsi       # 0x342c
leaq 0xfca(%rip), %rcx       # 0x36f6
movl $0x1f6, %edx            # imm = 0x1F6
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/JulStrat[P]bams/bams.c
// Function: bams_check_structure
int
bams_check_structure(const BAMS * set)
{
    SET_NODE *curr;
    char *off;

    size_t set_size = 0;
    size_t node_len = 0;
    size_t key_size;

    assert(NULL != set);

    curr = set->head;
    key_size = set->key_size;

    while (NULL != curr) {
        if ((node_len >= curr->length) || (0 == curr->length)) {
            return 1;
        }
        /*
         * check if node length is power of two 
         */
        node_len = curr->length;
        /*
         * printf("node len: %d\n", node_len); 
         */
        while (0 == (node_len & 1)) {
            node_len >>= 1;
        }
        if (node_len > 1) {
            return 2;
        }
        node_len = curr->length;
        set_size += node_len;

        /*
         * check current node keys 
         */
        off = (char *) (curr->keys);
        while (node_len-- > 1) {
            if ((set->compare) (off, off + key_size) > 0) {
                return 3;
            }
            off += key_size;
        }

        curr = curr->next;
    }
    if (set_size != set->size) {
        return 4;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x27df
movq %rdi, %rbx
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0x27b3
movq (%rbx), %r13
xorl %r15d, %r15d
movq 0x8(%r12), %rbp
testq %rbp, %rbp
je 0x27d1
movq %rbp, %rax
movq %rax, %rcx
shrq %rax
testb $0x1, %cl
je 0x2769
cmpq $0x1, %rcx
ja 0x27d8
addq %rbp, %r15
movq 0x10(%r12), %rdi
incq %rbp
decq %rbp
cmpq $0x2, %rbp
jb 0x27a1
leaq (%rdi,%r13), %r14
movq %r14, %rsi
callq *0x8(%rbx)
movq %r14, %rdi
testl %eax, %eax
jle 0x2785
jmp 0x27ac
movq (%r12), %r12
testq %r12, %r12
jne 0x275c
jmp 0x27b6
movl $0x3, %eax
jmp 0x27c2
xorl %r15d, %r15d
xorl %eax, %eax
cmpq 0x18(%rbx), %r15
setne %al
shll $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x27c2
movl $0x2, %eax
jmp 0x27c2
leaq 0xc8c(%rip), %rdi       # 0x3472
leaq 0xc3f(%rip), %rsi       # 0x342c
leaq 0xf19(%rip), %rcx       # 0x370d
movl $0x20c, %edx            # imm = 0x20C
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/key.c
// Function: SH_Key__init
SH_Key*
SH_Key__init(sh_char_t* value, size_t n, int* err) {
	SH_Key* obj;
	sh_char_t* ptr;
	sh_char_t  c;
	size_t m;

	__cascade(err, (SH_Key*)0);

	if (n < 1 || n > SH_KEY_LENGTH_MAX) {
		__raise(err, SH_E_KEY_TOO_LONG);
		return (SH_Key*)0;
	}

	if (*value < (sh_char_t)'a' || *value > (sh_char_t)'z') {
		__raise(err, SH_E_KEY_BAD_CHAR);
		return (SH_Key*)0;
	}

	ptr = value;
	m = 0;
	while (m < n) {
		c = *ptr;
		if (
				(c >= (sh_char_t)'a' && c <= (sh_char_t)'z') ||
				(c >= (sh_char_t)'0' && c <= (sh_char_t)'9') ||
				 c == (sh_char_t)'_' || c == (sh_char_t)'-' || c == (sh_char_t)'*') {
			ptr++;
			m++;
		} else {
			__raise(err, SH_E_KEY_BAD_CHAR);
			return (SH_Key*)0;
		}
	}

	obj = (SH_Key*)malloc(sizeof(SH_Key));
	if ((SH_Key*)0 == obj) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (SH_Key*)0;
	}

	obj->value = (sh_char_t*)calloc(sizeof(sh_char_t), m + 1);
	if ((sh_char_t*)0 == obj->value) {
		free(obj);
		__raise(err, SH_E_MALLOC_ERROR);
		return (SH_Key*)0;
	}

	memcpy((void*)obj->value, (const void*)value, m);
	obj->length = m;

	__clear(err);
	return obj;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
je 0x1168
cmpl $0x0, (%rbx)
jne 0x117b
leaq -0x41(%r14), %rax
cmpq $-0x40, %rax
jae 0x1183
movl $0x200001, %eax         # imm = 0x200001
jmp 0x1191
leaq -0x41(%r14), %rax
cmpq $-0x40, %rax
jb 0x117b
movb (%r15), %al
addb $-0x7b, %al
cmpb $-0x1a, %al
jae 0x1199
xorl %r12d, %r12d
jmp 0x1245
movb (%r15), %al
addb $-0x7b, %al
cmpb $-0x1a, %al
jae 0x1199
movl $0x200002, %eax         # imm = 0x200002
xorl %r12d, %r12d
jmp 0x1243
xorl %eax, %eax
movabsq $0x20000000000009, %rcx # imm = 0x20000000000009
movb (%r15,%rax), %dl
leal -0x61(%rdx), %esi
cmpb $0x1a, %sil
setb %sil
leal -0x30(%rdx), %edi
cmpb $0xa, %dil
setb %dil
orb %sil, %dil
jne 0x11d5
movzbl %dl, %edx
addl $-0x2a, %edx
cmpl $0x35, %edx
ja 0x1236
btq %rdx, %rcx
jae 0x1236
incq %rax
cmpq %rax, %r14
jne 0x11a5
movl $0x10, %edi
callq 0x1060
testq %rax, %rax
je 0x121d
movq %rax, %r12
leaq 0x1(%r14), %rsi
movl $0x1, %edi
callq 0x1040
movq %rax, (%r12)
testq %rax, %rax
je 0x1224
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1050
xorl %eax, %eax
movq %r14, 0x8(%r12)
jmp 0x123e
movl $0x80000001, %eax       # imm = 0x80000001
jmp 0x123b
movq %r12, %rdi
callq 0x1030
xorl %r12d, %r12d
movl $0x80000001, %eax       # imm = 0x80000001
jmp 0x123e
movl $0x200002, %eax         # imm = 0x200002
xorl %r12d, %r12d
testq %rbx, %rbx
je 0x1245
movl %eax, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/key.c
// Function: SH_Key__destroy
void
SH_Key__destroy(SH_Key* obj, int* err) {
	__cascade(err,);
	if ((sh_char_t*)0 != obj->value) {
		free(obj->value);
	}
	free(obj);
	__clear(err);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x1268
cmpl $0x0, (%rbx)
jne 0x1288
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1275
callq 0x1030
movq %r14, %rdi
callq 0x1030
testq %rbx, %rbx
je 0x1288
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/key.c
// Function: SH_Key__hash
uint8_t
SH_Key__hash(SH_Key* obj, int* err) {
	size_t buflen;
	uint8_t* ptr;
	uint8_t hsh = UINT8_C(1);

	__cascade(err, UINT8_C(0));

	buflen = obj->length; /* assumes sizeof(uint8_t) and sizeof(sh_char_t) are both 1 */
	ptr = (uint8_t*)(obj->value);

	for (; buflen > 0; buflen--) {
		hsh = (hsh << 3) | (hsh >> 5);
		hsh ^= (uint8_t)*ptr;
		ptr++;
	}

	__clear(err);
	return hsh;
}

// Assembly:
testq %rsi, %rsi
je 0x129d
cmpl $0x0, (%rsi)
je 0x129d
xorl %eax, %eax
retq
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x12bd
movq (%rdi), %rdx
movb $0x1, %al
xorl %edi, %edi
rolb $0x3, %al
xorb (%rdx,%rdi), %al
incq %rdi
cmpq %rdi, %rcx
jne 0x12ad
jmp 0x12bf
movb $0x1, %al
testq %rsi, %rsi
je 0x129c
movl $0x0, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/key.c
// Function: SH_Key__equal
sh_bool_t
SH_Key__equal(SH_Key* obj, SH_Key* other, int* err) {
	size_t i;

	__cascade(err, SH_FALSE);

	if (obj->length != other->length) {
		__clear(err);
		return SH_FALSE;
	}

	for (i = 0; i < obj->length; i++) {
		if (obj->value[i] != other->value[i]) {
			__clear(err);
			return SH_FALSE;
		}
	}

	__clear(err);
	return SH_TRUE;
}

// Assembly:
testq %rdx, %rdx
je 0x12e3
cmpl $0x0, (%rdx)
jne 0x1310
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
je 0x12ed
xorl %eax, %eax
jmp 0x131a
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
jne 0x1310
testq %rax, %rax
je 0x130c
movq (%rdi), %rcx
movq (%rsi), %rsi
xorl %edi, %edi
movb (%rcx,%rdi), %r8b
cmpb (%rsi,%rdi), %r8b
jne 0x1313
incq %rdi
cmpq %rdi, %rax
jne 0x12fa
movb $-0x1, %al
jmp 0x1315
xorl %eax, %eax
retq
xorl %eax, %eax
testq %rdx, %rdx
je 0x1312
movl $0x0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/key.c
// Function: SH_Key__to_s
sh_char_t*
SH_Key__to_s(SH_Key* obj, int* err) {
	sh_char_t* str;

	__cascade(err, (sh_char_t*)0);

	str = (sh_char_t*)malloc(sizeof(sh_char_t) * (obj->length + 1)); /*FIXME*/
	if ((sh_char_t*)0 == str) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (sh_char_t*)0;
	}

	memcpy((void*)str, (const void*)(obj->value), obj->length + 1);

	__clear(err);
	return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
testq %rsi, %rsi
je 0x133e
cmpl $0x0, (%rbx)
je 0x133e
xorl %r14d, %r14d
jmp 0x1376
movq 0x8(%r15), %r12
incq %r12
movq %r12, %rdi
callq 0x1060
testq %rax, %rax
je 0x1367
movq %rax, %r14
movq (%r15), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x1050
xorl %eax, %eax
jmp 0x136f
movl $0x80000001, %eax       # imm = 0x80000001
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x1376
movl %eax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Liutos[P]Eloquent/cv_main.c
// Function: main
int main(int argc, char *argv[])
{
    lexer_t *lexer = lexer_new(stdin);
    parser_t *parser = parser_new(lexer);
    compiler_t *comp = compiler_new();
    vm_t *vm = vm_new();
    ast_t *ast = NULL;
    ast_kind_t kind = prompt(parser, &ast);
    while (kind != AST_INVALID) {
        if (kind == AST_END_OF_FILE)
            break;
        fprintf(stdout, "AST > ");
        fflush(stdout);
        ast_print(ast, stdout);
        fputc('\n', stdout);

        ins_t *ins = ins_new();
        if (compiler_do(comp, ast, ins) == 1) {
            fprintf(stdout, "BYTECODE >\n");
            ins_pretty_print(ins, stdout, 0);

            fprintf(stdout, "VM >\n");
            vm_execute(vm, ins);

            ins = ins_new();
            vm_inject_print(ins);
            vm_execute(vm, ins);
        } else
            fprintf(stdout, "Compiler error: %s\n", comp->error->text);
        kind = prompt(parser, &ast);
    }
    fputc('\n', stdout);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8c8a(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x5aac
movq %rax, %rdi
callq 0x53f4
movq %rax, %rbx
callq 0x4a74
movq %rax, %r14
callq 0x2978
movq %rax, %r15
movq %rsp, %r12
movq $0x0, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x24aa
movq 0x8c42(%rip), %r13      # 0xafd0
testl %eax, %eax
je 0x248b
cmpl $0x3, %eax
je 0x248b
movq (%r13), %rcx
movl $0x6, %esi
movl $0x1, %edx
leaq 0x4c50(%rip), %rdi      # 0x7004
callq 0x2140
movq (%r13), %rdi
callq 0x20f0
movq (%rsp), %rdi
movq (%r13), %rsi
callq 0x5956
movq (%r13), %rsi
movl $0xa, %edi
callq 0x20a0
callq 0x61aa
movq %rax, %rbp
movq (%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x50ed
movq (%r13), %rcx
cmpl $0x1, %eax
jne 0x2463
movl $0xb, %esi
movl $0x1, %edx
leaq 0x4bfd(%rip), %rdi      # 0x700b
callq 0x2140
movq (%r13), %rsi
movq %rbp, %rdi
xorl %edx, %edx
callq 0x490a
movq (%r13), %rcx
movl $0x5, %esi
movl $0x1, %edx
leaq 0x4be1(%rip), %rdi      # 0x7017
callq 0x2140
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2a2b
callq 0x61aa
movq %rax, %rbp
movq %rax, %rdi
callq 0x30f0
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2a2b
jmp 0x247b
movq 0x30(%r14), %rax
movq (%rax), %rdx
movq %rcx, %rdi
leaq 0x4ba9(%rip), %rsi      # 0x701d
xorl %eax, %eax
callq 0x20d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x24aa
jmp 0x238e
movq (%r13), %rsi
movl $0xa, %edi
callq 0x20a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Liutos[P]Eloquent/value.c
// Function: value_error_new
value_t *value_error_new(const char *msg)
{
    value_t *v = value_alloc(VALUE_ERROR);
    v->u.err_val.msg = string_new();
    string_assign(v->u.err_val.msg, msg);
    return v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x30, %edi
callq 0x20e0
movq %rax, %r14
movl $0x2, (%rax)
callq 0x5fdf
movq %rax, 0x8(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x606b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Liutos[P]Eloquent/ident.c
// Function: ident_intern
ident_t *ident_intern(const char *name)
{
    if (ident_table == NULL)
        ident_table = ident_table_new();
    ident_t *id = hash_table_get(ident_table, (void *)name, NULL);
    if (id == NULL) {
        id = ident_new(name);
        hash_table_set(ident_table, (void *)name, id);
    }
    return id;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8a0a(%rip), %rdi      # 0xb310
testq %rdi, %rdi
jne 0x2928
leaq 0x34b3(%rip), %rdi      # 0x5dc5
leaq 0x34da(%rip), %rsi      # 0x5df3
callq 0x5c70
movq %rax, %rdi
movq %rax, 0x89e8(%rip)      # 0xb310
movq %rbx, %rsi
xorl %edx, %edx
callq 0x5d56
movq %rax, %r14
testq %rax, %rax
jne 0x296c
movl $0x18, %edi
callq 0x20e0
movq %rax, %r14
movq %rax, %rdi
callq 0x5fb4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x606b
movq 0x89af(%rip), %rdi      # 0xb310
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5cd0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Liutos[P]Eloquent/vm.c
// Function: vm_new
vm_t *vm_new(void)
{
    vm_t *vm = malloc(sizeof(*vm));
    vm->depth = 0;
    vm->ip = 0;
    /* Environments */
    vm->denv = env_new(env_empty_new());
    vm->env = env_new(env_empty_new());
    vm->init_env = elo_extend_env(env_new(env_empty_new()));
    vm->global_env = vm->init_env;

    vm->traced_objs = hash_table_new(hash_ptr, comp_ptr);
    vm->stack = stack_new();
    vm->sys_stack = stack_new();
    return vm;
}

// Assembly:
pushq %rbx
movl $0x48, %edi
callq 0x20e0
movq %rax, %rbx
movq $0x0, (%rax)
callq 0x5568
movq %rax, %rdi
callq 0x556b
movq %rax, 0x8(%rbx)
callq 0x5568
movq %rax, %rdi
callq 0x556b
movq %rax, 0x10(%rbx)
callq 0x5568
movq %rax, %rdi
callq 0x556b
movq %rax, %rdi
callq 0x36fd
movq %rax, 0x20(%rbx)
movq %rax, 0x18(%rbx)
leaq 0x33ee(%rip), %rdi      # 0x5dc1
leaq 0x3410(%rip), %rsi      # 0x5dea
callq 0x5c70
movq %rax, 0x28(%rbx)
callq 0x61aa
movq %rax, 0x30(%rbx)
callq 0x61aa
movq %rax, 0x38(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Liutos[P]Eloquent/vm.c
// Function: vm_free
void vm_free(vm_t *vm)
{
    env_free(vm->denv);
    env_free(vm->env);
    stack_free(vm->stack);
    stack_free(vm->sys_stack);
    free(vm);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x5596
movq 0x10(%rbx), %rdi
callq 0x5596
movq 0x30(%rbx), %rdi
callq 0x61b9
movq 0x38(%rbx), %rdi
callq 0x61b9
movq %rbx, %rdi
popq %rbx
jmp 0x2030