LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_new
struct shmqueue *
shmqueue_new(int shmid, size_t size, int reuse, int verbose)
{
	struct shmqueue *shmqueue;
	void *mem;
	int id, rc;

	if (size == 0) {
		id = shmget(shmid, size, 0);
	} else {
		id = shmget(shmid, size,
#ifdef SHM_HUGETLB
//		    SHM_HUGETLB |
#endif
		    IPC_EXCL | IPC_CREAT | 0666);
		reuse = 0;
	}
	if (id == -1)
		return NULL;

	mem = shmat(id, NULL, 0);
	if (mem == NULL)
		return NULL;

	if (verbose) {
		printf("shmid = %d\n", id);
	}

	shmqueue = malloc(sizeof(struct shmqueue));
	if (shmqueue == NULL)
		return NULL;

	if (!reuse) {
		if (verbose) {
			printf("create memory: %p[%llu]\n", mem, (unsigned long long)size);
		}
		if (shmqueue_create(shmqueue, mem, size) < 0) {
			rc = shmctl(id, IPC_RMID, NULL);
			return NULL;
		}
	} else {
		if (shmqueue_attach(shmqueue, mem) < 0) {
			rc = shmctl(id, IPC_RMID, NULL);
			return NULL;
		}
		if (verbose) {
			printf("attach memory: %p[%llu]\n", mem, (unsigned long long)shmqueue->header->sha_memsize);
		}
	}
	return shmqueue;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rsi, %rbx
testq %rsi, %rsi
je 0x184b
movq %rbx, %rsi
movl $0x7b6, %edx            # imm = 0x7B6
callq 0x1100
movl %eax, %ebp
movb $0x1, %r13b
jmp 0x1860
movl %edx, %r14d
xorl %esi, %esi
xorl %edx, %edx
callq 0x1100
movl %eax, %ebp
testl %r14d, %r14d
sete %r13b
cmpl $-0x1, %ebp
je 0x18e2
xorl %r14d, %r14d
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10f0
testq %rax, %rax
je 0x18e5
movq %rax, %r12
testl %r15d, %r15d
je 0x1890
leaq 0x1a32(%rip), %rdi      # 0x32b9
movl %ebp, %esi
xorl %eax, %eax
callq 0x1070
movl $0x10, %edi
callq 0x10c0
testq %rax, %rax
je 0x18e2
movq %rax, %r14
testb %r13b, %r13b
je 0x18f7
testl %r15d, %r15d
je 0x18c0
leaq 0x1a12(%rip), %rdi      # 0x32c5
movq %r12, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1070
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1922
testl %eax, %eax
jns 0x18e5
xorl %r14d, %r14d
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10d0
jmp 0x18e5
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, (%r14)
leaq -0x61d(%rip), %rax      # 0x12e4
movq %rax, 0x8(%r14)
testl %r15d, %r15d
je 0x18e5
movq 0x20(%r12), %rdx
leaq 0x19c8(%rip), %rdi      # 0x32de
movq %r12, %rsi
xorl %eax, %eax
callq 0x1070
jmp 0x18e5
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_init
void
shmqueue_init(struct shmqueue_header *header)
{
	int i;

	/* init queue headers */
	RTAILQ_INIT(&header->sha_freelist);
	RTAILQ_INIT(&header->sha_lrulist);

	for (i = 0; i < header->sha_hashnum; i++)
		RTAILQ_INIT(&header->sha_hashlist[i]);

	/* insert all itempool to freelist */
	header->sha_item_inuse = 0;
	for (i = 0; i < header->sha_itemnum; i++) {
		RTAILQ_INSERT_TAIL(&header->sha_freelist,
		    &header->sha_pool[i], shmqueue_item, shi_list);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl 0x28(%rdi), %edx
testq %rdx, %rdx
je 0x1ae5
leaq 0x150(%rbx), %rdi
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x1080
movl $0x0, 0x34(%rbx)
cmpl $0x0, 0x30(%rbx)
je 0x1b3b
movq %rbx, %rax
negq %rax
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x38(%rbx), %rsi
movq $0x0, (%rsi,%rcx)
movq 0x8(%rbx), %rsi
movq 0x38(%rbx), %rdi
movq %rsi, 0x8(%rdi,%rcx)
leaq (%rax,%rcx), %rsi
addq 0x38(%rbx), %rsi
movq 0x8(%rbx), %rdi
movq %rsi, (%rdi,%rbx)
movq %rsi, 0x8(%rbx)
incq %rdx
movl 0x30(%rbx), %esi
addq $0x800, %rcx            # imm = 0x800
cmpq %rsi, %rdx
jb 0x1afc
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_remove_from_freelist
struct shmqueue_item *
shmqueue_remove_from_freelist(struct shmqueue *shmq_header)
{
	struct shmqueue_header *header;
	struct shmqueue_item *item;

	header = shmq_header->header;

	shmqueue_lock(shmq_header);

	item = RTAILQ_FIRST(&header->sha_freelist, shmqueue_item);
	if (item == NULL) {
		shmqueue_unlock(shmq_header);
		return NULL;
	}

	/* remove from FREE list */
	RTAILQ_REMOVE(&header->sha_freelist,
	    item, shmqueue_item, shi_list);

	shmqueue_unlock(shmq_header);

	item->shi_hashidx = 0;
	item->shi_keyvalue.kv_keysize = 1;
	item->shi_keyvalue.kv_storagesize = 0;
	item->shi_keyvalue.kv_data[0] = '\0';

	return item;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rdi), %r15
leaq 0x148(%r15), %rdi
callq 0x2694
movq (%r15), %rbx
leaq (%rbx,%r15), %rax
testq %rbx, %rbx
cmovneq %rax, %rbx
testq %rbx, %rbx
je 0x1bb5
movq (%rbx), %rax
leaq (%rax,%r15), %rcx
testq %rax, %rax
cmoveq %r15, %rcx
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rcx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, (%rcx,%r15)
movl $0x148, %edi            # imm = 0x148
addq (%r14), %rdi
callq 0x26b4
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
movb $0x0, 0x2c(%rbx)
jmp 0x1bc4
movl $0x148, %edi            # imm = 0x148
addq (%r14), %rdi
callq 0x26b4
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_add_to_lru
int
shmqueue_add_to_lru(struct shmqueue *shmq_header, struct shmqueue_item *item, uint32_t hashidx)
{
	struct shmqueue_header *header;

	header = shmq_header->header;
	item->shi_hashidx = hashidx;

	shmqueue_lock(shmq_header);

	/* insert to LRU list */
	RTAILQ_INSERT_HEAD(&header->sha_lrulist,
	    item, shmqueue_item, shi_list);

	/* insert to HASH list */
	RTAILQ_INSERT_HEAD(&header->sha_hashlist[item->shi_hashidx],
	    item, shmqueue_item, shi_hashlist);

	header->sha_item_inuse++;

	shmqueue_unlock(shmq_header);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
movl %edx, 0x20(%rsi)
movl $0x148, %edi            # imm = 0x148
addq (%rbx), %rdi
callq 0x2694
leaq 0x10(%r15), %rcx
movq 0x10(%r15), %rdx
movq %rdx, (%r14)
movq %r14, %rax
subq %rcx, %rax
testq %rdx, %rdx
je 0x1c0d
movq (%rcx), %rdx
addq %rdx, %rcx
addq $0x8, %rcx
jmp 0x1c11
leaq 0x18(%r15), %rcx
movq %rax, (%rcx)
movq %rax, 0x10(%r15)
movq $0x0, 0x8(%r14)
leaq 0x150(%r15), %rax
movl 0x20(%r14), %edx
shlq $0x4, %rdx
leaq (%r15,%rdx), %rcx
addq $0x150, %rcx            # imm = 0x150
movq 0x150(%r15,%rdx), %rsi
leaq 0x10(%r14), %rdx
movq %rsi, 0x10(%r14)
testq %rsi, %rsi
je 0x1c5b
movq (%rcx), %rsi
addq %rcx, %rsi
addq $0x18, %rsi
jmp 0x1c5f
leaq 0x8(%rcx), %rsi
subq %rcx, %rdx
movq %rdx, (%rsi)
movl 0x20(%r14), %ecx
shlq $0x4, %rcx
movq %r14, %rsi
subq %rax, %rsi
subq %rcx, %rsi
movq %rsi, (%rax,%rcx)
movq $0x0, 0x18(%r14)
incl 0x34(%r15)
movl $0x148, %edi            # imm = 0x148
addq (%rbx), %rdi
callq 0x26b4
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_remove_from_lru
struct shmqueue_item *
shmqueue_remove_from_lru(struct shmqueue *shmq_header)
{
	struct shmqueue_header *header;
	struct shmqueue_item *item;

	header = shmq_header->header;

	shmqueue_lock(shmq_header);

	/* get tail of LRU list */
	item = RTAILQ_LAST(&header->sha_lrulist, shmqueue_item);
	if (item == NULL) {
		shmqueue_unlock(shmq_header);
		return NULL;
	}

	/* remove from LRU list */
	RTAILQ_REMOVE(&header->sha_lrulist,
	    item, shmqueue_item, shi_list);

	/* remove from HASH list */
	RTAILQ_REMOVE(&header->sha_hashlist[item->shi_hashidx],
	    item, shmqueue_item, shi_hashlist);

	header->sha_item_inuse--;

	shmqueue_unlock(shmq_header);

	return item;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x148(%r15), %rdi
callq 0x2694
movq 0x18(%r15), %rax
movq 0x18(%rax,%r15), %rax
movq 0x10(%rax,%r15), %rax
testq %rax, %rax
leaq 0x10(%rax,%r15), %r14
cmoveq %rax, %r14
testq %r14, %r14
je 0x1d4e
leaq 0x10(%r15), %rax
leaq 0x18(%r15), %rcx
movq (%r14), %rdx
movq 0x8(%r14), %rsi
testq %rdx, %rdx
leaq 0x8(%rdx,%rax), %rax
cmoveq %rcx, %rax
movq %rsi, (%rax)
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rax, 0x10(%r15,%rcx)
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
movl 0x20(%r14), %edx
shlq $0x4, %rdx
testq %rax, %rax
leaq 0x158(%r15,%rdx), %rsi
leaq 0x150(%r15,%rdx), %rdx
leaq 0x18(%rax,%rdx), %rax
cmoveq %rsi, %rax
movq %rcx, (%rax)
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
movl 0x20(%r14), %edx
shlq $0x4, %rdx
addq %r15, %rdx
addq $0x150, %rdx            # imm = 0x150
movq %rax, (%rcx,%rdx)
decl 0x34(%r15)
jmp 0x1d51
xorl %r14d, %r14d
movl $0x148, %edi            # imm = 0x148
addq (%rbx), %rdi
callq 0x26b4
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_add_to_freelist
void
shmqueue_add_to_freelist(struct shmqueue *shmq_header, struct shmqueue_item *item)
{
	struct shmqueue_header *header;

	header = shmq_header->header;

	shmqueue_lock(shmq_header);

	/* insert to FREE list */
	RTAILQ_INSERT_HEAD(&header->sha_freelist,
	    item, shmqueue_item, shi_list);

	shmqueue_unlock(shmq_header);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x148(%r15), %rdi
callq 0x2694
movq (%r15), %rcx
movq %rcx, (%r14)
movq %r15, %rax
testq %rcx, %rcx
je 0x1d95
movq (%r15), %rax
addq %r15, %rax
movq %r14, %rcx
subq %r15, %rcx
movq %rcx, 0x8(%rax)
movq %rcx, (%r15)
movq $0x0, 0x8(%r14)
movl $0x148, %edi            # imm = 0x148
addq (%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x26b4
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_keyvalue_peek
const struct keyvalue *
shmqueue_keyvalue_peek(struct shmqueue *shmq_header, uint8_t *key)
{
	struct shmqueue_header *header;
	struct shmqueue_item *item;
	uint32_t hashidx;

	header = shmq_header->header;
	hashidx = shmq_header->hash_callback(key) % header->sha_hashnum;

	shmqueue_lock(shmq_header);
	for (item = RTAILQ_FIRST(&header->sha_hashlist[hashidx], shmqueue_item);
	    item != NULL;
	    item = RTAILQ_NEXT(item, &header->sha_hashlist[hashidx], shmqueue_item, shi_hashlist)) {

		if (SHMQUEUE_STRCMP(KEYVALUE_KEY(&item->shi_keyvalue), key) == 0) {
			/* found! */

			/*
			 * move to top of LRU.
			 * delete from LRU, and insert to top
			 */
			RTAILQ_REMOVE(&header->sha_lrulist,
			    item, shmqueue_item, shi_list);
			RTAILQ_INSERT_HEAD(&header->sha_lrulist,
			    item, shmqueue_item, shi_list);

			/* update statistics */
			header->sha_stat.ss_fetch_success[SIZE2BUCKET(item->shi_keyvalue.kv_storagesize)]++;

			shmqueue_unlock(shmq_header);
			return &item->shi_keyvalue;
		}
	}

	/* update statistics */
	header->sha_stat.ss_fetch_failure++;

	shmqueue_unlock(shmq_header);
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r12
movq %rsi, %rdi
callq *0x8(%rbx)
xorl %edx, %edx
divl 0x28(%r12)
movl %edx, %r14d
movl $0x148, %edi            # imm = 0x148
addq (%rbx), %rdi
callq 0x2694
shlq $0x4, %r14
leaq (%r12,%r14), %r13
addq $0x150, %r13            # imm = 0x150
movq (%r13), %r14
testq %r14, %r14
sete %al
addq %r13, %r14
sete %cl
orb %al, %cl
jne 0x1e32
leaq 0x2c(%r14), %rdi
movq %r15, %rsi
callq 0x1090
testl %eax, %eax
je 0x1e41
movq 0x10(%r14), %rax
leaq (%rax,%r13), %r14
testq %rax, %rax
cmoveq %rax, %r14
testq %r14, %r14
jne 0x1e0e
addq $0x140, %r12            # imm = 0x140
xorl %r14d, %r14d
jmp 0x1ef8
movq (%r14), %rdx
movq 0x8(%r14), %rsi
leaq 0x18(%r12), %rax
leaq 0x10(%r12), %rcx
testq %rdx, %rdx
leaq 0x18(%rdx,%r12), %rdx
cmoveq %rax, %rdx
movq %rsi, (%rdx)
movq (%r14), %rdx
movq 0x8(%r14), %rsi
movq %rdx, 0x10(%rsi,%r12)
movq 0x10(%r12), %rsi
movq %rsi, (%r14)
movq %r14, %rdx
subq %rcx, %rdx
testq %rsi, %rsi
je 0x1e8a
movq (%rcx), %rax
addq %rcx, %rax
addq $0x8, %rax
movq %rdx, (%rax)
movq %rdx, 0x10(%r12)
movq $0x0, 0x8(%r14)
addq $0x100, %r12            # imm = 0x100
movl 0x28(%r14), %ecx
cmpl $0x3ff, %ecx            # imm = 0x3FF
ja 0x1ebf
cmpl $0xff, %ecx
ja 0x1ed4
xorl %eax, %eax
cmpl $0x7f, %ecx
seta %al
jmp 0x1ef0
cmpl $0xfff, %ecx            # imm = 0xFFF
ja 0x1ee1
cmpl $0x800, %ecx            # imm = 0x800
movl $0x5, %eax
jmp 0x1eec
cmpl $0x200, %ecx            # imm = 0x200
movl $0x3, %eax
jmp 0x1eec
cmpl $0x4000, %ecx           # imm = 0x4000
movl $0x7, %eax
sbbq $0x0, %rax
addq $0x24, %r14
leaq (%r12,%rax,8), %r12
incq (%r12)
movl $0x148, %edi            # imm = 0x148
addq (%rbx), %rdi
callq 0x26b4
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_keyvalue_delete
int
shmqueue_keyvalue_delete(struct shmqueue *shmq_header, uint8_t *key)
{
	struct shmqueue_header *header;
	struct shmqueue_item *item;
	uint32_t hashidx;

	header = shmq_header->header;
	hashidx = shmq_header->hash_callback(key) % header->sha_hashnum;

	shmqueue_lock(shmq_header);
	for (item = RTAILQ_FIRST(&header->sha_hashlist[hashidx], shmqueue_item);
	    item != NULL;
	    item = RTAILQ_NEXT(item, &header->sha_hashlist[hashidx], shmqueue_item, shi_hashlist)) {

		if (SHMQUEUE_STRCMP(KEYVALUE_KEY(&item->shi_keyvalue), key) == 0) {
			/* found! */

			/* remove from LRU list */
			RTAILQ_REMOVE(&header->sha_lrulist,
			    item, shmqueue_item, shi_list);
			/* remove from HASH list */
			RTAILQ_REMOVE(&header->sha_hashlist[item->shi_hashidx],
			    item, shmqueue_item, shi_hashlist);

			header->sha_item_inuse--;

			/* insert to FREE list */
			RTAILQ_INSERT_HEAD(&header->sha_freelist,
			    item, shmqueue_item, shi_list);

			shmqueue_unlock(shmq_header);
			return 0;
		}
	}
	shmqueue_unlock(shmq_header);

	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r13
movq %rsi, %rdi
callq *0x8(%rbx)
xorl %edx, %edx
divl 0x28(%r13)
movl %edx, %r12d
movl $0x148, %r14d           # imm = 0x148
movq (%rbx), %rdi
addq %r14, %rdi
callq 0x2694
shlq $0x4, %r12
leaq (%r12,%r13), %rbp
addq $0x150, %rbp            # imm = 0x150
movq (%rbp), %r12
testq %r12, %r12
sete %al
addq %rbp, %r12
sete %cl
orb %al, %cl
jne 0x24e9
leaq 0x150(%r13), %rax
movq %rax, (%rsp)
leaq 0x2c(%r12), %rdi
movq %r15, %rsi
callq 0x1090
testl %eax, %eax
je 0x24f3
movq 0x10(%r12), %rax
leaq (%rax,%rbp), %r12
testq %rax, %rax
cmoveq %rax, %r12
testq %r12, %r12
jne 0x24c3
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x259a
movq (%r12), %rax
movq 0x8(%r12), %rcx
leaq 0x18(%r13), %rdx
testq %rax, %rax
leaq 0x18(%rax,%r13), %rax
cmoveq %rdx, %rax
movq %rcx, (%rax)
movq (%r12), %rax
movq 0x8(%r12), %rcx
movq %rax, 0x10(%rcx,%r13)
movq 0x10(%r12), %rax
movq 0x18(%r12), %rcx
movl 0x20(%r12), %edx
shlq $0x4, %rdx
movq (%rsp), %rdi
leaq (%rdi,%rdx), %rsi
testq %rax, %rax
leaq 0x8(%rdi,%rdx), %rdx
leaq 0x18(%rax,%rsi), %rax
cmoveq %rdx, %rax
movq %rcx, (%rax)
movq 0x10(%r12), %rax
movq 0x18(%r12), %rcx
movl 0x20(%r12), %edx
shlq $0x4, %rdx
addq %rdi, %rdx
movq %rax, (%rcx,%rdx)
decl 0x34(%r13)
movq (%r13), %rdx
movq %rdx, (%r12)
movq %r12, %rax
subq %r13, %rax
movq %r13, %rcx
testq %rdx, %rdx
je 0x2587
movq (%r13), %rcx
addq %r13, %rcx
movq %rax, 0x8(%rcx)
movq %rax, (%r13)
movq $0x0, 0x8(%r12)
xorl %ebp, %ebp
addq (%rbx), %r14
movq %r14, %rdi
callq 0x26b4
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_inuse
int
shmqueue_inuse(struct shmqueue *shmq_header)
{
	int inuse;

	shmqueue_lock(shmq_header);
	inuse = shmq_header->header->sha_item_inuse;
	shmqueue_unlock(shmq_header);

	return inuse;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x148, %r14d           # imm = 0x148
movq (%rdi), %rdi
addq %r14, %rdi
callq 0x2694
movq (%rbx), %rdi
movl 0x34(%rdi), %ebx
addq %r14, %rdi
callq 0x26b4
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_watermark
int
shmqueue_watermark(struct shmqueue *shmq_header)
{
	/*
	 * usage rate reaches 87.5%? (7/8)
	 */
	int mark = 0;

	shmqueue_lock(shmq_header);
	if (shmq_header->header->sha_itemnum -
	    (shmq_header->header->sha_itemnum / 8) <
	    shmq_header->header->sha_item_inuse)
		mark = 1;
	shmqueue_unlock(shmq_header);
	return mark;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x148, %r14d           # imm = 0x148
movq (%rdi), %rdi
addq %r14, %rdi
callq 0x2694
movq (%rbx), %rdi
movl 0x30(%rdi), %eax
movl %eax, %ecx
shrl $0x3, %ecx
subl %ecx, %eax
xorl %ebx, %ebx
cmpl 0x34(%rdi), %eax
setb %bl
addq %r14, %rdi
callq 0x26b4
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_getoldest
int
shmqueue_getoldest(struct shmqueue *shmq_header, struct keyvalue *keyvalue)
{
	struct shmqueue_item *item;

	item = shmqueue_remove_from_lru(shmq_header);
	if (item == NULL)
		return -1;

	keyvalue->kv_keysize = item->shi_keyvalue.kv_keysize;
	keyvalue->kv_storagesize = item->shi_keyvalue.kv_storagesize;

	memcpy(keyvalue->kv_data, item->shi_keyvalue.kv_data, keyvalue->kv_keysize + keyvalue->kv_storagesize);
	KEYVALUE_STORAGE(keyvalue)[keyvalue->kv_storagesize] = '\0';

	shmqueue_add_to_freelist(shmq_header, item);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1c9b
testq %rax, %rax
je 0x2681
movq %rax, %r15
movl 0x24(%rax), %r12d
movl %r12d, (%r14)
movl 0x28(%rax), %r13d
movl %r13d, 0x4(%r14)
leaq 0x8(%r14), %rdi
movq %rax, %rsi
addq $0x2c, %rsi
leal (%r12,%r13), %edx
callq 0x10a0
leaq (%r14,%r12), %rax
addq $0x8, %rax
movb $0x0, (%r13,%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d67
xorl %eax, %eax
jmp 0x2686
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/main.c
// Function: print_help
void print_help()
{
    printf("help message\n\n");
    printf("-I\t\tinit oled (128x32 or 128x64 or 64x48)\n");
    printf("-c\t\tclear (line number or all)\n");
    printf("-d\t\t0/display off 1/display on\n");
    printf("-f\t\t0/small font 5x7 1/normal font 8x8 (default normal font)\n");
    printf("-h\t\thelp message\n");
    printf("-i\t\t0/normal oled 1/invert oled\n");
    printf("-l\t\tput your line to display\n");
    printf("-m\t\tput your strings to oled\n");
    printf("-n\t\tI2C device node address (0,1,2..., default 0)\n");
    printf("-r\t\t0/normal 180/rotate\n");
    printf("-x\t\tx position\n");
    printf("-y\t\ty position\n");
}

// Assembly:
pushq %rax
leaq 0xbc777(%rip), %rdi     # 0x4be197
callq 0x41b870
leaq 0xbc779(%rip), %rdi     # 0x4be1a5
callq 0x41b870
leaq 0xbc797(%rip), %rdi     # 0x4be1cf
callq 0x41b870
leaq 0xbc7aa(%rip), %rdi     # 0x4be1ee
callq 0x41b870
leaq 0xbc7bd(%rip), %rdi     # 0x4be20d
callq 0x41b870
leaq 0xbc7ee(%rip), %rdi     # 0x4be24a
callq 0x41b870
leaq 0xbc7f3(%rip), %rdi     # 0x4be25b
callq 0x41b870
leaq 0xbc807(%rip), %rdi     # 0x4be27b
callq 0x41b870
leaq 0xbc818(%rip), %rdi     # 0x4be298
callq 0x41b870
leaq 0xbc829(%rip), %rdi     # 0x4be2b5
callq 0x41b870
leaq 0xbc84f(%rip), %rdi     # 0x4be2e7
callq 0x41b870
leaq 0xbc85b(%rip), %rdi     # 0x4be2ff
callq 0x41b870
leaq 0xbc85e(%rip), %rdi     # 0x4be30e
popq %rax
jmp 0x41b870
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_init
uint8_t ssd1306_init(uint8_t i2c_dev)
{
    uint8_t rc;
    rc = _i2c_init(i2c_dev, SSD1306_I2C_ADDR);
    if (rc > 0)
        return rc;
        
    // test i2c connection
    uint8_t cmd = SSD1306_COMM_CONTROL_BYTE;
    uint8_t result = 0;
    _i2c_write(&cmd, 1);
    _i2c_read(&result, 1);
    if (result == 0)
        return 1;
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x3c, %esi
callq 0x4026d4
testb %al, %al
jne 0x401f48
xorl %ebp, %ebp
leaq 0x7(%rsp), %rdi
movb %bpl, (%rdi)
leaq 0x6(%rsp), %rbx
movb %bpl, (%rbx)
movl $0x1, %esi
callq 0x402777
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4027a3
cmpb %bpl, (%rbx)
sete %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_set_X
uint8_t ssd1306_oled_set_X(uint8_t x)
{
    if (x >= max_columns)
        return 1;

    global_x = x;
    
    data_buf[0] = SSD1306_COMM_CONTROL_BYTE;
    data_buf[1] = SSD1306_COMM_LOW_COLUMN | (x & 0x0f);
    data_buf[2] = SSD1306_COMM_HIGH_COLUMN | ((x >> 4) & 0x0f);
    
    return _i2c_write(data_buf, 3);
}

// Assembly:
cmpb %dil, 0xf0656(%rip)     # 0x4f27d0
jbe 0x4021b8
movb %dil, 0xf064e(%rip)     # 0x4f27d1
movb $0x0, 0xf0246(%rip)     # 0x4f23d0
leaq 0xf023f(%rip), %rax     # 0x4f23d0
movl %edi, %ecx
andb $0xf, %cl
movb %cl, 0xf0235(%rip)      # 0x4f23d1
shrb $0x4, %dil
orb $0x10, %dil
movb %dil, 0xf0227(%rip)     # 0x4f23d2
movq %rax, %rdi
movl $0x3, %esi
jmp 0x402777
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_set_Y
uint8_t ssd1306_oled_set_Y(uint8_t y)
{
    if (y >= (max_lines / 8))
        return 1;

    global_y = y;
    
    data_buf[0] = SSD1306_COMM_CONTROL_BYTE;
    data_buf[1] = SSD1306_COMM_PAGE_NUMBER | (y & 0x0f);

    return _i2c_write(data_buf, 2);
}

// Assembly:
movb 0xf0611(%rip), %al      # 0x4f27d2
shrb $0x3, %al
cmpb %dil, %al
jbe 0x4021fa
movb %dil, 0xf0603(%rip)     # 0x4f27d3
movb $0x0, 0xf01f9(%rip)     # 0x4f23d0
leaq 0xf01f2(%rip), %rax     # 0x4f23d0
andb $0xf, %dil
orb $-0x50, %dil
movb %dil, 0xf01e4(%rip)     # 0x4f23d1
movq %rax, %rdi
movl $0x2, %esi
jmp 0x402777
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_set_XY
uint8_t ssd1306_oled_set_XY(uint8_t x, uint8_t y)
{
    if (x >= max_columns || y >= (max_lines / 8))
        return 1;

    global_x = x;
    global_y = y;
    
    data_buf[0] = SSD1306_COMM_CONTROL_BYTE;
    data_buf[1] = SSD1306_COMM_PAGE_NUMBER | (y & 0x0f);

    data_buf[2] = SSD1306_COMM_LOW_COLUMN | (x & 0x0f);
    
    data_buf[3] = SSD1306_COMM_HIGH_COLUMN | ((x >> 4) & 0x0f);
    
    return _i2c_write(data_buf, 4);
}

// Assembly:
cmpb %dil, 0xf05cc(%rip)     # 0x4f27d0
jbe 0x402266
movb 0xf05c6(%rip), %al      # 0x4f27d2
shrb $0x3, %al
cmpb %sil, %al
jbe 0x402266
movb %dil, 0xf05b6(%rip)     # 0x4f27d1
movb %sil, 0xf05b1(%rip)     # 0x4f27d3
movb $0x0, 0xf01a7(%rip)     # 0x4f23d0
leaq 0xf01a0(%rip), %rax     # 0x4f23d0
andb $0xf, %sil
orb $-0x50, %sil
movb %sil, 0xf0192(%rip)     # 0x4f23d1
movl %edi, %ecx
andb $0xf, %cl
movb %cl, 0xf0188(%rip)      # 0x4f23d2
shrb $0x4, %dil
orb $0x10, %dil
movb %dil, 0xf017a(%rip)     # 0x4f23d3
movq %rax, %rdi
movl $0x4, %esi
jmp 0x402777
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_save_resolution
uint8_t ssd1306_oled_save_resolution(uint8_t column, uint8_t row)
{
    FILE* fp;
    
    fp = fopen(init_oled_type_file, "w");
    
    if (fp == NULL)
    {
        // file create failed
        return 1;
    }
    
    fprintf(fp, "%hhux%hhu", column, row);
    fclose(fp);
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
leaq 0xbc4f0(%rip), %rdi     # 0x4be870
leaq 0xbc504(%rip), %rsi     # 0x4be88b
callq 0x41b630
testq %rax, %rax
je 0x4023b9
movq %rax, %rbx
movzbl %r14b, %edx
movzbl %bpl, %ecx
leaq 0xbc4ea(%rip), %rsi     # 0x4be88d
xorl %ebp, %ebp
movq %rax, %rdi
xorl %eax, %eax
callq 0x40cbc0
movq %rbx, %rdi
callq 0x41b1f0
jmp 0x4023bc
movb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_write_line
uint8_t ssd1306_oled_write_line(uint8_t size, char* ptr)
{
    uint16_t i = 0;
    uint16_t index = 0;
    uint8_t* font_table = 0;
    uint8_t font_table_width = 0;
    
    if (ptr == 0)
        return 1;
    
    if (size == SSD1306_FONT_SMALL) // 5x7
    {
        font_table = (uint8_t*)font5x7;
        font_table_width = 5;
    }
    else if (size == SSD1306_FONT_NORMAL) // 8x8
    {
        font_table = (uint8_t*)font8x8;
        font_table_width = 8;
    }
    else
        return 1;
    
    data_buf[i++] = SSD1306_DATA_CONTROL_BYTE;
    
    // font table range in ascii table is from 0x20(space) to 0x7e(~)
    while (ptr[index] != 0 && i <= 1024)
    {
        if ((ptr[index] < ' ') || (ptr[index] > '~'))
            return 1;

        uint8_t* font_ptr = &font_table[(ptr[index] - 0x20) * font_table_width];
        uint8_t j = 0;
        for (j = 0; j < font_table_width; j++)
        {
            data_buf[i++] = font_ptr[j];
            if (i > 1024)
                return 1;
        }
        // insert 1 col space for small font size)
        if (size == SSD1306_FONT_SMALL)
            data_buf[i++] = 0x00;
        index++;
    }
    
    return _i2c_write(data_buf, i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x4024e3
testb %dil, %dil
je 0x4023f3
cmpb $0x1, %dil
jne 0x4024e3
movl $0x8, %ecx
leaq 0xbc17f(%rip), %rax     # 0x4be570
jmp 0x4023ff
movl $0x5, %ecx
leaq 0xbbf91(%rip), %rax     # 0x4be390
movb $0x40, 0xeffca(%rip)    # 0x4f23d0
movl %ecx, %ecx
leaq 0x1(%rax), %rdx
movw $0x1, %r11w
xorl %r8d, %r8d
movl $0x400, %r9d            # imm = 0x400
leaq 0xeffaf(%rip), %r10     # 0x4f23d0
movzwl %r8w, %ebx
movsbl (%rsi,%rbx), %r14d
testl %r14d, %r14d
je 0x4024f0
movzwl %r11w, %ebx
cmpl $0x400, %ebx            # imm = 0x400
ja 0x4024f0
leal -0x7f(%r14), %ebp
cmpb $-0x5f, %bpl
jb 0x4024e3
addl $-0x20, %r14d
imulq %rcx, %r14
movb (%rax,%r14), %bpl
movb %bpl, (%rbx,%r10)
cmpl %r9d, %ebx
jne 0x40246f
leaq 0x1(%rbx), %r11
movb $0x1, %bpl
jmp 0x4024da
movl $0x400, %ebp            # imm = 0x400
subl %r11d, %ebp
movzwl %bp, %r11d
leaq (%rbx,%r10), %r12
incq %r12
addq %rdx, %r14
xorl %r15d, %r15d
leaq 0x1(%r15), %r13
cmpq %rcx, %r13
setb %bpl
jae 0x4024b4
movb (%r14,%r15), %r9b
movb %r9b, (%r12,%r15)
movq %r13, %r15
cmpq %r13, %r11
jne 0x402488
leaq (%rbx,%r13), %r11
incq %r11
movl $0x400, %r9d            # imm = 0x400
jmp 0x4024da
leaq (%rbx,%r15), %r11
incq %r11
testb %dil, %dil
jne 0x4024d1
movzwl %r11w, %r9d
movb $0x0, (%r9,%r10)
leal (%rbx,%r15), %r11d
addl $0x2, %r11d
movl $0x400, %r9d            # imm = 0x400
incl %r8d
testb %bpl, %bpl
je 0x402421
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movswl %r11w, %esi
leaq 0xefed5(%rip), %rdi     # 0x4f23d0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x402777
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_write_string
uint8_t ssd1306_oled_write_string(uint8_t size, char* ptr)
{
    uint8_t rc = 0;
    
    if (ptr == 0)
        return 1;
    
    char* line = 0;
    char* cr = 0;
    char buf[20];
    
    line = ptr;
    do {
        memset(buf, 0, 20);
        cr = strstr(line, "\\n");
        if (cr != NULL)
        {
            strncpy(buf, line, cr - line);
        }
        else
        {
            strcpy(buf, line);
        }
        
        // set cursor position
        ssd1306_oled_set_XY(global_x, global_y);
        rc += ssd1306_oled_write_line(size, buf);
        
        if (cr != NULL)
        {
            line = &cr[2];
            global_x = 0;
            global_y++;
            if (global_y >= (max_lines / 8))
                global_y = 0;
        }
        else
            line = NULL;
                
    }while (line != NULL);
    
    return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
je 0x4025dd
movq %rsi, %r13
leaq 0xbc35d(%rip), %r14     # 0x4be888
movq %rsp, %r15
movzbl %dil, %ebp
xorl %ebx, %ebx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movl $0x0, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x401070
movq %rax, %r12
testq %rax, %rax
je 0x402569
movq %r12, %rdx
subq %r13, %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x401080
jmp 0x402574
movq %r15, %rdi
movq %r13, %rsi
callq 0x401020
movzbl 0xf0256(%rip), %edi     # 0x4f27d1
movzbl 0xf0251(%rip), %esi     # 0x4f27d3
callq 0x4021fd
movl %ebp, %edi
movq %r15, %rsi
callq 0x4023c3
testq %r12, %r12
je 0x4025ca
addq $0x2, %r12
movb $0x0, 0xf0230(%rip)     # 0x4f27d1
movb 0xf022c(%rip), %cl      # 0x4f27d3
incb %cl
movb 0xf0223(%rip), %dl      # 0x4f27d2
shrb $0x3, %dl
cmpb %dl, %cl
movzbl %cl, %ecx
movl $0x0, %edx
cmovael %edx, %ecx
movb %cl, 0xf020e(%rip)      # 0x4f27d3
movq %r12, %r13
jmp 0x4025cd
xorl %r13d, %r13d
movzbl %al, %eax
addl %eax, %ebx
testq %r13, %r13
jne 0x402534
jmp 0x4025df
movb $0x1, %bl
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_clear_line
uint8_t ssd1306_oled_clear_line(uint8_t row)
{
    uint8_t i;
    if (row >= (max_lines / 8))
        return 1;
        
    ssd1306_oled_set_XY(0, row);
    data_buf[0] = SSD1306_DATA_CONTROL_BYTE;
    for (i = 0; i < max_columns; i++)
        data_buf[i+1] = 0x00;
        
    return _i2c_write(data_buf, 1 + max_columns);
}

// Assembly:
movb 0xf01dc(%rip), %al      # 0x4f27d2
shrb $0x3, %al
cmpb %dil, %al
jbe 0x40263f
pushq %rbx
movzbl %dil, %esi
xorl %edi, %edi
callq 0x4021fd
movb $0x40, 0xefdbf(%rip)    # 0x4f23d0
movzbl 0xf01b8(%rip), %ebx     # 0x4f27d0
testq %rbx, %rbx
je 0x40262e
leaq 0xefdad(%rip), %rdi     # 0x4f23d1
xorl %esi, %esi
movq %rbx, %rdx
callq 0x4010a0
incl %ebx
leaq 0xefd99(%rip), %rdi     # 0x4f23d0
movl %ebx, %esi
popq %rbx
jmp 0x402777
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_clear_screen
uint8_t ssd1306_oled_clear_screen()
{
    uint8_t rc = 0;
    uint8_t i;
    
    for (i = 0; i < (max_lines / 8); i++)
    {
        rc += ssd1306_oled_clear_line(i);
    }
    
    return rc;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpb $0x8, 0xf0186(%rip)     # 0x4f27d2
jae 0x402652
xorl %ebx, %ebx
jmp 0x402674
xorl %ebp, %ebp
xorl %ebx, %ebx
movzbl %bpl, %ebp
movl %ebp, %edi
callq 0x4025f0
addb %al, %bl
incb %bpl
movb 0xf0166(%rip), %al      # 0x4f27d2
shrb $0x3, %al
cmpb %al, %bpl
jb 0x402656
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/ssd1306.c
// Function: ssd1306_oled_load_resolution
uint8_t ssd1306_oled_load_resolution()
{
    FILE* fp;
    
    fp = fopen(init_oled_type_file, "r");
    
    if (fp == NULL)
    {
        // file not exists
        return 1;
    }
    
    // file exists
    fscanf(fp, "%hhux%hhu", &max_columns, &max_lines);
    fclose(fp);
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0xbc1e9(%rip), %rdi     # 0x4be870
leaq 0xd7db9(%rip), %rsi     # 0x4da447
callq 0x41b630
testq %rax, %rax
je 0x4026c6
movq %rax, %rbx
leaq 0xbc1eb(%rip), %rsi     # 0x4be88d
leaq 0xf0127(%rip), %rdx     # 0x4f27d0
leaq 0xf0122(%rip), %rcx     # 0x4f27d2
xorl %ebp, %ebp
movq %rax, %rdi
xorl %eax, %eax
callq 0x40cfa0
movq %rbx, %rdi
callq 0x41b1f0
jmp 0x4026c9
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/armlabs[P]ssd1306_linux/linux_i2c.c
// Function: i2c_init
uint8_t _i2c_init(int i2c, int dev_addr)
{
	if (file_i2c == 0)
	{
		char filename[32];
  		sprintf(filename, "/dev/i2c-%d", i2c); // I2C bus number passed
		file_i2c = open(filename, O_RDWR);
		if (file_i2c < 0)
		{
			file_i2c = 0;
			return 1;
		}
		if (ioctl(file_i2c, I2C_SLAVE, dev_addr) < 0) // set slave address
		{
			close(file_i2c);
			file_i2c = 0;
			return 1;
		}
		return 0;
	}
	
	// assume done init already
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpl $0x0, 0xf00f1(%rip)     # 0x4f27d4
je 0x4026e9
xorl %ebp, %ebp
jmp 0x402748
movl %esi, %ebx
movl %edi, %edx
leaq 0xbc1a3(%rip), %rsi     # 0x4be897
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x40ce10
movq %r14, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x45f710
movl %eax, 0xf00be(%rip)     # 0x4f27d4
testl %eax, %eax
js 0x40273b
xorl %ebp, %ebp
movl $0x703, %esi            # imm = 0x703
movl %eax, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x4604f0
testl %eax, %eax
jns 0x402748
movl 0xf009e(%rip), %edi     # 0x4f27d4
callq 0x45f9b0
movl $0x0, 0xf008f(%rip)     # 0x4f27d4
movb $0x1, %bpl
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilesr[P]dotter/./stb/stb_image_write.h
// Function: stbiw__write_run_data
void stbiw__write_run_data(stbi__write_context *s, int length, unsigned char databyte)
{
   unsigned char lengthbyte = STBIW_UCHAR(length+128);
   STBIW_ASSERT(length+128 <= 255);
   s->func(s->context, &lengthbyte, 1);
   s->func(s->context, &databyte, 1);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movb %dl, 0xf(%rsp)
leal -0x80(%rsi), %eax
movb %al, 0xe(%rsp)
cmpl $0x80, %esi
jge 0x1919
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0xe(%rsp), %rsi
movl $0x1, %edx
callq *(%rbx)
movq 0x8(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq *(%rbx)
addq $0x10, %rsp
popq %rbx
retq
leaq 0x9638(%rip), %rdi      # 0xaf58
leaq 0x9643(%rip), %rsi      # 0xaf6a
leaq 0x9654(%rip), %rcx      # 0xaf82
movl $0x203, %edx            # imm = 0x203
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/nilesr[P]dotter/./stb/stb_image_write.h
// Function: stbiw__write_dump_data
void stbiw__write_dump_data(stbi__write_context *s, int length, unsigned char *data)
{
   unsigned char lengthbyte = STBIW_UCHAR(length);
   STBIW_ASSERT(length <= 128); // inconsistent with spec but consistent with official code
   s->func(s->context, &lengthbyte, 1);
   s->func(s->context, data, length);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movb %bpl, 0xf(%rsp)
cmpl $0x81, %esi
jge 0x1979
movq %rdx, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq *(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq *(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x9648(%rip), %rdi      # 0xafc8
leaq 0x95e3(%rip), %rsi      # 0xaf6a
leaq 0x9648(%rip), %rcx      # 0xafd6
movl $0x20b, %edx            # imm = 0x20B
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/nilesr[P]dotter/./stb/stb_image_write.h
// Function: stbi_write_hdr_core
static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, float *data)
{
   if (y <= 0 || x <= 0 || data == NULL)
      return 0;
   else {
      // Each component is stored separately. Allocate scratch space for full output scanline.
      unsigned char *scratch = (unsigned char *) STBIW_MALLOC(x*4);
      int i, len;
      char buffer[128];
      char header[] = "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n";
      s->func(s->context, header, sizeof(header)-1);

      len = sprintf(buffer, "EXPOSURE=          1.0000000000000\n\n-Y %d +X %d\n", y, x);
      s->func(s->context, buffer, len);

      for(i=0; i < y; i++)
         stbiw__write_hdr_scanline(s, x, comp, scratch, data + comp*i*x);
      STBIW_FREE(scratch);
      return 1;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %ecx, 0x4(%rsp)
movl %edx, %ebp
movq %rdi, 0x8(%rsp)
testl %edx, %edx
setle %al
testl %esi, %esi
setle %cl
orb %al, %cl
testq %r8, %r8
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x1db9
movl %esi, %r14d
leal (,%r14,4), %edi
movq %r8, %r15
callq 0x1100
movq %rax, %r12
leaq 0x9bb7(%rip), %rsi      # 0xb8e0
leaq 0x90(%rsp), %rax
movl $0x8, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movw $0xa, 0x40(%rax)
movq 0x8(%rsp), %rbx
movq 0x8(%rbx), %rdi
movq %rax, %rsi
movl $0x41, %edx
callq *(%rbx)
leaq 0x9520(%rip), %rsi      # 0xb27c
xorl %r13d, %r13d
leaq 0x10(%rsp), %rdi
movl %ebp, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x1180
movq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %rsi
movl %eax, %edx
callq *(%rbx)
movl %ebp, %eax
movl 0x4(%rsp), %ebp
imull %r14d, %ebp
movl %eax, %ebx
movslq %r13d, %r13
leaq (%r15,%r13,4), %r8
movq 0x8(%rsp), %rdi
movl %r14d, %esi
movl 0x4(%rsp), %edx
movq %r12, %rcx
callq 0x1998
addl %ebp, %r13d
decq %rbx
jne 0x1d89
movq %r12, %rdi
callq 0x1030
movl $0x1, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilesr[P]dotter/./stb/stb_image_write.h
// Function: stbi_write_png
STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
{
   FILE *f;
   int len;
   unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (png == NULL) return 0;
   f = fopen(filename, "wb");
   if (!f) { STBIW_FREE(png); return 0; }
   fwrite(png, 1, len, f);
   fclose(f);
   STBIW_FREE(png);
   return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r10d
movl %ecx, %eax
movl %edx, %ecx
movl %esi, %edx
movq %rdi, %r14
leaq 0xc(%rsp), %r9
movq %r8, %rdi
movl %r10d, %esi
movl %eax, %r8d
callq 0x2779
testq %rax, %rax
je 0x2de2
movq %rax, %rbx
leaq 0x8334(%rip), %rsi      # 0xb0e2
movq %r14, %rdi
callq 0x1160
testq %rax, %rax
je 0x2de6
movq %rax, %r14
movslq 0xc(%rsp), %rdx
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x1190
movq %r14, %rdi
callq 0x1060
movl $0x1, %ebp
jmp 0x2de8
xorl %ebp, %ebp
jmp 0x2df0
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilesr[P]dotter/dotter.c
// Function: dist
double dist(uint8_t* a, uint8_t* b, box_t box, int width) {
   double res = 0;
   // Add up the differences in each pixel
   for (int x = box.x1; x < box.x2; x++) {
      for (int y = box.y1; y < box.y2; y++) {
         res += subtract(getpixel(a, x, y, width), getpixel(b, x, y, width));
      }
   }
   // divide by the area (width*height) of the box
   return res / ((box.x2 - box.x1) * (box.y2 - box.y1));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rax
shrq $0x20, %rax
movq %rax, 0x18(%rsp)
movq %rcx, %rax
shrq $0x20, %rax
movq %rax, 0x10(%rsp)
xorpd %xmm1, %xmm1
movl %ecx, %eax
subl %edx, %eax
movl %eax, 0xc(%rsp)
jle 0x4c73
movq %rcx, %r9
movq %rdx, %rax
sarq $0x20, %rax
movslq %r8d, %rcx
movslq %edx, %r12
movslq %r9d, %rdx
movq %rdx, 0x28(%rsp)
sarq $0x20, %r9
leaq (%rcx,%rcx,2), %rbp
movq %rbp, %rcx
imulq %rax, %rcx
leaq (%r12,%r12,2), %rdx
addq %rcx, %rdx
leaq (%rdi,%rdx), %rbx
addq $0x2, %rbx
leaq (%rsi,%rdx), %r13
addq $0x2, %r13
subq %rax, %r9
movq %r9, 0x20(%rsp)
xorpd %xmm2, %xmm2
movq 0x10(%rsp), %rax
cmpl 0x18(%rsp), %eax
jle 0x4c5d
movq 0x20(%rsp), %r14
xorl %r15d, %r15d
movzbl -0x2(%rbx,%r15), %eax
movzbl -0x2(%r13,%r15), %ecx
subl %ecx, %eax
imull %eax, %eax
movzbl -0x1(%rbx,%r15), %ecx
movzbl -0x1(%r13,%r15), %edx
subl %edx, %ecx
imull %ecx, %ecx
addl %eax, %ecx
movzbl (%rbx,%r15), %eax
movzbl (%r13,%r15), %edx
subl %edx, %eax
imull %eax, %eax
addl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
ucomisd %xmm2, %xmm0
jb 0x4c3c
sqrtsd %xmm0, %xmm0
jmp 0x4c51
movsd %xmm1, 0x30(%rsp)
callq 0x11a0
xorpd %xmm2, %xmm2
movsd 0x30(%rsp), %xmm1
addsd %xmm0, %xmm1
addq %rbp, %r15
decq %r14
jne 0x4bf3
incq %r12
addq $0x3, %rbx
addq $0x3, %r13
cmpq 0x28(%rsp), %r12
jne 0x4be0
movq 0x10(%rsp), %rax
subl 0x18(%rsp), %eax
imull 0xc(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilesr[P]dotter/dotter.c
// Function: correct
void correct(box_t* box, int width, int height, int radius) {
   if (box->x1 < 0) {
      box->x2 += -box->x1;
      box->x1 += -box->x1;
   }
   if (box->y1 < 0) {
      box->y2 += -box->y1;
      box->y1 += -box->y1;
   }
   if (box->y2 > height) {
      box->y2 -= radius * 2;
      box->y1 -= radius * 2;
   }
   if (box->x2 > width) {
      box->x2 -= radius * 2;
      box->x1 -= radius * 2;
   }
}

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
jns 0x4cae
subl %eax, 0x8(%rdi)
movl $0x0, (%rdi)
movl 0x4(%rdi), %eax
testl %eax, %eax
jns 0x4cbf
subl %eax, 0xc(%rdi)
movl $0x0, 0x4(%rdi)
movl 0xc(%rdi), %eax
cmpl %edx, %eax
jle 0x4cd1
leal (%rcx,%rcx), %edx
subl %edx, %eax
movl %eax, 0xc(%rdi)
subl %edx, 0x4(%rdi)
movl 0x8(%rdi), %eax
cmpl %esi, %eax
jle 0x4ce1
addl %ecx, %ecx
subl %ecx, %eax
movl %eax, 0x8(%rdi)
subl %ecx, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/nilesr[P]dotter/dotter.c
// Function: draw
void draw(uint8_t* image, box_t box, uint8_t* color, int width, int radius) {
   // Center coordinates of the circle
   int cx = box.x1 + ((box.x2 - box.x1)/2);
   int cy = box.y1 + ((box.y2 - box.y1)/2);
   // For each pixel
   for (int x = box.x1; x < box.x2; x++) {
      for (int y = box.y1; y < box.y2; y++) {
         // If it's inside the circle, copy the color to that pixel
         if (sqrt(square(x - cx) + square(y - cy)) <= radius) {
            uint8_t* pixel = getpixel(image, x, y, width);
            memcpy(pixel, color, 3);
         }
      }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdi, (%rsp)
movl %edx, %ecx
subl %esi, %ecx
jle 0x4e26
movq %rdx, %rdi
movq %rdx, %rax
shrq $0x20, %rax
movq %rsi, %r10
shrq $0x20, %r10
movq %rax, %rdx
movq %rax, 0x38(%rsp)
subl %r10d, %edx
movl %edx, %eax
shrl $0x1f, %eax
addl %edx, %eax
sarl %eax
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
addl %esi, %edx
negl %edx
movq %rdx, 0x18(%rsp)
cvtsi2sd %r9d, %xmm1
movq %rsi, %rcx
sarq $0x20, %rcx
movslq %r8d, %rdx
movslq %esi, %r8
movslq %edi, %rsi
movq %rsi, 0x28(%rsp)
sarq $0x20, %rdi
movl %ecx, %r9d
subq %rcx, %rdi
movq %rdi, 0x20(%rsp)
imulq %rdx, %rcx
movq %r8, 0x8(%rsp)
addq %r8, %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rcx, (%rsp)
leaq (%rdx,%rdx,2), %r12
subl %eax, %r9d
movq %r10, 0x30(%rsp)
subl %r10d, %r9d
movl %r9d, 0x14(%rsp)
xorpd %xmm2, %xmm2
movsd %xmm1, 0x40(%rsp)
movq 0x30(%rsp), %rax
cmpl %eax, 0x38(%rsp)
jle 0x4e09
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
leal (%rax,%rcx), %r13d
imull %r13d, %r13d
movq 0x20(%rsp), %rbp
movl 0x14(%rsp), %r15d
movq (%rsp), %r14
movl %r15d, %eax
imull %r15d, %eax
addl %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
ucomisd %xmm2, %xmm0
jb 0x4ddb
sqrtsd %xmm0, %xmm0
jmp 0x4dea
callq 0x11a0
xorpd %xmm2, %xmm2
movsd 0x40(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x4dfe
movb 0x2(%rbx), %al
movb %al, 0x2(%r14)
movzwl (%rbx), %eax
movw %ax, (%r14)
addq %r12, %r14
incl %r15d
decq %rbp
jne 0x4dbe
movq 0x8(%rsp), %rcx
incq %rcx
addq $0x3, (%rsp)
movq %rcx, 0x8(%rsp)
cmpq 0x28(%rsp), %rcx
jne 0x4d93
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/starius[P]dna-complement/dna-complement.c
// Function: initializeTranslate
void initializeTranslate() {
    int i;
    for (i = 0; i < NCHARS; i++) {
        translate[i] = i;
    }
    translate['A'] = 'T';
    translate['T'] = 'A';
    translate['G'] = 'C';
    translate['C'] = 'G';
    translate['a'] = 't';
    translate['t'] = 'a';
    translate['g'] = 'c';
    translate['c'] = 'g';
#if USE_SHORT
    int x, y;
    for (x = 0; x < NCHARS; x++) {
        for (y = 0; y < NCHARS; y++) {
            unsigned short in_xy = (x << 8) | y;
            unsigned short out_xy =
                ((unsigned short)(translate[x]) << 8) |
                (unsigned short)(translate[y]);
            short_translate[in_xy] = out_xy;
        }
    }
#endif
}

// Assembly:
movdqa 0xdcc(%rip), %xmm0      # 0x2010
xorl %ecx, %ecx
leaq 0x2e23(%rip), %rax      # 0x4070
movdqa 0xdcb(%rip), %xmm1      # 0x2020
movdqa %xmm0, (%rcx,%rax)
addq $0x10, %rcx
paddb %xmm1, %xmm0
cmpq $0x100, %rcx            # imm = 0x100
jne 0x1255
movb $0x54, 0x2e3f(%rip)     # 0x40b1
movb $0x41, 0x2e4b(%rip)     # 0x40c4
movb $0x43, 0x2e37(%rip)     # 0x40b7
movb $0x47, 0x2e2c(%rip)     # 0x40b3
movb $0x74, 0x2e43(%rip)     # 0x40d1
movb $0x61, 0x2e4f(%rip)     # 0x40e4
movb $0x63, 0x2e3b(%rip)     # 0x40d7
movb $0x67, 0x2e30(%rip)     # 0x40d3
leaq 0x2ec6(%rip), %rcx      # 0x4170
xorl %edx, %edx
movzbl (%rdx,%rax), %esi
movd %esi, %xmm0
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
psllw $0x8, %xmm0
xorl %esi, %esi
movq (%rsi,%rax), %xmm1
punpcklbw %xmm1, %xmm1    # xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
psraw $0x8, %xmm1
por %xmm0, %xmm1
movdqa %xmm1, (%rcx,%rsi,2)
addq $0x8, %rsi
cmpq $0x100, %rsi            # imm = 0x100
jne 0x12c5
incq %rdx
addq $0x200, %rcx            # imm = 0x200
cmpq $0x100, %rdx            # imm = 0x100
jne 0x12ac
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/tests/mux/main.c
// Function: main
int
main(int argc, char * argv[])
{
	struct wire_requestqueue * Q;
	struct kivaloo_cookie * K;

	WARNP_INIT;

	/* Check number of arguments. */
	if (argc != 3) {
		fprintf(stderr, "usage: test_mux %s %s\n",
		    "<socketname>", "{ping | pong | <prefix>}");
		exit(1);
	}

	/* Open a connection to MUX. */
	if ((K = kivaloo_open(argv[1], &Q)) == NULL) {
		warnp("Could not connecto to MUX daemon.");
		exit(1);
	}

	if (strcmp(argv[2], "ping") == 0) {
		if (pingpong(Q, "pingpong", "ping", "pong", 1))
			exit(1);
	} else if (strcmp(argv[2], "pong") == 0) {
		if (pingpong(Q, "pingpong", "pong", "ping", 0))
			exit(1);
	} else if (strcmp(argv[2], "loop") == 0) {
		/* Repeatedly create/read/delete 10^4 pairs until we die. */
		do {
			if (createmany(Q, 10000, argv[2]))
				exit(1);
		} while (1);
	} else {
		/* Test creating 10000 pairs and reading them back. */
		if (createmany(Q, 10000, argv[2]))
			exit(1);
	}

	/* Free the request queue and network connection. */
	kivaloo_close(K);

	/* Success! */
	exit(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2567
callq 0x4440
cmpl $0x3, %ebx
jne 0x2599
movq 0x8(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6644
testq %rax, %rax
jne 0x25c9
callq 0x2090
cmpl $0x0, (%rax)
jne 0x25fd
leaq 0x8ab1(%rip), %rdi      # 0xb041
xorl %eax, %eax
callq 0x45df
jmp 0x25bf
movq 0xea58(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x8a5a(%rip), %rsi      # 0xb004
leaq 0x8a6a(%rip), %rdx      # 0xb01b
leaq 0x8a70(%rip), %rcx      # 0xb028
xorl %eax, %eax
callq 0x21c0
movl $0x1, %edi
callq 0x22b0
movq %rax, %rbx
movq 0x10(%r14), %r15
leaq 0x8a8c(%rip), %rsi      # 0xb063
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x2616
movq 0x8(%rsp), %rdi
leaq 0x8a74(%rip), %rsi      # 0xb063
leaq 0x8a76(%rip), %rdx      # 0xb06c
movl $0x1, %ecx
jmp 0x263e
movq %rax, %rbx
leaq 0x8a3a(%rip), %rdi      # 0xb041
xorl %eax, %eax
callq 0x44c0
movl $0x0, (%rbx)
jmp 0x25bf
leaq 0x8a4f(%rip), %rsi      # 0xb06c
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x265a
movq 0x8(%rsp), %rdi
leaq 0x8a37(%rip), %rsi      # 0xb06c
leaq 0x8a27(%rip), %rdx      # 0xb063
xorl %ecx, %ecx
callq 0x2693
testl %eax, %eax
jne 0x25bf
movq %rbx, %rdi
callq 0x678d
xorl %edi, %edi
callq 0x22b0
leaq 0x8a10(%rip), %rsi      # 0xb071
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x2684
movq 0x8(%rsp), %rdi
movq 0x10(%r14), %rsi
callq 0x2947
testl %eax, %eax
je 0x266d
jmp 0x25bf
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x2947
jmp 0x2643