LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x8226
movq %r14, %rdi
callq 0x81e5
testq %rax, %rax
je 0x911b
movq 0x10(%rax), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2230
testl %eax, %eax
jne 0x90f9
jmp 0x911e
xorl %r15d, %r15d
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movq 0x50(%rdi), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x7f19
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x7f20
testq %rax, %rax
je 0x917d
movq 0x18(%rax), %rax
addl 0x20(%rax), %ebp
jmp 0x9167
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x60
popq %rdi
callq 0x40f8
movq %rax, %rbx
movq %r14, %rdi
callq 0x2150
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2280
movl %ebp, 0x40(%rbx)
andq $0x0, 0x44(%rbx)
testb $0x1, %bpl
je 0x91cc
movl $0x1, 0x44(%rbx)
testb $0x2, %bpl
je 0x91d9
movl $0x1, 0x48(%rbx)
callq 0x7e6c
movq %rax, 0x50(%rbx)
callq 0x7e6c
movq %rax, 0x58(%rbx)
movq 0x50(%rbx), %rcx
leaq 0x1f(%rip), %rdx        # 0x9215
movq %rdx, 0x10(%rcx)
leaq 0x26(%rip), %rsi        # 0x9227
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_O2/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 0x7f19
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x7f20
testq %rax, %rax
je 0x9296
movq %rax, %r12
movq 0x18(%rax), %rdi
movq %r15, %rsi
callq 0x8226
movq %r15, %rdi
callq 0x81e5
testq %rax, %rax
je 0x925a
movq 0x10(%rax), %rsi
movq 0x10(%r12), %rdx
movq %rbx, %rdi
callq 0x9606
jmp 0x9276
movq 0x58(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x7f19
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x7f20
testq %rax, %rax
je 0x92e6
movq %rax, %r12
movq 0x18(%rax), %rdi
movq %r15, %rsi
callq 0x8226
movq %r15, %rdi
callq 0x81e5
testq %rax, %rax
je 0x92aa
movq 0x10(%rax), %rsi
movq 0x10(%r12), %rdx
movq %rbx, %rdi
callq 0x96fb
jmp 0x92c6
movq 0x50(%rbx), %rdi
callq 0x7e85
movq 0x58(%rbx), %rdi
callq 0x7e85
movq %rbx, %rdi
callq 0x430e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7ed0
testq %rax, %rax
je 0x935e
movq 0x18(%rax), %r13
cmpl $0x0, 0x48(%r15)
je 0x93da
movq %r13, %rdi
callq 0x81fe
movq (%r13), %rax
movq 0x10(%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x7788
movq 0x58(%r15), %rdi
cmpl $0x0, 0x20(%rdi)
je 0x93cb
movq %rsp, %rsi
callq 0x7f19
leaq 0x8(%rsp), %r13
movq %rsp, %rdi
callq 0x7f20
testq %rax, %rax
je 0x93cb
movq %rax, %r12
movq 0x10(%rax), %rbp
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x4acd
testl %eax, %eax
je 0x9375
movq 0x18(%r12), %rdi
movq %r13, %rsi
callq 0x8226
movq %r13, %rdi
callq 0x81e5
testq %rax, %rax
je 0x9375
movq 0x10(%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x7822
jmp 0x93a7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x8226
movq %r12, %rdi
callq 0x81e5
testq %rax, %rax
je 0x935e
movq 0x10(%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x7788
jmp 0x93ea
// File: /workspace/github_c_makefile_star2_O2/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 0x8226
movq %r14, %rdi
callq 0x81e5
testq %rax, %rax
je 0x9448
movq 0x10(%rax), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2230
testl %eax, %eax
jne 0x9426
jmp 0x944b
xorl %r15d, %r15d
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7ed0
testq %rax, %rax
je 0x94c4
movq %rax, %r12
movq 0x18(%rax), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8109
testq %rax, %rax
je 0x94ee
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x7fec
movq %rax, %r15
movq 0x50(%rbx), %r12
movq %r13, %rdi
callq 0x42e1
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x7f30
movq 0x50(%rbx), %rax
movq 0x8(%rax), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x8096
movq 0x60(%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x950e
// File: /workspace/github_c_makefile_star2_O2/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 0x7ed0
testq %rax, %rax
je 0x9549
movq 0x18(%rax), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8109
testq %rax, %rax
je 0x955f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x7fec
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x7f30
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8096
// File: /workspace/github_c_makefile_star2_O2/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 0x7ed0
testq %rax, %rax
je 0x95b9
movq %rax, %r12
movq 0x18(%rax), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8109
testq %rax, %rax
je 0x95e3
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x7fec
movq %rax, %r15
movq 0x58(%rbx), %r12
movq %r13, %rdi
callq 0x42e1
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x7f30
movq 0x58(%rbx), %rax
movq 0x8(%rax), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x8096
movq 0x68(%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x950e
// File: /workspace/github_c_makefile_star2_O2/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 0x7ed0
testq %rax, %rax
je 0x9691
movq %rax, %r14
movq 0x18(%rax), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x80e7
movq 0x60(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x969f
cmpl $0x0, 0x20(%r12)
jne 0x965a
movq 0x50(%rbx), %rdi
movq %r14, %rsi
callq 0x7f97
xorl %ebp, %ebp
cmpl $0x0, 0x44(%rbx)
je 0x9694
movq 0x50(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x9694
movq 0x58(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x9694
leaq 0x8c13(%rip), %rax      # 0x12290
movq (%rax), %rax
movq 0x180(%rax), %rdi
movq %rbx, %rsi
callq 0x80e7
jmp 0x9694
pushq $-0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7ed0
testq %rax, %rax
je 0x96d1
movq %rax, %r14
movq 0x18(%rax), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x80e7
cmpl $0x0, 0x20(%r12)
je 0x96dd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0x8005
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x7f97
// File: /workspace/github_c_makefile_star2_O2/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 0x7ed0
testq %rax, %rax
je 0x9786
movq %rax, %r14
movq 0x18(%rax), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x80e7
movq 0x68(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x969f
cmpl $0x0, 0x20(%r12)
jne 0x974f
movq 0x58(%rbx), %rdi
movq %r14, %rsi
callq 0x7f97
xorl %ebp, %ebp
cmpl $0x0, 0x44(%rbx)
je 0x9789
movq 0x50(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x9789
movq 0x58(%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x9789
leaq 0x8b1e(%rip), %rax      # 0x12290
movq (%rax), %rax
movq 0x180(%rax), %rdi
movq %rbx, %rsi
callq 0x80e7
jmp 0x9789
pushq $-0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8002(%rip), %r14      # 0x12290
movq (%r14), %rax
pushq $-0x1
popq %rbp
cmpl $-0x1, 0x34(%rax)
jne 0xa2d2
movq %rdi, %rbx
callq 0x2490
cmpl $-0x1, %eax
je 0xa2b5
testl %eax, %eax
je 0xa2d9
movq (%r14), %rcx
movl %eax, 0x34(%rcx)
xorl %ebp, %ebp
jmp 0xa2d2
callq 0x2050
movl (%rax), %edi
callq 0x2480
leaq 0x2536(%rip), %rdi      # 0xc7fe
movq %rax, %rsi
xorl %eax, %eax
callq 0x4548
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq (%r14), %rax
movl 0x8(%rax), %edi
testl %edi, %edi
jle 0xa2eb
callq 0x21d0
movq (%r14), %rax
movl 0xc(%rax), %edi
testl %edi, %edi
jle 0xa2f7
callq 0x21d0
movq %rbx, %rdi
callq 0x9cfe
movl %eax, %edi
callq 0x2080
// File: /workspace/github_c_makefile_star2_O2/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, %ebp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0xa332
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0xa41e
movq %rsp, %rsi
pushq $0x4
popq %rdx
movq %r15, %rdi
callq 0xa332
cmpl $-0x1, %eax
je 0xa41e
movl (%rsp), %r12d
cmpl %ebp, %r12d
seta %al
movl 0x4(%rsp), %r13d
testl %r13d, %r13d
sete %cl
andb %al, %cl
cmpl %ebp, %r13d
seta %al
orb %cl, %al
jne 0xa41e
testl %r13d, %r13d
je 0xa3ff
movq %r12, %rdi
callq 0x40f8
movq %rax, %rbp
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xa332
cmpl $-0x1, %eax
je 0xa416
movq %rbp, %rdi
movl %r12d, %esi
movq %r14, %rdx
movl %r13d, %ecx
callq 0xad14
movl %eax, %r14d
movq %rbp, %rdi
callq 0x430e
testl %r14d, %r14d
jne 0xa412
jmp 0xa41e
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xa332
cmpl $-0x1, %eax
je 0xa41e
xorl %ebx, %ebx
jmp 0xa41e
movq %rbp, %rdi
callq 0x430e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, 0x8(%rsp)
movq %rdi, %rbx
movl %edx, (%rsp)
movl %edx, 0xc(%rsp)
cmpl $0x4, %edx
jbe 0xa505
movl %edx, %r12d
leal -0x4(%r12), %ebp
leal -0x3(%r12), %edi
callq 0x40f8
movq %rax, %r15
movq %r14, %rdi
movl %r12d, %esi
movq %rax, %rdx
movl %ebp, %ecx
callq 0xa8e4
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0xa4fd
leaq 0xc(%rsp), %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0xa42f
cmpl $-0x1, %eax
je 0xa4f0
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0xa42f
cmpl $-0x1, %eax
je 0xa4f0
movl 0x4(%rsp), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa42f
cmpl $-0x1, %eax
je 0xa4f0
movq %r15, %rdi
callq 0x430e
xorl %ebp, %ebp
jmp 0xa549
movq %r15, %rdi
callq 0x430e
pushq $-0x1
popq %rbp
jmp 0xa549
movq %r15, %rdi
callq 0x430e
leaq 0x8(%rsp), %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0xa42f
pushq $-0x1
popq %rbp
cmpl $-0x1, %eax
je 0xa549
movq %rsp, %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0xa42f
cmpl $-0x1, %eax
je 0xa549
movl (%rsp), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa42f
xorl %ebp, %ebp
cmpl $-0x1, %eax
sete %bpl
negl %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2046(%rip), %rsi      # 0xc862
callq 0x23c0
testq %rax, %rax
je 0xa8bd
movq %rax, %rbx
movq %rsp, %r15
leaq 0x20c8(%rip), %r12      # 0xc8ff
movabsq $0x800000401, %r14      # imm = 0x800000401
movq %r15, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x2210
testq %rax, %rax
je 0xa8c3
movzbl (%rsp), %eax
cmpq $0x23, %rax
ja 0xa866
btq %rax, %r14
jb 0xa841
movq %r15, %rdi
movq %r12, %rsi
callq 0x23e0
xorl %r13d, %r13d
xorl %ebp, %ebp
testq %rax, %rax
je 0xa89c
testq %r13, %r13
je 0xa887
testq %rbp, %rbp
je 0xa88d
jmp 0xa8b5
movq %rax, %r13
movq %rbp, %rax
movq %rax, %rbp
xorl %edi, %edi
movq %r12, %rsi
callq 0x23e0
jmp 0xa876
testq %r13, %r13
je 0xa8b5
testq %rbp, %rbp
je 0xa8b5
movq %r13, %rdi
movq %rbp, %rsi
callq 0xa558
testl %eax, %eax
je 0xa841
pushq $-0x1
popq %rax
movl %eax, %r14d
jmp 0xa8c6
pushq $-0x1
popq %r14
jmp 0xa8ce
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x2120
movl %r14d, %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_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movaps 0x70c(%rip), %xmm0      # 0x22e0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movabsq $0x5858585858582e, %rax # imm = 0x5858585858582E
movq %rax, 0x10(%rdi)
callq 0x11f0
testl %eax, %eax
js 0x1c5e
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x1080
pushq $0x7
popq %r14
movq %rsp, %r15
movl $0x1, (%rsp)
andq $0x0, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1c77
movl $0x2, (%rsp)
andq $0x0, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1c90
addq $0x2, (%rbx)
jmp 0x1c06
leaq 0x613(%rip), %rdi       # 0x2278
leaq 0x614(%rip), %rsi       # 0x2280
leaq 0x61b(%rip), %rcx       # 0x228e
pushq $0xe
jmp 0x1ca7
leaq 0x643(%rip), %rdi       # 0x22c1
leaq 0x5fb(%rip), %rsi       # 0x2280
leaq 0x602(%rip), %rcx       # 0x228e
pushq $0x18
jmp 0x1ca7
leaq 0x62a(%rip), %rdi       # 0x22c1
leaq 0x5e2(%rip), %rsi       # 0x2280
leaq 0x5e9(%rip), %rcx       # 0x228e
pushq $0x1e
popq %rdx
callq 0x1140
// File: /workspace/github_c_makefile_star2_O2/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 0x54e7
movl %edi, %ebp
pushq $0x1
popq %rdi
movl $0x2010, %esi           # imm = 0x2010
callq 0x21b0
movq %rax, %r14
addq $0x1000, %rax           # imm = 0x1000
movq %rax, (%rsp)
leaq 0x24a0(%rip), %r12      # 0x789f
leaq 0x656a(%rip), %r13      # 0xb970
movq 0x5bc3(%rip), %r15      # 0xafd0
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x2130
testl %eax, %eax
je 0x540d
movq %r14, %rdi
cmpl $0x56, %eax
je 0x5435
movq (%rsp), %rdi
cmpl $0x6f, %eax
jne 0x5444
movq (%r15), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2070
jmp 0x540d
cmpl $-0x1, %eax
jne 0x54ad
movq (%rsp), %rdi
cmpb $0x0, (%rdi)
jne 0x5463
leaq 0x244c(%rip), %rsi      # 0x78a5
movl $0x1000, %edx           # imm = 0x1000
callq 0x2070
cmpb $0x0, (%r14)
jne 0x547d
leaq 0x243e(%rip), %rsi      # 0x78ae
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
callq 0x2070
movq 0x5b44(%rip), %rax      # 0xafc8
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 0x54c5
leaq 0x24d2(%rip), %rdi      # 0x798b
callq 0x20b0
xorl %edi, %edi
callq 0x2310
movq 0x5b2c(%rip), %rcx      # 0xaff8
movq (%rcx), %rdi
leaq 0x2157(%rip), %rsi      # 0x762d
movl %eax, %edx
xorl %eax, %eax
callq 0x21e0
pushq $0x1
popq %rdi
callq 0x2310
movq 0x5b0a(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x236d(%rip), %rsi      # 0x7868
xorl %eax, %eax
callq 0x21e0
jmp 0x54df
// File: /workspace/github_c_makefile_star2_O2/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 %eax, %eax
testl %esi, %esi
movl $0x0, %ecx
cmovgl %esi, %ecx
cmpq %rax, %rcx
je 0x5821
movdqu (%rdx), %xmm0
movdqu (%rdi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %r8d
cmpl $0xffff, %r8d           # imm = 0xFFFF
je 0x581b
incq %rax
addq $0x10, %rdi
jmp 0x57f3
movl %eax, 0x61d3(%rip)      # 0xb9f4
movslq %esi, %rcx
cmpq %rcx, %rax
setl %al
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/bench/random_read/main.c
// Function: sendbatch
static int
sendbatch(struct randomread_state * C)
{
	unsigned long N;
	uint64_t X, Y;

	while (C->Nip < 4096) {
		/* Generate a random key. */
		N = (size_t)random() % C->Nmax;
		X = N >> 16;
		Y = N - (X << 16);
		mkkey(X, Y, C->key->buf);

		/* Send the request. */
		if (proto_kvlds_request_get(C->Q, C->key,
		    callback_get, C))
			goto err0;
		C->Nip += 1;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x10(%rdi), %rax
xorl %ebx, %ebx
leaq 0x5e(%rip), %r15        # 0x2744
pushq $-0x1
popq %rbp
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2737
callq 0x2210
xorl %edx, %edx
divq 0x18(%r14)
movzwl %dx, %esi
movq %rdx, %rdi
shrq $0x10, %rdi
movq 0x28(%r14), %rdx
incq %rdx
callq 0x5078
movq (%r14), %rdi
movq 0x28(%r14), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x5b66
testl %eax, %eax
jne 0x2735
movq 0x10(%r14), %rax
incq %rax
movq %rax, 0x10(%r14)
jmp 0x26e9
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/bench/random_read/main.c
// Function: callback_get
static int
callback_get(void * cookie, int failed, struct kvldskey * value)
{
	struct randomread_state * C = cookie;

	/* This request is no longer in progress. */
	C->Nip -= 1;

	/* Did we fail? */
	if (failed) {
		C->done = 1;
		C->failed = 1;
	}

	/* If we have a value, free it. */
	if (failed == 0)
		kvldskey_free(value);

	/* Notify the benchmarking code, and check if we should quit. */
	if (bench_tick(C->B, &C->done)) {
		warnp("bench_tick");
		goto err0;
	}

	/* Send more requests if possible. */
	if ((!C->done) && sendbatch(C))
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
decq 0x10(%rdi)
testl %esi, %esi
je 0x2763
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x20(%rbx)
jmp 0x276b
movq %rdx, %rdi
callq 0x2040
movq 0x30(%rbx), %rdi
leaq 0x24(%rbx), %r14
movq %r14, %rsi
callq 0x4ed1
testl %eax, %eax
je 0x279f
callq 0x2090
cmpl $0x0, (%rax)
je 0x27b5
movq %rax, %rbx
leaq 0x99b1(%rip), %rdi      # 0xc144
xorl %eax, %eax
callq 0x4a41
andl $0x0, (%rbx)
jmp 0x27c3
xorl %ebp, %ebp
cmpl $0x0, (%r14)
jne 0x27c6
movq %rbx, %rdi
callq 0x26cf
testl %eax, %eax
jne 0x27c3
jmp 0x27c6
leaq 0x9988(%rip), %rdi      # 0xc144
xorl %eax, %eax
callq 0x4bd0
pushq $-0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/bench/mkpair.c
// Function: mkkey
void
mkkey(uint64_t X, uint64_t Y, uint8_t * buf)
{
	SHA256_CTX ctx;
	uint8_t hbuf[17];

	/* Store big-endian X. */
	be64enc(&buf[0], X);

	/* Generate \000.X.Y. */
	hbuf[0] = 0;
	be64enc(&hbuf[1], X);
	be64enc(&hbuf[9], Y);

	/* Compute sha256(\000.X.Y). */
	SHA256_Init(&ctx);
	SHA256_Update(&ctx, hbuf, 17);
	SHA256_Final(&buf[8], &ctx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x5163
movq %rsp, %r14
movb $0x0, (%r14)
movb %bl, 0x8(%r14)
movb %bh, 0x7(%rsp)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x6(%r14)
movl %ebx, %eax
shrl $0x18, %eax
movb %al, 0x5(%r14)
movq %rbx, %rax
shrq $0x20, %rax
movb %al, 0x4(%r14)
movq %rbx, %rax
shrq $0x28, %rax
movb %al, 0x3(%r14)
movq %rbx, %rax
shrq $0x30, %rax
movb %al, 0x2(%r14)
shrq $0x38, %rbx
movb %bl, 0x1(%r14)
movq %r15, %rcx
movb %cl, 0x10(%r14)
movb %ch, 0xf(%rsp)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0xe(%r14)
movl %ecx, %eax
shrl $0x18, %eax
movb %al, 0xd(%r14)
movq %r15, %rax
shrq $0x20, %rax
movb %al, 0xc(%r14)
movq %r15, %rax
shrq $0x28, %rax
movb %al, 0xb(%r14)
movq %r15, %rax
shrq $0x30, %rax
movb %al, 0xa(%r14)
shrq $0x38, %rcx
movb %cl, 0x9(%r14)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x7084
pushq $0x11
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x71ee
addq $0x8, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x72e0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/bench/mkpair.c
// Function: mkval
void
mkval(uint64_t X, uint64_t Y, uint8_t * buf)
{
	SHA256_CTX ctx;
	uint8_t hbuf[17];

	/* Store big-endian X * 2^16 + Y. */
	be64enc(&buf[0], (X << 16) + Y);

	/* Generate \001.X.Y. */
	hbuf[0] = 0;
	be64enc(&hbuf[1], X);
	be64enc(&hbuf[9], Y);

	/* Compute sha256(\001.X.Y). */
	SHA256_Init(&ctx);
	SHA256_Update(&ctx, hbuf, 17);
	SHA256_Final(&buf[8], &ctx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rdi, %rsi
shlq $0x10, %rsi
addq %r15, %rsi
movq %rdx, %rdi
callq 0x5163
movq %rsp, %r14
movb $0x0, (%r14)
movb %bl, 0x8(%r14)
movb %bh, 0x7(%rsp)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x6(%r14)
movl %ebx, %eax
shrl $0x18, %eax
movb %al, 0x5(%r14)
movq %rbx, %rax
shrq $0x20, %rax
movb %al, 0x4(%r14)
movq %rbx, %rax
shrq $0x28, %rax
movb %al, 0x3(%r14)
movq %rbx, %rax
shrq $0x30, %rax
movb %al, 0x2(%r14)
shrq $0x38, %rbx
movb %bl, 0x1(%r14)
movq %r15, %rcx
movb %cl, 0x10(%r14)
movb %ch, 0xf(%rsp)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0xe(%r14)
movl %ecx, %eax
shrl $0x18, %eax
movb %al, 0xd(%r14)
movq %r15, %rax
shrq $0x20, %rax
movb %al, 0xc(%r14)
movq %r15, %rax
shrq $0x28, %rax
movb %al, 0xb(%r14)
movq %r15, %rax
shrq $0x30, %rax
movb %al, 0xa(%r14)
shrq $0x38, %rcx
movb %cl, 0x9(%r14)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x7084
pushq $0x11
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x71ee
addq $0x8, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x72e0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/main.c
// Function: main
int main(int argc, char *argv[])
{
	int i;
	if (argc < 2)
		goto over;
	EXEC = argv[0];
	for (i = 0; i < ARRAYSIZE(cmds); i++) {
		if (strcmp(cmds[i].cmd, argv[1]) == 0) {
			cmds[i].handler(argc-1, &argv[1]);
			break;
		}
	}
	if (i >= ARRAYSIZE(cmds)) {
		over:
		fprintf(stderr, "usage: %s <command> [<args>]\n", argv[0]);
		exit(EINVAL);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rax
movq %rax, -0x30(%rbp)
cmpl $0x2, %edi
jl 0x2437
movq %rsi, %r14
movl %edi, %r15d
movq -0x30(%rbp), %rax
movq %rax, 0x8d91(%rip)      # 0xb178
movq 0x8(%rsi), %r12
addq $0x8, %r14
xorl %ecx, %ecx
leaq 0x8968(%rip), %r13      # 0xad60
leaq 0x10(%rcx), %rbx
cmpq $0x90, %rbx
je 0x2437
movq (%rcx,%r13), %rdi
movq %r12, %rsi
callq 0x2180
movq %rbx, %rcx
testl %eax, %eax
jne 0x23f8
decl %r15d
movl %r15d, %edi
movq %r14, %rsi
callq *-0x8(%rbx,%r13)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8bba(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x5bbc(%rip), %rsi      # 0x8004
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2190
pushq $0x16
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/main.c
// Function: help
static void
help(int argc, char *argv[])
{
	int i;
	(void)argc;
	(void)argv;
	fprintf(stdout, "sub command list:\n");
	for (i = 0; i < ARRAYSIZE(cmds); i++) {
		fprintf(stdout, "%s\n", cmds[i].cmd);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8b63(%rip), %r14      # 0xafd0
movq (%r14), %rcx
leaq 0x5bde(%rip), %rdi      # 0x8055
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
callq 0x2280
leaq 0x88d7(%rip), %r15      # 0xad60
leaq 0x5d17(%rip), %rbx      # 0x81a7
xorl %r12d, %r12d
cmpq $0x80, %r12
je 0x24b3
movq (%r14), %rdi
movq (%r12,%r15), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2190
addq $0x10, %r12
jmp 0x2493
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/main.c
// Function: history_h
static void
history_h(int argc, char *argv[])
{
	int c, n = 0;
	(void)argc;
	(void)argv;
	while ((c = getopt(argc, argv, "n:?")) != -1) {
		switch (c) {
		case 'n':
			n = strtol(optarg, NULL, 0);
			break;
		case '?':
			exit(EINVAL);
			break;
		}
	}
	history(n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
xorl %r12d, %r12d
leaq 0x5b82(%rip), %r15      # 0x8068
movq 0x8aeb(%rip), %r13      # 0xafd8
movl %r14d, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2250
cmpl $-0x1, %eax
je 0x251e
cmpl $0x6e, %eax
je 0x250c
cmpl $0x3f, %eax
jne 0x24ed
jmp 0x2534
movq (%r13), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21b0
movq %rax, %r12
jmp 0x24ed
movl %r12d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2f4c
pushq $0x16
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/main.c
// Function: list_h
static void
list_h(int argc, char *argv[])
{
	(void)argc;
	(void)argv;
	struct list_args args;
	if (argc < 2) {
		fprintf(stderr, "usage: %s list hash\n", EXEC);
		exit(EINVAL);
	}
	args.hash = dr_newstr(argv[1]);
	list(&args);
	dr_unref(args.hash);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jle 0x256e
movq 0x8(%rsi), %rdi
callq 0x29b6
leaq -0x10(%rbp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x4104
movq (%rbx), %rdi
callq 0x2a0c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x8a83(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq 0x8bf9(%rip), %rdx      # 0xb178
leaq 0x5ae6(%rip), %rsi      # 0x806c
xorl %eax, %eax
callq 0x2190
pushq $0x16
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/main.c
// Function: release_h
static void
release_h(int argc, char *argv[])
{
	int c;
	struct release_args args;
	memset(&args, 0, sizeof(args));
	while ((c = getopt(argc, argv, "c:v:m:d:?")) != -1) {
		switch (c) {
		case 'c':
			args.checkout = dr_newstr(optarg);
			break;
		case 'v':
			args.version = dr_newstr(optarg);
			break;
		case 'm':
			args.describe = dr_newstr(optarg);
			break;
		case 'd':
			args.fromdir = dr_newstr(optarg);
			break;
		case '?':
			exit(EINVAL);
			break;
		}
	}
	if (args.version == NULL || args.describe == NULL) {
		fprintf(stderr, "usage: %s release -v version -m releasenote -d dir\n",
			EXEC);
		exit(EINVAL);
	}
	if (args.fromdir == NULL)
		args.fromdir = dr_newstr(".");
	release(&args);
	dr_unref(args.version);
	dr_unref(args.describe);
	dr_unref(args.fromdir);
	dr_unref(args.checkout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movl %edi, %r15d
movq $0x0, -0x30(%rbp)
leaq 0x5aed(%rip), %r13      # 0x80a8
xorl %r12d, %r12d
movq $0x0, -0x38(%rbp)
xorl %r14d, %r14d
movl %r15d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2250
cmpl $-0x1, %eax
je 0x264f
cmpl $0x63, %eax
je 0x2622
cmpl $0x64, %eax
je 0x2637
cmpl $0x6d, %eax
je 0x260e
cmpl $0x76, %eax
je 0x25fa
cmpl $0x3f, %eax
jne 0x25c9
jmp 0x26e3
movq 0x89d7(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, %r14
jmp 0x25c9
movq 0x89c3(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, %r12
jmp 0x25c9
movq 0x89af(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, -0x30(%rbp)
jmp 0x25c9
movq 0x899a(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, -0x38(%rbp)
jmp 0x25c9
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %r12, -0x50(%rbp)
movq -0x30(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq %r14, -0x58(%rbp)
testq %r14, %r14
je 0x26c4
testq %r12, %r12
je 0x26c4
testq %rax, %rax
jne 0x2686
leaq 0x5a69(%rip), %rdi      # 0x80e6
callq 0x29b6
movq %rax, -0x48(%rbp)
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x2a48
movq (%rbx), %rdi
callq 0x2a0c
movq 0x8(%rbx), %rdi
callq 0x2a0c
movq 0x10(%rbx), %rdi
callq 0x2a0c
movq 0x18(%rbx), %rdi
callq 0x2a0c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x892d(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq 0x8aa3(%rip), %rdx      # 0xb178
leaq 0x59d6(%rip), %rsi      # 0x80b2
xorl %eax, %eax
callq 0x2190
pushq $0x16
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/main.c
// Function: checkout_h
static void
checkout_h(int argc, char *argv[])
{
	dr_t hash, outdir;
	if (argc < 3) {
		fprintf(stderr, "usage: %s checkout hash outdir\n", EXEC);
		exit(EINVAL);
	}
	hash = dr_newstr(argv[1]);
	outdir = dr_newstr(argv[2]);
	checkout(hash, outdir);
	dr_unref(hash);
	dr_unref(outdir);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x2, %edi
jle 0x2731
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x29b6
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0x29b6
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x41ec
movq %r14, %rdi
callq 0x2a0c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2a0c
movq 0x88c0(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq 0x8a36(%rip), %rdx      # 0xb178
leaq 0x599f(%rip), %rsi      # 0x80e8
xorl %eax, %eax
callq 0x2190
pushq $0x16
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/main.c
// Function: diff_h
static void
diff_h(int argc, char *argv[])
{
	int c;
	struct diff_args args;
	memset(&args, 0, sizeof(args));
	while ((c = getopt(argc, argv, "r:a:b:o:?")) != -1){
		switch (c) {
		case 'r':
			args.r = strtol(optarg, NULL, 0);;
			break;
		case 'a':
			args.a = dr_newstr(optarg);
			break;
		case 'b':
			args.b = dr_newstr(optarg);
			break;
		case 'o':
			args.o = dr_newstr(optarg);
			break;
		case '?':
			exit(EINVAL);
			break;
		}
	}
	if (!(args.o && ((args.a && args.b) || args.r > 0))) {
		fprintf(stderr, "usage: \n"
			"\t%s diff -a from -b to -o dir\n"
			"\t%s diff -r -o dir\n",
			EXEC, EXEC);
		exit(EINVAL);
	}
	diff(&args);
	dr_unref(args.a);
	dr_unref(args.b);
	dr_unref(args.o);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
andq $0x0, -0x58(%rbp)
movq %rsi, %r14
movl %edi, %r15d
movq $0x0, -0x38(%rbp)
leaq 0x5985(%rip), %r12      # 0x8108
xorl %r13d, %r13d
xorl %ebx, %ebx
movq $0x0, -0x30(%rbp)
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2250
cmpl $-0x1, %eax
je 0x281a
cmpl $0x61, %eax
je 0x27ee
cmpl $0x62, %eax
je 0x2803
cmpl $0x6f, %eax
je 0x27da
cmpl $0x72, %eax
je 0x27c1
cmpl $0x3f, %eax
jne 0x2790
jmp 0x28a2
movq 0x8810(%rip), %rax      # 0xafd8
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21b0
movq %rax, -0x30(%rbp)
jmp 0x2790
movq 0x87f7(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, %rbx
jmp 0x2790
movq 0x87e3(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, -0x38(%rbp)
jmp 0x2790
movq 0x87ce(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, %r13
jmp 0x2790
movq %rbx, -0x40(%rbp)
movq %r13, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdx
movl %edx, -0x58(%rbp)
testq %rbx, %rbx
je 0x2880
testq %rax, %rax
setne %al
testq %r13, %r13
setne %cl
testb %cl, %al
jne 0x284a
testl %edx, %edx
jle 0x2880
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x30cc
movq 0x8(%rbx), %rdi
callq 0x2a0c
movq 0x10(%rbx), %rdi
callq 0x2a0c
movq 0x18(%rbx), %rdi
callq 0x2a0c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8771(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq 0x88e7(%rip), %rcx      # 0xb178
leaq 0x587a(%rip), %rsi      # 0x8112
movq %rcx, %rdx
xorl %eax, %eax
callq 0x2190
pushq $0x16
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/main.c
// Function: patch_h
static void
patch_h(int argc, char *argv[])
{
	int c;
	struct patch_args args;
	memset(&args, 0, sizeof(args));
	while ((c = getopt(argc, argv, "a:p:o:?")) != -1) {
		switch (c) {
		case 'a':
			args.hash = dr_newstr(optarg);
			break;
		case 'p':
			args.patch = dr_newstr(optarg);
			break;
		case 'o':
			args.output = dr_newstr(optarg);
			break;
		case '?':
			exit(EINVAL);
			break;
		}
	}
	if (!(args.hash && args.patch && args.output)) {
		fprintf(stderr, "usage: %s patch -a hash -p patch -o output\n",
			argv[0]);
		exit(EINVAL);
	}
	patch(&args);
	dr_unref(args.hash);
	dr_unref(args.patch);
	dr_unref(args.output);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %r15d
movq $0x0, -0x30(%rbp)
leaq 0x587c(%rip), %r13      # 0x814c
xorl %r12d, %r12d
xorl %r14d, %r14d
movl %r15d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2250
cmpl $-0x1, %eax
je 0x293f
cmpl $0x61, %eax
je 0x2916
cmpl $0x6f, %eax
je 0x2902
cmpl $0x70, %eax
je 0x292a
cmpl $0x3f, %eax
jne 0x28d6
jmp 0x29ae
movq 0x86cf(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, %r12
jmp 0x28d6
movq 0x86bb(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, %r14
jmp 0x28d6
movq 0x86a7(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x29b6
movq %rax, -0x30(%rbp)
jmp 0x28d6
movq %r12, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %r14, -0x48(%rbp)
testq %r14, %r14
je 0x2993
testq %rax, %rax
je 0x2993
testq %r12, %r12
je 0x2993
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x3ccc
movq (%rbx), %rdi
callq 0x2a0c
movq 0x8(%rbx), %rdi
callq 0x2a0c
movq 0x10(%rbx), %rdi
callq 0x2a0c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x865e(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x57ad(%rip), %rsi      # 0x8154
xorl %eax, %eax
callq 0x2190
pushq $0x16
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/./dr.h
// Function: dr_newstr
static inline dr_t
dr_newstr(const char *str)
{
	dr_t d;
	int sz = strlen(str);
	d = dr_new(sz, (const uint8_t *)str);
	//printf("dr_new:%p\n", d);
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x20e0
movslq %eax, %r14
leaq 0xc(%r14), %rdi
callq 0x21f0
movq %rax, %r15
movl $0x1, (%rax)
movl %r14d, 0x4(%rax)
testq %rbx, %rbx
je 0x29f8
movq %r15, %rdi
addq $0x8, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21c0
movb $0x0, 0x8(%r15,%r14)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/./dr.h
// Function: dr_unref
static inline void
dr_unref(dr_t d)
{
	if (d == NULL)
		return ;
	if (--d->ref <= 0) {
		assert(d->ref == 0);
		free(d);
		//printf("dr_unref:%p\n", d);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x2a26
movl (%rdi), %ecx
leal -0x1(%rcx), %eax
movl %eax, (%rdi)
cmpl $0x1, %ecx
jg 0x2a26
testl %eax, %eax
jne 0x2a27
jmp 0x2030
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x564f(%rip), %rdi      # 0x8081
leaq 0x5654(%rip), %rsi      # 0x808d
leaq 0x5654(%rip), %rcx      # 0x8094
pushq $0x2d
popq %rdx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O2/findstr[P]version-database/./dr.h
// Function: dr_new
static inline dr_t
dr_new(int size, const uint8_t *data)
{
	dr_t d;
	d = (dr_t)malloc(size + sizeof(struct dr_));
	d->ref = 1;
	d->size = size;
	if (data != NULL)
		memcpy(d->buf, data, size);
	d->buf[size] = 0;
	//printf("dr_new:%p\n", d);
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movslq %edi, %rbx
leaq 0xc(%rbx), %rdi
callq 0x21f0
movq %rax, %r15
movl $0x1, (%rax)
movl %ebx, 0x4(%rax)
testq %r14, %r14
je 0x2ec8
movq %r15, %rdi
addq $0x8, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x21c0
movb $0x0, 0x8(%r15,%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq