LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/keylist.c
// Function: keylist_delete_node
void keylist_delete_node(Keylist *keylist, KeylistNode *node)
{
	if (node->prev) {
		node->prev->next = node->next;
	} else {
		keylist->head = node->next;
	}

	if (node->next) {
		node->next->prev = node->prev;
	} else {
		keylist->tail = node->prev;
	}

	if (keylist->free) {
		keylist->free(node->key, node->value);
	}

	xfree(node);
	keylist->len--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xbf5f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0xbf6e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xbf8d
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
jmp 0xbf9c
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xbfc1
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x5410
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x20(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_release
void list_release(List *list)
{
	unsigned int len;
	ListNode *current, *next;

	current = list->head;
	len = list->len;

	while (len--) {
		next = current->next;

		if (list->free) {
			list->free(current->value);
		}

		xfree(current);
		current = next;
	}

	xfree(list);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0xc0ad
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xc09a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rdi
callq 0x5410
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xc061
movq -0x8(%rbp), %rdi
callq 0x5410
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_add_value_head
List *list_add_value_head(List *list, void *value)
{
	ListNode *node;

	node = (ListNode*)xmalloc(sizeof(*node));

	node->value = value;

	if (list->len == 0) {
		list->head = list->tail = node;
		node->prev = node->next = NULL;
	} else {
		node->prev = NULL;
		node->next = list->head;
		list->head->prev = node;
		list->head = node;
	}

	list->len++;

	return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x18, %edi
callq 0x5090
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0xc120
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0xc153
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_add_value_tail
List *list_add_value_tail(List *list, void *value)
{
	ListNode *node;

	node = (ListNode*)xmalloc(sizeof(*node));

	node->value = value;

	if (list->len == 0) {
		list->head = list->tail = node;
		node->prev = node->next = NULL;
	} else {
		node->prev = list->tail;
		node->next = NULL;
		list->tail->next = node;
		list->tail = node;
	}

	list->len++;

	return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x18, %edi
callq 0x5090
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0xc1d0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0xc207
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_delete_value
int list_delete_value(List *list, void *value)
{
	ListNode *node;

	node = list_search_node(list, value);

	if (!node) {
		return EG_STATUS_ERR;
	}

	list_delete_node(list, node);

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc270
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xc251
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc265
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xc320
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_search_node
ListNode *list_search_node(List *list, void *value)
{
	ListIterator *iter;
	ListNode *node;

	iter = list_get_iterator(list, EG_START_HEAD);

	while ((node = list_next_node(iter)) != NULL) {
		if (list->match) {
			if (list->match(node->value, value)) {
				list_release_iterator(iter);
				return node;
			}
		} else {
			if (node->value == value) {
				list_release_iterator(iter);
				return node;
			}
		}
	}

	list_release_iterator(iter);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xc3d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xc450
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xc302
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xc2dd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
je 0xc2db
movq -0x20(%rbp), %rdi
callq 0xc430
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc313
jmp 0xc300
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0xc2fe
movq -0x20(%rbp), %rdi
callq 0xc430
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc313
jmp 0xc300
jmp 0xc28f
movq -0x20(%rbp), %rdi
callq 0xc430
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_delete_node
void list_delete_node(List *list, ListNode *node)
{
	if (node->prev) {
		node->prev->next = node->next;
	} else {
		list->head = node->next;
	}

	if (node->next) {
		node->next->prev = node->prev;
	} else {
		list->tail = node->prev;
	}

	if (list->free) {
		list->free(node->value);
	}

	xfree(node);
	list->len--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xc34f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0xc35e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xc37d
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
jmp 0xc38c
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xc3a9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x5410
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x20(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_get_iterator
ListIterator *list_get_iterator(List *list, int direction)
{
	ListIterator *iter;

	iter = (ListIterator*)xmalloc(sizeof(*iter));

	if (direction == EG_START_HEAD) {
		iter->next = list->head;
	} else {
		iter->next = list->tail;
	}

	iter->direction = direction;

	return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x10, %edi
callq 0x5090
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xc403
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc412
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_next_node
ListNode *list_next_node(ListIterator *iter)
{
	ListNode *current = iter->next;

	if (current != NULL) {
		if (iter->direction == EG_START_HEAD) {
			iter->next = current->next;
		} else {
			iter->next = current->prev;
		}
	}

	return current;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc495
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0xc485
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc493
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc495
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/list.c
// Function: list_rotate
void list_rotate(List *list)
{
	ListNode *tail = list->tail;

	if (EG_LIST_LENGTH(list) <= 1)
		return;

	list->tail = tail->prev;
	list->tail->next = NULL;

	list->head->prev = tail;
	tail->prev = NULL;
	tail->next = list->head;
	list->head = tail;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x20(%rax)
ja 0xc4c0
jmp 0xc512
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_create
Queue *queue_create(void)
{
	Queue *queue;

	queue = (Queue*)xmalloc(sizeof(*queue));

	queue->head = queue->tail = NULL;
	queue->len = 0;
	queue->free = NULL;

	return queue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x20, %edi
callq 0x5090
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_release
void queue_release(Queue *queue)
{
	unsigned int len;
	QueueNode *current, *next;

	current = queue->head;
	len = queue->len;

	while (len--) {
		next = current->next;

		if (queue->free) {
			queue->free(current->value);
		}

		xfree(current);
		current = next;
	}

    xfree(queue);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0xc60d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xc5fa
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rdi
callq 0x5410
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xc5c1
movq -0x8(%rbp), %rdi
callq 0x5410
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_push_value_head
Queue *queue_push_value_head(Queue *queue, void *value)
{
	QueueNode *node;

	node = (QueueNode*)xmalloc(sizeof(*node));

	node->value = value;

	if (queue->len == 0) {
		queue->head = queue->tail = node;
		node->prev = node->next = NULL;
	} else {
		node->prev = NULL;
		node->next = queue->head;
		queue->head->prev = node;
		queue->head = node;
	}

	queue->len++;

	return queue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x18, %edi
callq 0x5090
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xc680
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0xc6b3
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_push_value_tail
Queue *queue_push_value_tail(Queue *queue, void *value)
{
	QueueNode *node;

	node = (QueueNode*)xmalloc(sizeof(*node));

	node->value = value;

	if (queue->len == 0) {
		queue->head = queue->tail = node;
		node->prev = node->next = NULL;
	} else {
		node->prev = queue->tail;
		node->next = NULL;
		queue->tail->next = node;
		queue->tail = node;
	}

	queue->len++;

	return queue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x18, %edi
callq 0x5090
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xc730
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
jmp 0xc767
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_get_value
void *queue_get_value(Queue *queue)
{
	void *value;

	if (!queue->len) {
		return NULL;
	}

	value = EG_QUEUE_NODE_VALUE(queue->tail);

	return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xc79c
movq $0x0, -0x8(%rbp)
jmp 0xc7b4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_pop_value
void *queue_pop_value(Queue *queue)
{
	QueueNode *prev;
	void *value;

	if (!queue->len) {
		return NULL;
	}

	value = EG_QUEUE_NODE_VALUE(queue->tail);
	prev = queue->tail->prev;

	xfree(queue->tail);

	queue->tail = prev;
	queue->len--;

	return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xc7e0
movq $0x0, -0x8(%rbp)
jmp 0xc82d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5410
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_purge
Queue *queue_purge(Queue *queue)
{
	unsigned int len;
	QueueNode *current, *next;

	current = queue->head;
	len = queue->len;

	while (len--) {
		next = current->next;

		if (queue->free) {
			queue->free(current->value);
		}

		xfree(current);
		current = next;
	}

	queue->len = 0;

	return queue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0xc8ad
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xc89a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rdi
callq 0x5410
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xc861
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_delete_node
void queue_delete_node(Queue *queue, QueueNode *node)
{
	if (node->prev) {
		node->prev->next = node->next;
	} else {
		queue->head = node->next;
	}

	if (node->next) {
		node->next->prev = node->prev;
	} else {
		queue->tail = node->prev;
	}

	if (queue->free) {
		queue->free(node->value);
	}

	xfree(node);
	queue->len--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xc8ff
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0xc90e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xc92d
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
jmp 0xc93c
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xc959
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x5410
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_get_iterator
QueueIterator *queue_get_iterator(Queue *queue, int direction)
{
	QueueIterator *iter;

	iter = (QueueIterator*)xmalloc(sizeof(*iter));

	if (direction == EG_START_HEAD) {
		iter->next = queue->head;
	} else {
		iter->next = queue->tail;
	}

	iter->direction = direction;

	return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x10, %edi
callq 0x5090
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xc9b3
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc9c2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue.c
// Function: queue_next_node
QueueNode *queue_next_node(QueueIterator *iter)
{
	QueueNode *current = iter->next;

	if (current != NULL) {
		if (iter->direction == EG_START_HEAD) {
			iter->next = current->next;
		} else {
			iter->next = current->prev;
		}
	}

	return current;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xca45
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0xca35
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xca43
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xca45
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/user.c
// Function: create_user
EagleUser *create_user(const char *name, const char *password, uint64_t perm)
{
	EagleUser *user = (EagleUser*)xmalloc(sizeof(*user));

	memcpy(user->name, name, strlenz(name));
	memcpy(user->password, password, strlenz(password));

	user->perm = perm;

	return user;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x48, %edi
callq 0x5090
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2160
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0x22c0
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2160
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0x22c0
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/user.c
// Function: find_user
EagleUser *find_user(List *list, const char *name, const char *password)
{
	EagleUser *user;
	ListNode *node;
	ListIterator iterator;

	list_rewind(list, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		user = EG_LIST_NODE_VALUE(node);

		if (password != NULL) {
			if (!strcmp(user->name, name) && !strcmp(user->password, password)) {
				return user;
			}
		} else {
			if (!strcmp(user->name, name)) {
				return user;
			}
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xc520
leaq -0x40(%rbp), %rdi
callq 0xc450
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0xcbdb
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xcbbb
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2270
cmpl $0x0, %eax
jne 0xcbb9
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
movq -0x20(%rbp), %rsi
callq 0x2270
cmpl $0x0, %eax
jne 0xcbb9
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xcbe3
jmp 0xcbd9
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2270
cmpl $0x0, %eax
jne 0xcbd7
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xcbe3
jmp 0xcbd9
jmp 0xcb61
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/message.c
// Function: create_message
Message *create_message(Object *data, uint64_t tag, uint32_t expiration)
{
	Message *msg = (Message*)xcalloc(sizeof(*msg));

	msg->value = data;
	msg->tag = tag;
	msg->confirm = 0;
	msg->expiration = expiration;

	return msg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x28, %edi
callq 0x5160
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x10(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: delete_queue_t
void delete_queue_t(Queue_t *queue_t)
{
	eject_clients_queue_t(queue_t);
	eject_routes_queue_t(queue_t);

	list_release(queue_t->expire_messages);
	list_release(queue_t->confirm_messages);
	list_release(queue_t->declared_clients);
	list_release(queue_t->subscribed_clients_msg);
	list_release(queue_t->subscribed_clients_notify);

	keylist_release(queue_t->routes);

	queue_release(queue_t->queue);

	xfree(queue_t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xcff0
movq -0x8(%rbp), %rdi
callq 0xd0f0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0xc040
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0xc040
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0xc040
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0xc040
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0xc040
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0xbcc0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xc5a0
movq -0x8(%rbp), %rdi
callq 0x5410
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: eject_clients_queue_t
static void eject_clients_queue_t(Queue_t *queue_t)
{
	ListNode *node;
	ListIterator iterator;
	EagleClient *client;

	list_rewind(queue_t->declared_clients, &iterator);
	while ((node = list_next_node(&iterator)) != NULL) {
		undeclare_client_queue_t(queue_t, EG_LIST_NODE_VALUE(node));
	}

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

		list_delete_value(client->subscribed_queues, queue_t);
		list_delete_node(queue_t->subscribed_clients_msg, node);
	}

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

		list_delete_value(client->subscribed_queues, queue_t);
		list_delete_node(queue_t->subscribed_clients_notify, node);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0xc520
leaq -0x20(%rbp), %rdi
callq 0xc450
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xd033
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xd690
jmp 0xd00d
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0xc520
leaq -0x20(%rbp), %rdi
callq 0xc450
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xd087
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xc220
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0xc320
jmp 0xd044
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0xc520
leaq -0x20(%rbp), %rdi
callq 0xc450
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xd0e1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xc220
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0xc320
jmp 0xd09b
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: eject_routes_queue_t
static void eject_routes_queue_t(Queue_t *queue_t)
{
	KeylistIterator iterator;
	KeylistNode *node;

	keylist_rewind(queue_t->routes, &iterator);
	while ((node = keylist_next_node(&iterator)) != NULL)
	{
		eject_routes_key_queue_t(queue_t, EG_KEYLIST_NODE_VALUE(node), EG_KEYLIST_NODE_KEY(node));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0xbde0
leaq -0x10(%rbp), %rdi
callq 0xbe00
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd13e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0xdb00
jmp 0xd110
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: push_message_queue_t
int push_message_queue_t(Queue_t *queue_t, Object *data, uint32_t expiration)
{
	Message *msg;
	uint64_t tag = make_message_tag(server->msg_counter++, server->now_timems);

	msg = create_message(data, tag, expiration);

	if (EG_MESSAGE_SIZE(msg) > queue_t->max_msg_size) {
		return EG_STATUS_ERR;
	}

	if (process_subscribed_clients(queue_t, msg)) {
		release_message(msg);
		return EG_STATUS_OK;
	}

	if (EG_QUEUE_LENGTH(queue_t->queue) >= queue_t->max_msg)
	{
		if (queue_t->force_push) {
			pop_message_queue_t(queue_t, 0);
		} else {
			return EG_STATUS_ERR;
		}
	}

	queue_push_value_head(queue_t->queue, msg);

	if (msg->expiration)
	{
		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_FIRST(queue_t->queue));
	}

	return EG_STATUS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
leaq 0xa146(%rip), %rax      # 0x172b0
movq (%rax), %rax
movl 0x1b4(%rax), %edi
movl %edi, %ecx
addl $0x1, %ecx
movl %ecx, 0x1b4(%rax)
leaq 0xa12b(%rip), %rax      # 0x172b0
movq (%rax), %rax
movq 0x190(%rax), %rax
movl %eax, %esi
callq 0x6080
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0xcca0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x44(%rcx), %ecx
cmpq %rcx, %rax
jbe 0xd1d1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd288
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xd2a0
cmpl $0x0, %eax
je 0xd1f8
movq -0x28(%rbp), %rdi
callq 0xcd00
movl $0x0, -0x4(%rbp)
jmp 0xd288
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x18(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jb 0xd22e
movq -0x10(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0xd223
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xd3c0
jmp 0xd22c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd288
jmp 0xd22e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xc620
movq -0x28(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xd281
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xc170
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: process_subscribed_clients
static int process_subscribed_clients(Queue_t *queue_t, Message *msg)
{
	ListNode *node;
	ListIterator iterator;
	EagleClient *client;
	int processed = 0;

	if (EG_QUEUE_LENGTH(queue_t->subscribed_clients_msg))
	{
		if (queue_t->round_robin)
		{
			list_rotate(queue_t->subscribed_clients_msg);

			client = EG_LIST_NODE_VALUE(EG_LIST_FIRST(queue_t->subscribed_clients_msg));
			queue_client_event_message(client, queue_t, msg);

			processed++;
		}
		else
		{
			list_rewind(queue_t->subscribed_clients_msg, &iterator);
			while ((node = list_next_node(&iterator)) != NULL)
			{
				client = EG_LIST_NODE_VALUE(node);
				queue_client_event_message(client, queue_t, msg);

				processed++;
			}
		}
	}

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

	return processed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
cmpl $0x0, 0x20(%rax)
je 0xd35f
movq -0x8(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0xd30f
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0xc4a0
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xad50
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xd35d
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc520
leaq -0x28(%rbp), %rdi
callq 0xc450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd35b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xad50
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xd320
jmp 0xd35d
jmp 0xd35f
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
cmpl $0x0, 0x20(%rax)
je 0xd3b4
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc520
leaq -0x28(%rbp), %rdi
callq 0xc450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd3b2
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xac90
jmp 0xd384
jmp 0xd3b4
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: pop_message_queue_t
void pop_message_queue_t(Queue_t *queue_t, uint32_t timeout)
{
	Message *msg = queue_pop_value(queue_t->queue);

	if (msg->expiration) {
		list_delete_node(queue_t->expire_messages, EG_MESSAGE_GET_DATA(msg, 0));
	}

	if (timeout) {
		EG_MESSAGE_SET_CONFIRM_TIME(msg, server->now_timems + timeout);
		list_add_value_tail(queue_t->confirm_messages, msg);
	} else {
		release_message(msg);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xc7c0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xd3ff
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xc320
cmpl $0x0, -0xc(%rbp)
je 0xd438
leaq 0x9ea4(%rip), %rax      # 0x172b0
movq (%rax), %rax
movq 0x190(%rax), %rax
movl -0xc(%rbp), %ecx
addq %rcx, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xc170
jmp 0xd441
movq -0x18(%rbp), %rdi
callq 0xcd00
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: confirm_message_queue_t
int confirm_message_queue_t(Queue_t *queue_t, uint64_t tag)
{
	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_TAG(msg) == tag)
		{
			list_delete_node(queue_t->confirm_messages, node);
			release_message(msg);
			return EG_STATUS_OK;
		}
	}

	return EG_STATUS_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc520
leaq -0x30(%rbp), %rdi
callq 0xc450
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xd4e3
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0xd4e1
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0xc320
movq -0x38(%rbp), %rdi
callq 0xcd00
movl $0x0, -0x4(%rbp)
jmp 0xd4ea
jmp 0xd491
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc520
leaq -0x38(%rbp), %rdi
callq 0xc450
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xd55a
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2270
cmpl $0x0, %eax
jne 0xd558
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd562
jmp 0xd51d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: subscribe_client_queue_t
void subscribe_client_queue_t(Queue_t *queue_t, EagleClient *client, uint32_t flags)
{
	list_add_value_tail(client->subscribed_queues, queue_t);

	if (!BIT_CHECK(flags, EG_QUEUE_CLIENT_NOTIFY_FLAG)) {
		list_add_value_tail(queue_t->subscribed_clients_msg, client);
	} else {
		list_add_value_tail(queue_t->subscribed_clients_notify, client);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xc170
movl -0x14(%rbp), %eax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0xd714
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0xc170
jmp 0xd728
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0xc170
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xc220
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc520
leaq -0x28(%rbp), %rdi
callq 0xc450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd798
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xd796
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xc320
jmp 0xd7e3
jmp 0xd762
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc520
leaq -0x28(%rbp), %rdi
callq 0xc450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd7e3
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xd7e1
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xc320
jmp 0xd7ac
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xbd50
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xd863
callq 0xbfe0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x53c0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0xbe30
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc170
jmp 0xd891
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc270
cmpq $0x0, %rax
jne 0xd88f
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc170
jmp 0xd891
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xbd50
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xd90c
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc220
movq -0x20(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0xd90a
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xbf30
jmp 0xd90c
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc520
leaq -0x28(%rbp), %rdi
callq 0xc450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd9e3
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
cmpl -0xc(%rbp), %eax
ja 0xd9e1
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xc320
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xc8d0
jmp 0xd990
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc520
leaq -0x28(%rbp), %rdi
callq 0xc450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xdad0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0xc(%rbp), %eax
ja 0xdacb
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xc320
movq -0x30(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0xdab8
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
cmpl -0xc(%rbp), %eax
ja 0xda6c
jmp 0xda10
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0xc6d0
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0xc170
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0xdac9
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0xc6d0
jmp 0xdacb
jmp 0xda10
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yakushstanislav[P]EagleMQ/src/queue_t.c
// Function: eject_routes_key_queue_t
static inline void eject_routes_key_queue_t(Queue_t *queue_t, List *routes, const char *key)
{
	ListIterator iterator;
	ListNode *node;
	Route_t *route;

	list_rewind(routes, &iterator);
	while ((node = list_next_node(&iterator)) != NULL)
	{
		route = EG_LIST_NODE_VALUE(node);

		unbind_route_t(route, queue_t, key);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc520
leaq -0x28(%rbp), %rdi
callq 0xc450
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0xdb53
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xdf10
jmp 0xdb21
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)