LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: find_queue_t
Queue_t *find_queue_t(List *list, const char *name)
{
	Queue_t *queue_t;
	ListNode *node;
	ListIterator iterator;

	list_rewind(list, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		queue_t = EG_LIST_NODE_VALUE(node);
		if (!strcmp(queue_t->name, name)) {
			return queue_t;
		}
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x8ed9
movq %r14, %rdi
callq 0x8e98
testq %rax, %rax
je 0x97e7
movq 0x10(%rax), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2230
testl %eax, %eax
jne 0x97c5
jmp 0x97ea
xorl %r15d, %r15d
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: unsubscribe_client_queue_t
void unsubscribe_client_queue_t(Queue_t *queue_t, EagleClient *client)
{
	ListNode *node;
	ListIterator iterator;

	list_delete_value(client->subscribed_queues, queue_t);

	list_rewind(queue_t->subscribed_clients_msg, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		if (EG_LIST_NODE_VALUE(node) == client) {
			list_delete_node(queue_t->subscribed_clients_msg, node);
			return;
		}
	}

	list_rewind(queue_t->subscribed_clients_notify, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		if (EG_LIST_NODE_VALUE(node) == client) {
			list_delete_node(queue_t->subscribed_clients_notify, node);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x58(%rsi), %rdi
movq %rbx, %rsi
callq 0x8d73
movq 0x78(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x8ed9
movq %r15, %rdi
callq 0x8e98
testq %rax, %rax
je 0x9915
cmpq %r14, 0x10(%rax)
jne 0x98f4
movq 0x78(%rbx), %rdi
movq %rax, %rsi
callq 0x8e17
jmp 0x9959
movq 0x80(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x8ed9
movq %r15, %rdi
callq 0x8e98
testq %rax, %rax
je 0x9959
movq %rsp, %r15
cmpq %r14, 0x10(%rax)
jne 0x994c
movq 0x80(%rbx), %rdi
movq %rax, %rsi
callq 0x8e17
movq %r15, %rdi
callq 0x8e98
testq %rax, %rax
jne 0x9937
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: link_queue_route_t
void link_queue_route_t(Queue_t *queue_t, Route_t *route, const char *key)
{
	List *list;
	KeylistNode *node = keylist_get_value(queue_t->routes, (void*)key);

	if (!node)
	{
		list = list_create();
		keylist_set_value(queue_t->routes, xstrdup(key), list);
		list_add_value_tail(list, route);
	}
	else
	{
		list = EG_KEYLIST_NODE_VALUE(node);
		if (!list_search_node(list, route)) {
			list_add_value_tail(list, route);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq 0x88(%rdi), %rdi
movq %rdx, %rsi
callq 0x8b04
testq %rax, %rax
je 0x99a8
movq 0x18(%rax), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8d97
testq %rax, %rax
je 0x99ce
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x8c60
movq %rax, %r14
movq 0x88(%r12), %r12
movq %r15, %rdi
callq 0x496a
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x8b6b
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8d1a
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: unlink_queue_route_t
void unlink_queue_route_t(Queue_t *queue_t, Route_t *route, const char *key)
{
	List *list;
	KeylistNode *node = keylist_get_value(queue_t->routes, (void*)key);

	if (node)
	{
		list = EG_KEYLIST_NODE_VALUE(node);
		list_delete_value(list, route);

		if (!EG_LIST_LENGTH(list)) {
			keylist_delete_node(queue_t->routes, node);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x88(%rdi), %rdi
movq %rdx, %rsi
callq 0x8b04
testq %rax, %rax
je 0x9a20
movq %rax, %r14
movq 0x18(%rax), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8d73
cmpl $0x0, 0x20(%r12)
je 0x9a2c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x88(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8c0c
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: process_expired_messages_queue_t
void process_expired_messages_queue_t(Queue_t *queue_t, uint32_t time)
{
	ListNode *node;
	ListIterator iterator;
	Message *msg;

	list_rewind(queue_t->expire_messages, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		msg = EG_LIST_NODE_VALUE(node);

		if (EG_MESSAGE_GET_EXPIRATION_TIME(msg) <= time) {
			list_delete_node(queue_t->expire_messages, node);
			queue_delete_node(queue_t->queue, EG_MESSAGE_GET_DATA(msg, 1));
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq 0x60(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x8ed9
movq %r15, %rdi
callq 0x8e98
testq %rax, %rax
je 0x9ad5
leaq 0x8(%rsp), %r15
movq 0x10(%rax), %r12
cmpl %ebx, 0x14(%r12)
ja 0x9ac8
movq 0x60(%r14), %rdi
movq %rax, %rsi
callq 0x8e17
movq 0x58(%r14), %rdi
movq 0x20(%r12), %rsi
callq 0x9086
movq %r15, %rdi
callq 0x8e98
testq %rax, %rax
jne 0x9aa3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: process_unconfirmed_messages_queue_t
void process_unconfirmed_messages_queue_t(Queue_t *queue_t, uint32_t time)
{
	ListNode *node;
	ListIterator iterator;
	Message *msg;

	list_rewind(queue_t->confirm_messages, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		msg = EG_LIST_NODE_VALUE(node);

		if (EG_MESSAGE_GET_CONFIRM_TIME(msg) <= time)
		{
			list_delete_node(queue_t->confirm_messages, node);

			if (msg->expiration)
			{
				if (EG_MESSAGE_GET_EXPIRATION_TIME(msg) <= time) {
					continue;
				}

				queue_push_value_tail(queue_t->queue, msg);

				list_add_value_tail(queue_t->expire_messages, msg);
				EG_MESSAGE_SET_DATA(msg, 0, EG_LIST_LAST(queue_t->expire_messages));
				EG_MESSAGE_SET_DATA(msg, 1, EG_QUEUE_LAST(queue_t->queue));
			}
			else
			{
				queue_push_value_tail(queue_t->queue, msg);
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq 0x68(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x8ed9
movq %r15, %rdi
callq 0x8e98
testq %rax, %rax
je 0x9b85
leaq 0x8(%rsp), %r15
movq 0x10(%rax), %r12
cmpl %ebx, 0x10(%r12)
ja 0x9b78
movq 0x68(%r14), %rdi
movq %rax, %rsi
callq 0x8e17
movl 0x14(%r12), %eax
testl %eax, %eax
je 0x9b6c
cmpl %ebx, %eax
jbe 0x9b78
movq 0x58(%r14), %rdi
movq %r12, %rsi
callq 0x8f9b
movq 0x60(%r14), %rdi
movq %r12, %rsi
callq 0x8d1a
movq 0x60(%r14), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%r12)
movq 0x58(%r14), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%r12)
jmp 0x9b78
movq 0x58(%r14), %rdi
movq %r12, %rsi
callq 0x8f9b
movq %r15, %rdi
callq 0x8e98
testq %rax, %rax
jne 0x9b14
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/route_t.c
// Function: create_route_t
Route_t *create_route_t(const char *name, uint32_t flags)
{
	Route_t *route = (Route_t*)xmalloc(sizeof(*route));

	memcpy(route->name, name, strlenz(name));
	route->flags = flags;

	route->auto_delete = 0;
	route->round_robin = 0;

	if (BIT_CHECK(route->flags, EG_ROUTE_AUTODELETE_FLAG)) {
		route->auto_delete = 1;
	}

	if (BIT_CHECK(route->flags, EG_ROUTE_ROUND_ROBIN_FLAG)) {
		route->round_robin = 1;
	}

	route->keys = keylist_create();

	EG_KEYLIST_SET_FREE_METHOD(route->keys, free_route_keylist_handler);
	EG_KEYLIST_SET_MATCH_METHOD(route->keys, match_route_keylist_handler);

	return route;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x58, %edi
callq 0x4770
movq %rax, %rbx
movq %r14, %rdi
callq 0x2150
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2280
movl %ebp, 0x40(%rbx)
movq $0x0, 0x44(%rbx)
testb $0x1, %bpl
je 0x9bdd
movl $0x1, 0x44(%rbx)
testb $0x2, %bpl
je 0x9bea
movl $0x1, 0x48(%rbx)
callq 0x8a98
movq %rax, 0x50(%rbx)
leaq 0x17(%rip), %rcx        # 0x9c11
movq %rcx, 0x10(%rax)
leaq 0x1e(%rip), %rcx        # 0x9c23
movq %rcx, 0x18(%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/route_t.c
// Function: push_message_route_t
int push_message_route_t(Route_t *route, const char *key, Object *msg, uint32_t expiration)
{
	KeylistNode *keylist_node;
	ListNode *list_node;
	ListIterator list_iterator;
	List *list;
	Queue_t *queue_t;
	int status = EG_STATUS_OK;

	keylist_node = keylist_get_value(route->keys, (void*)key);
	if (!keylist_node) {
		return EG_STATUS_ERR;
	}

	list = EG_KEYLIST_NODE_VALUE(keylist_node);

	if (route->round_robin)
	{
		list_rotate(list);

		queue_t = EG_LIST_NODE_VALUE(EG_LIST_FIRST(list));

		if (push_message_queue_t(queue_t, msg, expiration) != EG_STATUS_OK)
			status = EG_STATUS_ERR;

		increment_references_count(msg);
	}
	else
	{
		list_rewind(list, &list_iterator);
		while ((list_node = list_next_node(&list_iterator)) != NULL)
		{
			queue_t = EG_LIST_NODE_VALUE(list_node);

			if (push_message_queue_t(queue_t, msg, expiration) != EG_STATUS_OK)
				status = EG_STATUS_ERR;

			increment_references_count(msg);
		}
	}

	return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x50(%rdi), %rdi
callq 0x8b04
testq %rax, %rax
je 0x9d14
movq 0x18(%rax), %r15
cmpl $0x0, 0x48(%r14)
je 0x9d1c
movq %r15, %rdi
callq 0x8eb1
movq (%r15), %rax
movq 0x10(%rax), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x956a
xorl %r14d, %r14d
negl %eax
sbbl %r14d, %r14d
movq %rbx, %rdi
callq 0x5561
jmp 0x9d70
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x9d70
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x8ed9
movq %r14, %rdi
callq 0x8e98
xorl %r14d, %r14d
testq %rax, %rax
je 0x9d70
leaq 0x8(%rsp), %r15
movq 0x10(%rax), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x956a
negl %eax
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %r14d
movq %rbx, %rdi
callq 0x5561
movq %r15, %rdi
callq 0x8e98
testq %rax, %rax
jne 0x9d41
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/route_t.c
// Function: bind_route_t
void bind_route_t(Route_t *route, Queue_t *queue_t, const char *key)
{
	List *list;
	KeylistNode *node = keylist_get_value(route->keys, (void*)key);
	int link = 0;

	if (!node)
	{
		list = list_create();
		keylist_set_value(route->keys, xstrdup(key), list);
		link = 1;
	}
	else
	{
		list = EG_KEYLIST_NODE_VALUE(node);
		if (!list_search_node(list, queue_t))
			link = 1;
	}

	if (link)
	{
		list_add_value_tail(list, queue_t);
		link_queue_route_t(queue_t, route, key);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x50(%rdi), %rdi
movq %rdx, %rsi
callq 0x8b04
testq %rax, %rax
je 0x9dbf
movq 0x18(%rax), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8d97
testq %rax, %rax
je 0x9de1
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x8c60
movq %rax, %r12
movq 0x50(%r14), %r13
movq %rbx, %rdi
callq 0x496a
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x8b6b
movq %r12, %rdi
movq %r15, %rsi
callq 0x8d1a
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x9963
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/route_t.c
// Function: unbind_route_t
int unbind_route_t(Route_t *route, Queue_t *queue_t, const char *key)
{
	List *list;
	KeylistNode *node = keylist_get_value(route->keys, (void*)key);

	if (!node) {
		return EG_STATUS_ERR;
	}

	list = EG_KEYLIST_NODE_VALUE(node);
	list_delete_value(list, queue_t);

	if (!EG_LIST_LENGTH(list)) {
		keylist_delete_node(route->keys, node);
	}

	unlink_queue_route_t(queue_t, route, key);

	if (route->auto_delete)
	{
		if (EG_KEYLIST_LENGTH(route->keys) == 0) {
			list_delete_value(server->routes, route);
		}
	}

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
movq %rdx, %rsi
callq 0x8b04
testq %rax, %rax
je 0x9e88
movq %rax, %r12
movq 0x18(%rax), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x8d73
cmpl $0x0, 0x20(%r13)
jne 0x9e4d
movq 0x50(%rbx), %rdi
movq %r12, %rsi
callq 0x8c0c
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x99e4
xorl %ebp, %ebp
cmpl $0x0, 0x44(%rbx)
je 0x9e8d
movq 0x50(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x9e8d
leaq 0x841c(%rip), %rax      # 0x12290
movq (%rax), %rax
movq 0x178(%rax), %rdi
movq %rbx, %rsi
callq 0x8d73
jmp 0x9e8d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
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_O3/yakushstanislav[P]EagleMQ/src/route_t.c
// Function: find_route_t
Route_t *find_route_t(List *list, const char *name)
{
	Route_t *route;
	ListNode *node;
	ListIterator iterator;

	list_rewind(list, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		route = EG_LIST_NODE_VALUE(node);
		if (!strcmp(route->name, name)) {
			return route;
		}
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x8ed9
movq %r14, %rdi
callq 0x8e98
testq %rax, %rax
je 0x9ed7
movq 0x10(%rax), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2230
testl %eax, %eax
jne 0x9eb5
jmp 0x9eda
xorl %r15d, %r15d
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/route_t.c
// Function: get_queue_number_route_t
uint32_t get_queue_number_route_t(Route_t *route)
{
	KeylistIterator iterator;
	KeylistNode *node;
	List *list;
	uint32_t queues = 0;

	keylist_rewind(route->keys, &iterator);
	while ((node = keylist_next_node(&iterator)) != NULL)
	{
		list = EG_KEYLIST_NODE_VALUE(node);
		queues += EG_LIST_LENGTH(list);
	}

	return queues;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x50(%rdi), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x8b54
movq %rbx, %rdi
callq 0x8b5b
xorl %ebx, %ebx
testq %rax, %rax
je 0x9f48
movq %rsp, %r14
movq 0x18(%rax), %rax
addl 0x20(%rax), %ebx
movq %r14, %rdi
callq 0x8b5b
testq %rax, %rax
jne 0x9f34
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: create_channel_t
Channel_t *create_channel_t(const char *name, uint32_t flags)
{
	Channel_t *channel = (Channel_t*)xmalloc(sizeof(*channel));

	memcpy(channel->name, name, strlenz(name));
	channel->flags = flags;

	channel->auto_delete = 0;
	channel->round_robin = 0;

	if (BIT_CHECK(channel->flags, EG_CHANNEL_AUTODELETE_FLAG)) {
		channel->auto_delete = 1;
	}

	if (BIT_CHECK(channel->flags, EG_CHANNEL_ROUND_ROBIN_FLAG)) {
		channel->round_robin = 1;
	}

	channel->topics = keylist_create();
	channel->patterns = keylist_create();

	EG_KEYLIST_SET_FREE_METHOD(channel->topics, free_channel_keylist_handler);
	EG_KEYLIST_SET_MATCH_METHOD(channel->topics, match_channel_keylist_handler);

	EG_KEYLIST_SET_FREE_METHOD(channel->patterns, free_channel_keylist_handler);
	EG_KEYLIST_SET_MATCH_METHOD(channel->patterns, match_channel_keylist_handler);

	return channel;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x60, %edi
callq 0x4770
movq %rax, %rbx
movq %r14, %rdi
callq 0x2150
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2280
movl %ebp, 0x40(%rbx)
movq $0x0, 0x44(%rbx)
testb $0x1, %bpl
je 0x9f9d
movl $0x1, 0x44(%rbx)
testb $0x2, %bpl
je 0x9faa
movl $0x1, 0x48(%rbx)
callq 0x8a98
movq %rax, 0x50(%rbx)
callq 0x8a98
movq %rax, 0x58(%rbx)
movq 0x50(%rbx), %rcx
leaq 0x1f(%rip), %rdx        # 0x9fe6
movq %rdx, 0x10(%rcx)
leaq 0x26(%rip), %rsi        # 0x9ff8
movq %rsi, 0x18(%rcx)
movq %rdx, 0x10(%rax)
movq %rsi, 0x18(%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: delete_channel_t
void delete_channel_t(Channel_t *channel)
{
	eject_clients_channel_t(channel);

	keylist_release(channel->topics);
	keylist_release(channel->patterns);

	xfree(channel);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x8b54
movq %r14, %rdi
callq 0x8b5b
testq %rax, %rax
je 0xa079
movq %rax, %r15
leaq 0x8(%rsp), %r14
movq %rsp, %r12
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0x8ed9
movq %r14, %rdi
callq 0x8e98
testq %rax, %rax
je 0xa069
movq 0x10(%rax), %rsi
movq 0x10(%r15), %rdx
movq %rbx, %rdi
callq 0xa419
jmp 0xa04a
movq %r12, %rdi
callq 0x8b5b
movq %rax, %r15
testq %rax, %rax
jne 0xa03e
movq 0x58(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x8b54
movq %r14, %rdi
callq 0x8b5b
testq %rax, %rax
je 0xa0db
movq %rax, %r15
leaq 0x8(%rsp), %r14
movq %rsp, %r12
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0x8ed9
movq %r14, %rdi
callq 0x8e98
testq %rax, %rax
je 0xa0cb
movq 0x10(%rax), %rsi
movq 0x10(%r15), %rdx
movq %rbx, %rdi
callq 0xa510
jmp 0xa0ac
movq %r12, %rdi
callq 0x8b5b
movq %rax, %r15
testq %rax, %rax
jne 0xa0a0
movq 0x50(%rbx), %rdi
callq 0x8ab6
movq 0x58(%rbx), %rdi
callq 0x8ab6
movq %rbx, %rdi
callq 0x4997
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: publish_message_channel_t
void publish_message_channel_t(Channel_t *channel, const char *topic, Object *msg)
{
	EagleClient *client;
	KeylistIterator keylist_iterator;
	KeylistNode *keylist_node;
	ListNode *list_node;
	ListIterator list_iterator;
	List *list;
	char *pattern;

	keylist_node = keylist_get_value(channel->topics, (void*)topic);
	if (keylist_node)
	{
		list = EG_KEYLIST_NODE_VALUE(keylist_node);

		if (channel->round_robin)
		{
			list_rotate(list);

			client = EG_LIST_NODE_VALUE(EG_LIST_FIRST(list));
			channel_client_event_message(client, channel, topic, msg);
		}
		else
		{
			list_rewind(list, &list_iterator);
			while ((list_node = list_next_node(&list_iterator)) != NULL)
			{
				client = EG_LIST_NODE_VALUE(list_node);
				channel_client_event_message(client, channel, topic, msg);
			}
		}
	}

	if (EG_KEYLIST_LENGTH(channel->patterns))
	{
		keylist_rewind(channel->patterns, &keylist_iterator);
		while ((keylist_node = keylist_next_node(&keylist_iterator)) != NULL)
		{
			pattern = EG_KEYLIST_NODE_KEY(keylist_node);

			if (pattern_match(topic, pattern, 0))
			{
				list = EG_KEYLIST_NODE_VALUE(keylist_node);

				list_rewind(list, &list_iterator);
				while ((list_node = list_next_node(&list_iterator)) != NULL)
				{
					client = EG_LIST_NODE_VALUE(list_node);
					channel_client_event_pattern_message(client, channel, topic, pattern, msg);
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x50(%rdi), %rdi
callq 0x8b04
testq %rax, %rax
je 0xa192
movq 0x18(%rax), %r12
cmpl $0x0, 0x48(%r15)
je 0xa151
movq %r12, %rdi
callq 0x8eb1
movq (%r12), %rax
movq 0x10(%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x8358
jmp 0xa192
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x8ed9
movq %r13, %rdi
callq 0x8e98
testq %rax, %rax
je 0xa192
leaq 0x8(%rsp), %r12
movq 0x10(%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x8358
movq %r12, %rdi
callq 0x8e98
testq %rax, %rax
jne 0xa173
movq 0x58(%r15), %rdi
cmpl $0x0, 0x20(%rdi)
je 0xa213
movq %rsp, %r12
movq %r12, %rsi
callq 0x8b54
movq %r12, %rdi
callq 0x8b5b
testq %rax, %rax
je 0xa213
movq %rax, %r12
leaq 0x8(%rsp), %r13
movq 0x10(%r12), %rbp
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x5171
testl %eax, %eax
je 0xa203
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0x8ed9
movq %r13, %rdi
callq 0x8e98
testq %rax, %rax
je 0xa203
movq 0x10(%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x83f6
jmp 0xa1df
movq %rsp, %rdi
callq 0x8b5b
movq %rax, %r12
testq %rax, %rax
jne 0xa1bc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: find_channel_t
Channel_t *find_channel_t(List *list, const char *name)
{
	Channel_t *channel;
	ListNode *node;
	ListIterator iterator;

	list_rewind(list, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		channel = EG_LIST_NODE_VALUE(node);
		if (!strcmp(channel->name, name)) {
			return channel;
		}
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x8ed9
movq %r14, %rdi
callq 0x8e98
testq %rax, %rax
je 0xa25b
movq 0x10(%rax), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2230
testl %eax, %eax
jne 0xa239
jmp 0xa25e
xorl %r15d, %r15d
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: subscribe_channel_t
void subscribe_channel_t(Channel_t *channel, EagleClient *client, const char *topic)
{
	List *list;
	KeylistNode *node = keylist_get_value(channel->topics, (void*)topic);
	int subscribe = 0;

	if (!node)
	{
		list = list_create();
		keylist_set_value(channel->topics, xstrdup(topic), list);
		node = EG_KEYLIST_LAST(channel->topics);
		subscribe = 1;
	}
	else
	{
		list = EG_KEYLIST_NODE_VALUE(node);
		if (!list_search_node(list, client))
			subscribe = 1;
	}

	if (subscribe)
	{
		list_add_value_tail(list, client);
		add_keylist_channel_t(client->subscribed_topics, channel, node);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
movq %rdx, %rsi
callq 0x8b04
testq %rax, %rax
je 0xa2d7
movq %rax, %r12
movq 0x18(%rax), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8d97
testq %rax, %rax
je 0xa301
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x8c60
movq %rax, %r15
movq 0x50(%rbx), %r12
movq %r13, %rdi
callq 0x496a
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x8b6b
movq 0x50(%rbx), %rax
movq 0x8(%rax), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x8d1a
movq 0x60(%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xa321
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: add_keylist_channel_t
static void add_keylist_channel_t(Keylist *keylist, Channel_t *channel, KeylistNode *keylist_node)
{
	List *list;
	KeylistNode *node = keylist_get_value(keylist, channel);
	int add = 0;

	if (!node)
	{
		list = list_create();
		keylist_set_value(keylist, channel, list);
		add = 1;
	}
	else
	{
		list = EG_KEYLIST_NODE_VALUE(node);
		if (!list_search_node(list, keylist_node))
			add = 1;
	}

	if (add)
	{
		list_add_value_tail(list, keylist_node);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
callq 0x8b04
testq %rax, %rax
je 0xa35c
movq 0x18(%rax), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8d97
testq %rax, %rax
je 0xa372
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x8c60
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x8b6b
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8d1a
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: psubscribe_channel_t
void psubscribe_channel_t(Channel_t *channel, EagleClient *client, const char *pattern)
{
	List *list;
	KeylistNode *node = keylist_get_value(channel->patterns, (void*)pattern);
	int subscribe = 0;

	if (!node)
	{
		list = list_create();
		keylist_set_value(channel->patterns, xstrdup(pattern), list);
		node = EG_KEYLIST_LAST(channel->patterns);
		subscribe = 1;
	}
	else
	{
		list = EG_KEYLIST_NODE_VALUE(node);
		if (!list_search_node(list, client))
			subscribe = 1;
	}

	if (subscribe)
	{
		list_add_value_tail(list, client);
		add_keylist_channel_t(client->subscribed_patterns, channel, node);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
movq %rdx, %rsi
callq 0x8b04
testq %rax, %rax
je 0xa3cc
movq %rax, %r12
movq 0x18(%rax), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8d97
testq %rax, %rax
je 0xa3f6
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x8c60
movq %rax, %r15
movq 0x58(%rbx), %r12
movq %r13, %rdi
callq 0x496a
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x8b6b
movq 0x58(%rbx), %rax
movq 0x8(%rax), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x8d1a
movq 0x68(%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xa321
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: unsubscribe_channel_t
int unsubscribe_channel_t(Channel_t *channel, EagleClient *client, const char *topic)
{
	List *list;
	KeylistNode *node = keylist_get_value(channel->topics, (void*)topic);

	if (!node) {
		return EG_STATUS_ERR;
	}

	list = EG_KEYLIST_NODE_VALUE(node);

	list_delete_value(list, client);
	remove_keylist_channel_t(client->subscribed_topics, channel, node);

	if (!EG_LIST_LENGTH(list)) {
		keylist_delete_node(channel->topics, node);
	}

	if (channel->auto_delete)
	{
		if (EG_KEYLIST_LENGTH(channel->topics) == 0 &&
			EG_KEYLIST_LENGTH(channel->patterns) == 0) {
			list_delete_value(server->channels, channel);
		}
	}

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
movq %rdx, %rsi
callq 0x8b04
testq %rax, %rax
je 0xa4a4
movq %rax, %r14
movq 0x18(%rax), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8d73
movq 0x60(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xa4b4
cmpl $0x0, 0x20(%r12)
jne 0xa46d
movq 0x50(%rbx), %rdi
movq %r14, %rsi
callq 0x8c0c
xorl %ebp, %ebp
cmpl $0x0, 0x44(%rbx)
je 0xa4a9
movq 0x50(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0xa4a9
movq 0x58(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0xa4a9
leaq 0x7e00(%rip), %rax      # 0x12290
movq (%rax), %rax
movq 0x180(%rax), %rdi
movq %rbx, %rsi
callq 0x8d73
jmp 0xa4a9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: remove_keylist_channel_t
static int remove_keylist_channel_t(Keylist *keylist, Channel_t *channel, KeylistNode *keylist_node)
{
	List *list;
	KeylistNode *node = keylist_get_value(keylist, channel);

	if (!node) {
		return EG_STATUS_ERR;
	}

	list = EG_KEYLIST_NODE_VALUE(node);
	list_delete_value(list, keylist_node);

	if (!EG_LIST_LENGTH(list)) {
		list_release(list);
		keylist_delete_node(keylist, node);
	}

	return EG_STATUS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
callq 0x8b04
testq %rax, %rax
je 0xa4e6
movq %rax, %r14
movq 0x18(%rax), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8d73
cmpl $0x0, 0x20(%r12)
je 0xa4f2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0x8c7e
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8c0c
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/channel_t.c
// Function: punsubscribe_channel_t
int punsubscribe_channel_t(Channel_t *channel, EagleClient *client, const char *pattern)
{
	List *list;
	KeylistNode *node = keylist_get_value(channel->patterns, (void*)pattern);

	if (!node) {
		return EG_STATUS_ERR;
	}

	list = EG_KEYLIST_NODE_VALUE(node);

	list_delete_value(list, client);
	remove_keylist_channel_t(client->subscribed_patterns, channel, node);

	if (!EG_LIST_LENGTH(list)) {
		keylist_delete_node(channel->patterns, node);
	}

	if (channel->auto_delete)
	{
		if (EG_KEYLIST_LENGTH(channel->topics) == 0 &&
			EG_KEYLIST_LENGTH(channel->patterns) == 0) {
			list_delete_value(server->channels, channel);
		}
	}

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
movq %rdx, %rsi
callq 0x8b04
testq %rax, %rax
je 0xa59b
movq %rax, %r14
movq 0x18(%rax), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x8d73
movq 0x68(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xa4b4
cmpl $0x0, 0x20(%r12)
jne 0xa564
movq 0x58(%rbx), %rdi
movq %r14, %rsi
callq 0x8c0c
xorl %ebp, %ebp
cmpl $0x0, 0x44(%rbx)
je 0xa5a0
movq 0x50(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0xa5a0
movq 0x58(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0xa5a0
leaq 0x7d09(%rip), %rax      # 0x12290
movq (%rax), %rax
movq 0x180(%rax), %rdi
movq %rbx, %rsi
callq 0x8d73
jmp 0xa5a0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/storage.c
// Function: storage_save_channels
static int storage_save_channels(FILE *fp)
{
	ListIterator iterator;
	ListNode *node;
	Channel_t *channel;

	list_rewind(server->channels, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		channel = EG_LIST_NODE_VALUE(node);

		if (!BIT_CHECK(channel->flags, EG_CHANNEL_DURABLE_FLAG))
			continue;

		if (storage_save_channel(fp, channel) != EG_STATUS_OK)
			return EG_STATUS_ERR;
	}

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x7146(%rip), %rax      # 0x12290
movq (%rax), %rax
movq 0x180(%rax), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x8ed9
movq %r14, %rdi
callq 0x8e98
testq %rax, %rax
je 0xb1e9
leaq 0x10(%rsp), %r14
leaq 0xf(%rsp), %r15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq 0x10(%rax), %r12
testb $0x4, 0x40(%r12)
je 0xb1dc
movb $0x6, 0xf(%rsp)
movl $0x1, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2450
testq %rax, %rax
je 0xb1eb
movq %r12, %rdi
callq 0x2150
leal 0x1(%rax), %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb3b3
cmpl $-0x1, %eax
je 0xb1eb
addq $0x40, %r12
movq %rbx, %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0xb3b3
cmpl $-0x1, %eax
je 0xb1eb
movq %r14, %rdi
callq 0x8e98
testq %rax, %rax
jne 0xb17d
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/storage.c
// Function: storage_save_background
int storage_save_background(const char *filename)
{
	pid_t child_pid;

	if (server->child_pid != -1)
		return EG_STATUS_ERR;

	if ((child_pid = fork()) == 0)
	{
		if (server->fd > 0)
			close(server->fd);

		if (server->sfd > 0)
			close(server->sfd);

		_exit(storage_save(filename));
	}
	else
	{
		if (child_pid == -1)
		{
			warning("Error save data in background: %s\n", strerror(errno));
			return EG_STATUS_ERR;
		}

		server->child_pid = child_pid;
	}

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x708b(%rip), %r14      # 0x12290
movq (%r14), %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, 0x34(%rax)
jne 0xb24b
movq %rdi, %rbx
callq 0x2480
cmpl $-0x1, %eax
je 0xb22e
testl %eax, %eax
je 0xb252
movq (%r14), %rcx
movl %eax, 0x34(%rcx)
xorl %ebp, %ebp
jmp 0xb24b
callq 0x2050
movl (%rax), %edi
callq 0x2470
leaq 0x15fd(%rip), %rdi      # 0xc83e
movq %rax, %rsi
xorl %eax, %eax
callq 0x4bc8
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq (%r14), %rax
movl 0x8(%rax), %edi
testl %edi, %edi
jle 0xb264
callq 0x21d0
movq (%r14), %rax
movl 0xc(%rax), %edi
testl %edi, %edi
jle 0xb270
callq 0x21d0
movq %rbx, %rdi
callq 0xab82
movl %eax, %edi
callq 0x2080
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/storage.c
// Function: storage_read_data
static int storage_read_data(FILE *fp, void *data, uint32_t maxlen)
{
	uint32_t comprlen;
	uint32_t length;
	void *compressed;

	if (storage_read(fp, &comprlen, sizeof(comprlen)) == -1)
		return EG_STATUS_ERR;

	if (storage_read(fp, &length, sizeof(length)) == -1)
		return EG_STATUS_ERR;

	if ((length > maxlen && !comprlen) || comprlen > maxlen)
		return EG_STATUS_ERR;

	if (comprlen)
	{
		compressed = xmalloc(length);

		if (storage_read(fp, compressed, length) == -1) {
			xfree(compressed);
			return EG_STATUS_ERR;
		}

		if (lzf_decompress(compressed, length, data, comprlen) == 0) {
			xfree(compressed);
			return EG_STATUS_ERR;
		}

		xfree(compressed);
	}
	else
	{
		if (storage_read(fp, data, length) == -1)
			return EG_STATUS_ERR;
	}

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x20b0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0xb3a2
movq %rsp, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x20b0
testq %rax, %rax
je 0xb3a2
movl (%rsp), %r12d
cmpl %r13d, %r12d
seta %al
movl 0x4(%rsp), %ebp
testl %ebp, %ebp
sete %cl
andb %al, %cl
cmpl %r13d, %ebp
seta %al
orb %cl, %al
jne 0xb3a2
testl %ebp, %ebp
je 0xb374
movq %r12, %rdi
callq 0x4770
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x20b0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %r12
je 0xb39a
testq %rax, %rax
je 0xb39a
movq %r13, %rdi
movl %r12d, %esi
movq %r14, %rdx
movl %ebp, %ecx
callq 0xb8b8
movl %eax, %ebp
movq %r13, %rdi
callq 0x4997
testl %ebp, %ebp
jne 0xb396
jmp 0xb3a2
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x20b0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %r12
je 0xb3a2
testq %rax, %rax
je 0xb3a2
xorl %ebx, %ebx
jmp 0xb3a2
movq %r13, %rdi
callq 0x4997
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/storage.c
// Function: storage_write_data
static int storage_write_data(FILE *fp, void *data, uint32_t length)
{
	int err;
	uint32_t comprlen = 0;

	err = storage_write_lzf_data(fp, data, length);

	if (err == -1)
		return EG_STATUS_ERR;

	if (err)
		return EG_STATUS_OK;

	if (storage_write(fp, &comprlen, sizeof(comprlen)) == -1)
		return EG_STATUS_ERR;

	if (storage_write(fp, &length, sizeof(length)) == -1)
		return EG_STATUS_ERR;

	if (storage_write(fp, data, length) == -1)
		return EG_STATUS_ERR;

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, (%rsp)
movl $0x0, 0x8(%rsp)
movl %edx, 0xc(%rsp)
cmpl $0x4, %edx
jbe 0xb48c
movl %edx, %r12d
leal -0x4(%r12), %ebp
leal -0x3(%r12), %edi
callq 0x4770
movq %rax, %r15
movq %r14, %rdi
movl %r12d, %esi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x24d0
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0xb484
leaq 0xc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2450
testq %rax, %rax
je 0xb475
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2450
testq %rax, %rax
je 0xb475
movl 0x4(%rsp), %r14d
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x2450
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %r14
je 0xb475
testq %rax, %rax
je 0xb475
movq %r15, %rdi
callq 0x4997
xorl %ebp, %ebp
jmp 0xb4f4
movq %r15, %rdi
callq 0x4997
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xb4f4
movq %r15, %rdi
callq 0x4997
leaq 0x8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2450
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0xb4f4
movq %rsp, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2450
testq %rax, %rax
je 0xb4f4
movl (%rsp), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rsi
sete %bpl
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2450
testq %rax, %rax
sete %al
orb %bpl, %al
movzbl %al, %ebp
negl %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/yakushstanislav[P]EagleMQ/src/config.c
// Function: config_load
int config_load(const char *filename)
{
	char line[512];
	FILE *fp;

	fp = fopen(filename, "r");
	if (!fp)
		return EG_STATUS_ERR;

	while (fgets(line, sizeof(line), fp) != NULL)
	{
		if (parse_config_line(line) != EG_STATUS_OK)
		{
			fclose(fp);
			return EG_STATUS_ERR;
		}
	}

	fclose(fp);

	return EG_STATUS_OK; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
leaq 0x10d2(%rip), %rsi      # 0xc8a2
callq 0x23b0
testq %rax, %rax
je 0xb891
movq %rax, %rbx
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rax, %rdx
callq 0x2210
testq %rax, %rax
je 0xb898
leaq 0x113e(%rip), %r14      # 0xc93f
movq %rsp, %r15
movabsq $0x800000401, %r12      # imm = 0x800000401
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movzbl (%rsp), %eax
cmpq $0x23, %rax
ja 0xb83a
btq %rax, %r12
jae 0xb83a
movq %r15, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x2210
testq %rax, %rax
jne 0xb813
jmp 0xb898
movq %r15, %rdi
movq %r14, %rsi
callq 0x23d0
testq %rax, %rax
je 0xb89a
xorl %r12d, %r12d
xorl %r13d, %r13d
testq %r13, %r13
je 0xb85f
testq %r12, %r12
movq %rax, %r12
je 0xb862
jmp 0xb89a
movq %rax, %r13
xorl %edi, %edi
movq %r14, %rsi
callq 0x23d0
testq %rax, %rax
jne 0xb850
testq %r12, %r12
je 0xb89a
movq %r13, %rdi
movq %r12, %rsi
callq 0xb504
testl %eax, %eax
movabsq $0x800000401, %r12      # imm = 0x800000401
je 0xb823
jmp 0xb89a
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xb8a2
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2120
movl %ebp, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/antonblanchard[P]will-it-scale/tests/lock1.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char tmpfile[] = "/tmp/willitscale.XXXXXX";
	int fd = mkstemp(tmpfile);

	assert(fd >= 0);
	unlink(tmpfile);

	while (1) {
		struct flock lck;

		lck.l_type = F_WRLCK;
		lck.l_whence = SEEK_SET;
		lck.l_start = 0;
		lck.l_len = 1;
		assert(fcntl(fd, F_SETLKW, &lck) == 0);

		lck.l_type = F_UNLCK;
		lck.l_whence = SEEK_SET;
		lck.l_start = 0;
		lck.l_len = 1;
		assert(fcntl(fd, F_SETLKW, &lck) == 0);

		(*iterations) += 2;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movaps 0x5fe(%rip), %xmm0      # 0x2310
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movabsq $0x5858585858582e, %rax # imm = 0x5858585858582E
movq %rax, 0x10(%rdi)
callq 0x11f0
testl %eax, %eax
js 0x1dee
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x1080
movq %rsp, %rdx
movl $0x1, (%rdx)
movq $0x0, 0x8(%rdx)
movq $0x1, 0x10(%rdx)
movl %ebp, %edi
movl $0x7, %esi
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1dcf
movq %rsp, %r14
movl $0x2, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl %ebp, %edi
movl $0x7, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1e0d
addq $0x2, (%rbx)
movl $0x1, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl %ebp, %edi
movl $0x7, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
je 0x1d6f
leaq 0x51b(%rip), %rdi       # 0x22f1
leaq 0x4d3(%rip), %rsi       # 0x22b0
leaq 0x4da(%rip), %rcx       # 0x22be
movl $0x18, %edx
callq 0x1140
leaq 0x4b3(%rip), %rdi       # 0x22a8
leaq 0x4b4(%rip), %rsi       # 0x22b0
leaq 0x4bb(%rip), %rcx       # 0x22be
movl $0xe, %edx
callq 0x1140
leaq 0x4dd(%rip), %rdi       # 0x22f1
leaq 0x495(%rip), %rsi       # 0x22b0
leaq 0x49c(%rip), %rcx       # 0x22be
movl $0x1e, %edx
callq 0x1140
// File: /workspace/github_c_makefile_star2_O3/sadistech[P]nesromtool2/./src/tilec_main.c
// Function: parse_opts
tilec_opts* parse_opts(int argc, char **argv) {
  if (argc < 3) {
    fprintf(stderr, "Usage: %s <outfile> <infile> [ <infile> ... ]\n", argv[0]);
    exit(EXIT_FAILURE);
  }

  tilec_opts *opts = (tilec_opts*)calloc(1, sizeof(tilec_opts));

  static struct option longopts[] = {
    { "help", no_argument, NULL, 'h' },
    { "outfile", required_argument, NULL, 'o' },
    { "varfile", required_argument, NULL, 'V' },
    { NULL, 0, NULL, 0 }
  };

  int ch;

  while ((ch = getopt_long(argc, argv, "ho:V:", longopts, NULL)) != -1) {
    switch (ch) {
      case 'h':
        printf("USAGE\n");
        exit(EXIT_SUCCESS);
        break;

      case 'o':
        strncpy(opts->outfile, optarg, PATH_MAX);
        break;

      case 'V':
        strncpy(opts->varfile, optarg, PATH_MAX);
        break;

      case 0:
        break;
      default:
        fprintf(stderr, "Invalid argument: -%c\n", ch);
        exit(EXIT_FAILURE);
    }
  }

  // set up default values if they aren't already in there.
  if (opts->outfile[0] == 0) {
    strncpy(opts->outfile, DEFAULT_OUTFILE, PATH_MAX);
  }

  if (opts->varfile[0] == 0) {
    strncpy(opts->varfile, DEFAULT_VARFILE, PATH_MAX);
  }

  argc -= optind;
  argv += optind;

  opts->argc = argc;
  opts->argv = argv;

  return opts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2, %edi
jle 0x5d37
movl %edi, %ebp
movl $0x1, %edi
movl $0x2010, %esi           # imm = 0x2010
callq 0x21b0
movq %rax, %r14
addq $0x1000, %rax           # imm = 0x1000
movq %rax, (%rsp)
leaq 0x2c3a(%rip), %r12      # 0x889f
leaq 0x6d04(%rip), %r13      # 0xc970
movq 0x635d(%rip), %r15      # 0xbfd0
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x2130
cmpl $0x55, %eax
jle 0x5cab
movq %r14, %rdi
cmpl $0x56, %eax
je 0x5c9c
movq (%rsp), %rdi
cmpl $0x6f, %eax
jne 0x5d18
movq (%r15), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2070
jmp 0x5c73
testl %eax, %eax
je 0x5c73
cmpl $-0x1, %eax
jne 0x5d30
movq (%rsp), %rdi
cmpb $0x0, (%rdi)
jne 0x5cce
leaq 0x2be1(%rip), %rsi      # 0x88a5
movl $0x1000, %edx           # imm = 0x1000
callq 0x2070
cmpb $0x0, (%r14)
jne 0x5ce8
leaq 0x2bd3(%rip), %rsi      # 0x88ae
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
callq 0x2070
movq 0x62d9(%rip), %rax      # 0xbfc8
movslq (%rax), %rax
subl %eax, %ebp
leaq (%rbx,%rax,8), %rax
movl %ebp, 0x2000(%r14)
movq %rax, 0x2008(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x68, %eax
jne 0x5d30
leaq 0x2c67(%rip), %rdi      # 0x898b
callq 0x20b0
xorl %edi, %edi
callq 0x2310
movl %eax, %edi
callq 0x2852
movq %rbx, %rdi
callq 0x2875
// File: /workspace/github_c_makefile_star2_O3/sadistech[P]nesromtool2/./src/tilec_main.c
// Function: is_in_bank
bool is_in_bank(nrt_chrbank *bank, int bank_size, nrt_tile *tile) {
  int i;
  for (i = 0; i < bank_size; i++) {
    if (memcmp(&(bank->tile[i]), tile, NRT_TILE_SIZE) == 0) {
      // they match!
      last_offset = i;
      return true;
    }
  }

  return false;
}

// Assembly:
xorl %ecx, %ecx
testl %esi, %esi
jle 0x6069
movdqu (%rdi), %xmm0
movdqu (%rdx), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x606c
movl %esi, %eax
addq $0x10, %rdi
leaq -0x1(%rax), %rsi
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x6069
movdqu (%rdi), %xmm0
movdqu (%rdx), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %r8d
addq $0x10, %rdi
incq %rcx
cmpl $0xffff, %r8d           # imm = 0xFFFF
jne 0x603b
cmpq %rax, %rcx
setb %al
jmp 0x606e
xorl %eax, %eax
retq
movb $0x1, %al
movl %ecx, 0x6980(%rip)      # 0xc9f4
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/bench/random_read/main.c
// Function: main
int
main(int argc, char * argv[])
{
	struct sock_addr ** sas;
	uintmax_t N;
	int s;
	struct wire_requestqueue * Q;

	WARNP_INIT;

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

	/* Parse N. */
	if (PARSENUM(&N, argv[2])) {
		warnp("Invalid value for N: %s", argv[2]);
		exit(1);
	}

	/* Resolve the socket address and connect. */
	if ((sas = sock_resolve(argv[1])) == NULL) {
		warnp("Error resolving socket address: %s", argv[1]);
		exit(1);
	}
	if (sas[0] == NULL) {
		warn0("No addresses found for %s", argv[1]);
		exit(1);
	}
	if ((s = sock_connect(sas)) == -1)
		exit(1);

	/* Create a request queue. */
	if ((Q = wire_requestqueue_init(s)) == NULL) {
		warnp("Cannot create packet write queue");
		exit(1);
	}

	/* Start issuing random read requests. */
	if (randomread(Q, N))
		exit(1);

	/* Free the request queue. */
	wire_requestqueue_destroy(Q);
	wire_requestqueue_free(Q);

	/* Free socket addresses. */
	sock_addr_freelist(sas);

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x258b
callq 0x4fc0
cmpl $0x3, %ebx
jne 0x25c3
callq 0x2090
movl $0x0, (%rax)
movq 0x10(%r14), %r12
testq %r12, %r12
jne 0x25e4
leaq 0xaaf5(%rip), %rdi      # 0xd0a0
leaq 0xaaf8(%rip), %rsi      # 0xd0aa
leaq 0xab13(%rip), %rcx      # 0xd0cc
movl $0xbb, %edx
callq 0x2160
movq 0x10a2e(%rip), %rax     # 0x12ff8
movq (%rax), %rdi
leaq 0xaa30(%rip), %rsi      # 0xd004
leaq 0xaa42(%rip), %rdx      # 0xd01d
xorl %eax, %eax
callq 0x21d0
jmp 0x2654
movq %rax, %rbx
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x22a0
movq %rax, %r15
movq (%r13), %rax
cmpq %r12, %rax
je 0x2636
cmpb $0x0, (%rax)
jne 0x2636
cmpl $0x0, (%rbx)
jne 0x263c
movq 0x8(%r14), %rdi
callq 0x3fbc
testq %rax, %rax
jne 0x265e
cmpl $0x0, (%rbx)
movq 0x8(%r14), %rsi
leaq 0xaa17(%rip), %rdi      # 0xd042
jne 0x2647
xorl %eax, %eax
callq 0x515f
jmp 0x2654
movl $0x16, (%rbx)
movq 0x10(%r14), %rsi
leaq 0xa9e3(%rip), %rdi      # 0xd02a
xorl %eax, %eax
callq 0x5040
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x22d0
movq %rax, %r12
cmpq $0x0, (%rax)
jne 0x267b
movq 0x8(%r14), %rsi
leaq 0xa9f3(%rip), %rdi      # 0xd065
xorl %eax, %eax
callq 0x515f
jmp 0x264e
movq %r12, %rdi
callq 0x48d4
cmpl $-0x1, %eax
je 0x2654
movl %eax, %edi
callq 0x6de0
testq %rax, %rax
jne 0x26a9
cmpl $0x0, (%rbx)
jne 0x26da
leaq 0xa9df(%rip), %rdi      # 0xd07f
xorl %eax, %eax
callq 0x515f
jmp 0x2654
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x26ed
testl %eax, %eax
jne 0x2654
movq %r14, %rdi
callq 0x74d1
movq %r14, %rdi
callq 0x74e5
movq %r12, %rdi
callq 0x46ce
xorl %edi, %edi
callq 0x22d0
leaq 0xa99e(%rip), %rdi      # 0xd07f
xorl %eax, %eax
callq 0x5040
jmp 0x264e