LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/utils.c
// Function: endswith
int endswith(const char *string, const char *suffix) {
	size_t string_siz = strlen(string);
	size_t suffix_siz = strlen(suffix);

	if (string_siz < suffix_siz)
		return 0;

	unsigned int i = 0;
	for (; i < suffix_siz; i++) {
		if (suffix[i] != string[string_siz - suffix_siz + i])
			return 0;
	}
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3150
movq %rax, %r15
movq %rbx, %rdi
callq 0x3150
movq %rax, %rcx
xorl %eax, %eax
subq %rcx, %r15
jb 0x4409
testq %rcx, %rcx
je 0x4404
addq %r15, %r14
movl $0x1, %edx
xorl %eax, %eax
xorl %esi, %esi
movb (%rbx,%rsi), %dil
cmpb (%r14,%rsi), %dil
jne 0x4409
movl %edx, %esi
incl %edx
cmpq %rsi, %rcx
ja 0x43f1
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/utils.c
// Function: strnstr
char *strnstr(const char *haystack, const char *needle, size_t len) {
	int i;
	size_t needle_len;

	/* segfault here if needle is not NULL terminated */
	if (0 == (needle_len = strlen(needle)))
		return (char *)haystack;

	/* Limit the search if haystack is shorter than 'len' */
	len = strnlen(haystack, len);

	for (i=0; i<(int)(len-needle_len); i++)
	{
		if ((haystack[0] == needle[0]) && (0 == strncmp(haystack, needle, needle_len)))
			return (char *)haystack;

		haystack++;
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3150
testq %rax, %rax
je 0x446a
movq %rax, %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3240
movq %rax, %r12
subl %r15d, %r12d
testl %r12d, %r12d
jle 0x4468
movb (%r14), %bpl
cmpb %bpl, (%rbx)
jne 0x4460
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x30b0
testl %eax, %eax
je 0x446a
incq %rbx
decl %r12d
jne 0x4449
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/utils.c
// Function: hash_string_fnv1a
int hash_string_fnv1a(const unsigned char *key, const size_t siz, char outbuf[static HASH_STR_SIZE]) {
	/* https://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash */
	const uint64_t fnv_prime = 1099511628211ULL;
	const uint64_t fnv_offset_bias = 14695981039346656037ULL;

	const int iterations = siz;

	uint8_t i;
	uint64_t hash = fnv_offset_bias;

	for(i = 0; i < iterations; i++) {
		hash = hash ^ key[i];
		hash = hash * fnv_prime;
	}

	sprintf(outbuf, "%"PRIX64, hash);
	return 1;
}

// Assembly:
movq %rdx, %rax
movabsq $-0x340d631b7bdddcdb, %r8 # imm = 0xCBF29CE484222325
testl %esi, %esi
jle 0x4541
xorl %ecx, %ecx
movabsq $0x100000001b3, %r9     # imm = 0x100000001B3
movzbl %cl, %ecx
movzbl (%rdi,%rcx), %edx
xorq %r8, %rdx
imulq %r9, %rdx
incb %cl
movzbl %cl, %r10d
movq %rdx, %r8
cmpl %esi, %r10d
jb 0x4523
jmp 0x4544
movq %r8, %rdx
pushq %rax
leaq 0x5ae6(%rip), %rsi      # 0xa032
movq %rax, %rdi
xorl %eax, %eax
callq 0x3560
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/utils.c
// Function: m38_get_cookie_value
char *m38_get_cookie_value(const char *cookie_string, const size_t cookie_string_siz, const char *needle) {
	/* TODO: Make sure this function handles bad input. */
	if (!cookie_string)
			return NULL;

	const char *cookie_loc = strnstr(cookie_string, needle, cookie_string_siz);
	if (!cookie_loc)
			return NULL;

	const char *cookie_string_start = cookie_loc;
	const char *cookie_string_end = strnstr(cookie_loc, ";", cookie_string_siz - (cookie_loc - cookie_string));
	if (!cookie_string_end) {
			/* This is okay, it might be at the end of the cookie. */
			cookie_string_end = strnstr(cookie_loc, " ", cookie_string_siz - (cookie_loc - cookie_string));
			if (!cookie_string_end)
					cookie_string_end = cookie_loc + cookie_string_siz;
	}

	const size_t cookie_string_size = cookie_string_end - cookie_string_start;
	const char *cookie_string_value = strnstr(cookie_loc, "=", cookie_string_size);
	if (!cookie_string_value)
			return NULL;

	/* -1 here is for the '=': */
	const size_t cookie_string_value_size = cookie_string_end - cookie_string_value;
	char *data = calloc(sizeof(char), cookie_string_value_size + 2); /* Plus two here: One for =, one for NULL */
	data[cookie_string_value_size] = '\0';
	strncpy(data, cookie_string_value + 1, cookie_string_value_size);

	return data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4615
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x32a0
testq %rax, %rax
je 0x4615
movq %rax, %r14
subq %rax, %r15
addq %rbx, %r15
leaq 0x5a9e(%rip), %rsi      # 0xa036
movq %rax, %rdi
movq %r15, %rdx
callq 0x32a0
movq %rax, %r12
testq %rax, %rax
jne 0x45ca
leaq 0x75cb(%rip), %rsi      # 0xbb7d
movq %r14, %rdi
movq %r15, %rdx
callq 0x32a0
addq %r14, %rbx
testq %rax, %rax
cmovneq %rax, %rbx
movq %rbx, %r12
movq %r12, %rdx
subq %r14, %rdx
leaq 0x75ff(%rip), %rsi      # 0xbbd6
movq %r14, %rdi
callq 0x32a0
testq %rax, %rax
je 0x4615
movq %rax, %rbx
subq %rax, %r12
leaq 0x2(%r12), %rsi
movl $0x1, %edi
callq 0x32e0
incq %rbx
movq %rax, %rdi
movq %rbx, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x30a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/grengine.c
// Function: m38_insert_custom_header
int m38_insert_custom_header(m38_http_response *response, const char *header, const size_t header_len,
		const char *value, const size_t value_len) {
	if (!header || !value || !response)
		return 0;

	m38_header_pair *new_pair = calloc(1, sizeof(m38_header_pair));
	if (!new_pair) {
		m38_log_msg(LOG_ERR, "Could not create header_pair for http_response extra headers!");
		return 0;
	}

	const char *copied_header = strndup(header, header_len);
	const char *copied_value = strndup(value, value_len);
	if (!copied_header || !copied_value) {
		m38_log_msg(LOG_ERR, "Could not create copied values for http_response extra headers!");
		free(new_pair);
		return 0;
	}

	m38_header_pair _stack_pair = {
		.header = copied_header,
		.header_len = header_len,
		.value = copied_value,
		.value_len = value_len,
	};
	memcpy(new_pair, &_stack_pair, sizeof(m38_header_pair));
	vector_append_ptr(response->extra_headers, new_pair);

	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4f20
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbp
testq %rsi, %rsi
je 0x4f12
movq %rcx, %r13
testq %rcx, %rcx
je 0x4f12
movq %r8, %rbx
movq %rdx, %r15
movq %rdi, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x32e0
testq %rax, %rax
je 0x4ee2
movq %rax, %r12
movq %rbp, %rdi
movq %r15, %rsi
callq 0x32d0
movq %rax, %rbp
movq %r13, %rdi
movq %rbx, %rsi
callq 0x32d0
testq %rbp, %rbp
setne %cl
testq %rax, %rax
setne %dl
testb %dl, %cl
je 0x4ef7
movq %rbp, (%r12)
movq %r15, 0x8(%r12)
movq %rax, 0x10(%r12)
movq %rbx, 0x18(%r12)
movq 0x38(%r14), %rdi
movq %r12, %rsi
callq 0x34d0
jmp 0x4f12
leaq 0x52cf(%rip), %rsi      # 0xa1b8
movl $0x3, %edi
xorl %eax, %eax
callq 0x3540
jmp 0x4f12
leaq 0x52f8(%rip), %rsi      # 0xa1f6
movl $0x3, %edi
xorl %eax, %eax
callq 0x3540
movq %r12, %rdi
callq 0x3050
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/grengine.c
// Function: read_max_bytes_from_socket
static int read_max_bytes_from_socket(const int accept_fd, unsigned char **to_read, size_t *num_read) {
	size_t read_this_time = 0;
	while ((read_this_time = recv(accept_fd, *to_read + *num_read, MAX_READ_LEN, 0))) {
		*num_read += read_this_time;
		if (read_this_time == 0 || read_this_time < MAX_READ_LEN)
			break;
		read_this_time = 0;

		*to_read = realloc(*to_read, *num_read + MAX_READ_LEN);
		if (!(*to_read)) {
			m38_log_msg(LOG_ERR, "Ran out of memory reading request.");
			goto error;
		}
		memset(*to_read + *num_read, '\0', MAX_READ_LEN);
		if (*num_read >= MAX_REQUEST_SIZE)
			break;
	}

	return 0;

error:
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movq (%rsi), %r12
movq (%rdx), %r13
addq %r12, %r13
xorl %r15d, %r15d
movl $0x400, %edx            # imm = 0x400
movl %ebp, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x3060
testq %rax, %rax
je 0x5b48
movq (%rbx), %rsi
addq %rax, %rsi
movq %rsi, (%rbx)
cmpq $0x400, %rax            # imm = 0x400
jb 0x5b48
movq (%r14), %rdi
addq $0x400, %rsi            # imm = 0x400
callq 0x3440
movq %rax, (%r14)
testq %rax, %rax
je 0x5b2f
movq %rax, %r12
movq (%rbx), %r13
movq %rax, %rdi
addq %r13, %rdi
xorl %r15d, %r15d
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x3220
cmpq $0x200000, %r13         # imm = 0x200000
jb 0x5ac5
jmp 0x5b48
leaq 0x4a5a(%rip), %rsi      # 0xa590
movl $0x3, %edi
xorl %eax, %eax
callq 0x3540
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/grengine.c
// Function: m38_send_response
m38_handled_request *m38_send_response(m38_handled_request *hreq) {
	/* Send that shit over the wire: */
	const m38_route *matching_route = hreq->matching_route;

	const size_t bytes_left = hreq->response_len - hreq->sent;
	const size_t to_send = bytes_left < 4096 ? bytes_left : 4096;
	int rc = send(hreq->accept_fd, hreq->response_bytes + hreq->sent, to_send, MSG_NOSIGNAL);
	if (rc <= 0) {
		m38_log_msg(LOG_ERR, "Could not send response.");
		goto error;
	}

	hreq->sent += to_send;

	if (hreq->response_len - hreq->sent <= 0) {
		if (matching_route->cleanup != NULL) {
			m38_log_msg(LOG_INFO, "Calling cleanup for %s.", matching_route->name);
			matching_route->cleanup(hreq->response_code, &hreq->response);
		}
		_clean_up_extra_headers(&hreq->response);
		close(hreq->accept_fd);
		free(hreq->response_bytes);
		free(hreq);

		return NULL;
	}

	return hreq;

error:
	if (matching_route != NULL && matching_route->cleanup != NULL)
		matching_route->cleanup(500, &hreq->response);
	_clean_up_extra_headers(&hreq->response);
	close(hreq->accept_fd);
	free(hreq->response_bytes);
	free(hreq);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x18(%rdi), %rsi
subq %rsi, %r14
movl $0x1000, %eax           # imm = 0x1000
cmpq %rax, %r14
cmovaeq %rax, %r14
movq 0x20(%rdi), %r15
movl 0x10(%rdi), %edi
addq (%rbx), %rsi
movq %r14, %rdx
movl $0x4000, %ecx           # imm = 0x4000
callq 0x31a0
testl %eax, %eax
jle 0x5bd4
addq 0x18(%rbx), %r14
movq %r14, 0x18(%rbx)
cmpq %r14, 0x8(%rbx)
jne 0x5c26
cmpq $0x0, 0x160(%r15)
je 0x5c03
leaq 0x10(%r15), %rdx
leaq 0x4905(%rip), %rsi      # 0xa4c0
xorl %edi, %edi
xorl %eax, %eax
callq 0x3540
movl 0x14(%rbx), %edi
leaq 0x28(%rbx), %rsi
callq *0x160(%r15)
jmp 0x5c03
leaq 0x48cc(%rip), %rsi      # 0xa4a7
movl $0x3, %edi
xorl %eax, %eax
callq 0x3540
testq %r15, %r15
je 0x5c03
movq 0x160(%r15), %rax
testq %rax, %rax
je 0x5c03
leaq 0x28(%rbx), %rsi
movl $0x1f4, %edi            # imm = 0x1F4
callq *%rax
leaq 0x28(%rbx), %rdi
callq 0x5c2f
movl 0x10(%rbx), %edi
callq 0x3280
movq (%rbx), %rdi
callq 0x3050
movq %rbx, %rdi
callq 0x3050
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/grengine.c
// Function: clean_up_extra_headers
static void _clean_up_extra_headers(m38_http_response *response) {
	size_t i = 0;
	for (i = 0; i < response->extra_headers->count; i++) {
		m38_header_pair **pair = (m38_header_pair **)vector_get(response->extra_headers, i);
		free((char *)(*pair)->header);
		free((char *)(*pair)->value);
		free(*pair);
	}
	vector_free(response->extra_headers);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x5c7c
xorl %r14d, %r14d
movl %r14d, %esi
callq 0x3170
movq %rax, %r15
movq (%rax), %rax
movq (%rax), %rdi
callq 0x3050
movq (%r15), %rax
movq 0x10(%rax), %rdi
callq 0x3050
movq (%r15), %rdi
callq 0x3050
incq %r14
movq 0x38(%rbx), %rdi
cmpq 0x10(%rdi), %r14
jb 0x5c45
popq %rbx
popq %r14
popq %r15
jmp 0x3130
nop
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/server.c
// Function: acceptor
static void *acceptor(void *arg) {
	mqd_t accepted_socket_queue = 0;
	const acceptor_arg *args = arg;
	const int main_sock_fd = args->main_sock_fd;

	accepted_socket_queue = _open_queue(ACCEPTED_SOCKET_QUEUE_NAME, O_WRONLY, sizeof(int));
	if (accepted_socket_queue == -1) {
		m38_log_msg(LOG_ERR, "Acceptor: Could not open accepted_socket_queue.");
		perror("Acceptor: ");
		return NULL;
	}

	while(1) {
		struct sockaddr_storage their_addr = {0};
		socklen_t sin_size = sizeof(their_addr);

		int new_fd = accept(main_sock_fd, (struct sockaddr *)&their_addr, &sin_size);

		if (new_fd == -1) {
			m38_log_msg(LOG_ERR, "Acceptor: Could not accept new connection.");
			return NULL;
		}

		ssize_t msg_size = mq_send(accepted_socket_queue, (char *)&new_fd, sizeof(int), 0);
		if (msg_size == -1) {
			/* We want to continue from this error. Maybe the queue is full or something. */
			m38_log_msg(LOG_ERR, "Acceptor: Could not queue new accepted connection.");
			close(new_fd);
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl (%rdi), %ebx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, 0x30(%rcx)
movaps %xmm0, 0x20(%rcx)
movq $0xa, 0x8(%rcx)
movq $0x4, 0x10(%rcx)
leaq 0x2d81(%rip), %rdi      # 0xb649
movl $0x41, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x3370
cmpl $-0x1, %eax
je 0x89e1
movl %eax, %ebp
leaq 0x10(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
movl %ebx, %edi
callq 0x3510
movl %eax, 0x8(%rsp)
cmpl $-0x1, %eax
je 0x89ba
leaq 0x8(%rsp), %r14
leaq 0x2fbb(%rip), %r15      # 0xb8f1
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r13
movl $0x4, %edx
movl %ebp, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3290
cmpl $-0x1, %eax
jne 0x896e
movl $0x3, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3540
movl 0x8(%rsp), %edi
callq 0x3280
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl $0x80, 0xc(%rsp)
movl %ebx, %edi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3510
movl %eax, 0x8(%rsp)
cmpl $-0x1, %eax
jne 0x8940
leaq 0x2f05(%rip), %rsi      # 0xb8c6
movl $0x3, %edi
xorl %eax, %eax
callq 0x3540
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rdi
callq 0x370b
jmp 0x89cd
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/server.c
// Function: m38_set_404_handler
int m38_set_404_handler(m38_app *app,
	int (*handler)(const m38_http_request *request, m38_http_response *response)) {
	if (app->r_404_route) {
		app->r_404_route->handler = handler;
	} else {
		m38_route *new_route = calloc(1, sizeof(m38_route));
		new_route->handler = handler;
		new_route->cleanup = NULL;
		strncpy(new_route->name, "Custom 404 Handler", sizeof(new_route->name));
		strncpy(new_route->verb, "GET", sizeof(new_route->verb));
		strncpy(new_route->route_match, "^.*$", sizeof(new_route->route_match));

		app->r_404_route = new_route;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x8bc2
movq %r14, 0x158(%rax)
jmp 0x8c2d
movq %rdi, %rbx
movl $0x1, %edi
movl $0x168, %esi            # imm = 0x168
callq 0x32e0
movq %rax, %r15
movq %r14, 0x158(%rax)
movups 0x2f9a(%rip), %xmm0     # 0xbb7f
movups %xmm0, 0x10(%rax)
movups 0x2f9f(%rip), %xmm0     # 0xbb8f
movups %xmm0, 0x20(%rax)
movups 0x2fa4(%rip), %xmm0     # 0xbb9f
movups %xmm0, 0x30(%rax)
movups 0x2fa9(%rip), %xmm0     # 0xbbaf
movups %xmm0, 0x40(%rax)
movups 0x2faf(%rip), %xmm0     # 0xbbc0
movups %xmm0, (%rax)
leaq 0x50(%rax), %rdi
leaq 0x2bd5(%rip), %rsi      # 0xb7f4
movl $0x100, %edx            # imm = 0x100
callq 0x30a0
movq %r15, 0x20(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/server.c
// Function: m38_set_404_cleanup
int m38_set_404_cleanup(m38_app *app,
	void (*cleanup)(const int status_code, m38_http_response *response)) {
	if (app->r_404_route) {
		app->r_404_route->cleanup = cleanup;
	} else {
		m38_route *new_route = calloc(1, sizeof(m38_route));
		new_route->handler = NULL;
		new_route->cleanup = cleanup;
		strncpy(new_route->name, "Custom 404 Handler", sizeof(new_route->name));
		strncpy(new_route->verb, "GET", sizeof(new_route->verb));
		strncpy(new_route->route_match, "^.*$", sizeof(new_route->route_match));

		app->r_404_route = new_route;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x8c4f
movq %r14, 0x160(%rax)
jmp 0x8cba
movq %rdi, %rbx
movl $0x1, %edi
movl $0x168, %esi            # imm = 0x168
callq 0x32e0
movq %rax, %r15
movq %r14, 0x160(%rax)
movups 0x2f0d(%rip), %xmm0     # 0xbb7f
movups %xmm0, 0x10(%rax)
movups 0x2f12(%rip), %xmm0     # 0xbb8f
movups %xmm0, 0x20(%rax)
movups 0x2f17(%rip), %xmm0     # 0xbb9f
movups %xmm0, 0x30(%rax)
movups 0x2f1c(%rip), %xmm0     # 0xbbaf
movups %xmm0, 0x40(%rax)
movups 0x2f22(%rip), %xmm0     # 0xbbc0
movups %xmm0, (%rax)
leaq 0x50(%rax), %rdi
leaq 0x2b48(%rip), %rsi      # 0xb7f4
movl $0x100, %edx            # imm = 0x100
callq 0x30a0
movq %r15, 0x20(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/parse.c
// Function: m38_get_header_value_raw
char *m38_get_header_value_raw(const char *request, const size_t request_siz, const char header[static 1]) {
	/* TODO: Make sure this function handles bad input. */
	char *data = NULL;
	const char *header_loc = strnstr(request, header, request_siz);
	if (!header_loc)
		return NULL;

	const char *header_value_start = header_loc + strnlen(header, request_siz) + strlen(": ");
	const char *header_value_end = strnstr(header_loc, "\r\n", request_siz);
	if (!header_value_end)
		return NULL;

	const size_t header_value_size = header_value_end - header_value_start;
	data = calloc(sizeof(char), header_value_size + 1);
	data[header_value_size] = '\0';
	strncpy(data, header_value_start, header_value_size);

	return data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdx, %rsi
movq %r14, %rdx
callq 0x32a0
testq %rax, %rax
je 0x8e27
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3240
movq %rax, %r15
leaq 0x165e(%rip), %rsi      # 0xa447
movq %rbx, %rdi
movq %r14, %rdx
callq 0x32a0
testq %rax, %rax
je 0x8e27
movq %rax, %r14
addq %r15, %rbx
addq $0x2, %rbx
subq %rbx, %r14
leaq 0x1(%r14), %rsi
movl $0x1, %edi
callq 0x32e0
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x30a0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/parse.c
// Function: m38_parse_request
int m38_parse_request(const unsigned char *to_read, const size_t num_read, m38_http_request *out) {
	/* Find the verb */
	const char *verb_end = strnstr((char *)to_read, " ", MAX_READ_LEN);
	if (verb_end == NULL)
		goto error;

	const size_t c_verb_size = verb_end - (char *)to_read;
	const size_t verb_size = c_verb_size >= sizeof(out->verb) ? sizeof(out->verb) - 1: c_verb_size;
	strncpy(out->verb, (char *)to_read, verb_size);

	const char *res_offset = verb_end + strlen(" ");
	const char *resource_end = strnstr(res_offset, " ", sizeof(out->resource));
	if (resource_end == NULL)
		goto error;

	const size_t c_resource_size = resource_end - res_offset;
	const size_t resource_size = c_resource_size >= sizeof(out->resource) ? sizeof(out->resource) : c_resource_size;
	strncpy(out->resource, res_offset, resource_size);

	/* Parse full header here. */
	size_t header_length = 0;
	int found_end = 0;
	while (header_length + 3 <= num_read) {
		if (to_read[header_length] == '\r' &&
		    to_read[header_length + 1] == '\n' &&
		    to_read[header_length + 2] == '\r' &&
		    to_read[header_length + 3] == '\n') {
			header_length += 4;
			found_end = 1;
			break;
		}
		header_length++;
	}

	if (!found_end) {
		m38_log_msg(LOG_DEBUG, "Could not find end of HTTP header.");
		goto error;
	}

	out->full_header = strndup((char *)to_read, header_length);
	out->header_len = header_length;

	return 0;

error:
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x2d1a(%rip), %rsi      # 0xbb7d
movl $0x400, %edx            # imm = 0x400
callq 0x32a0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x8f1a
movq %rax, %r12
subq %r14, %rax
cmpq $0xf, %rax
movl $0xf, %edx
cmovbq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30a0
incq %r12
leaq 0x2cda(%rip), %rsi      # 0xbb7d
movl $0x200, %r13d           # imm = 0x200
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
callq 0x32a0
testq %rax, %rax
je 0x8f1a
subq %r12, %rax
cmpq %r13, %rax
cmovaeq %r13, %rax
leaq 0x10(%rbx), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x30a0
cmpq $0x3, %r15
jb 0x8f07
movl $0x3, %r12d
cmpb $0xd, -0x3(%r14,%r12)
jne 0x8eff
cmpb $0xa, -0x2(%r14,%r12)
jne 0x8eff
cmpb $0xd, -0x1(%r14,%r12)
jne 0x8eff
cmpb $0xa, (%r14,%r12)
je 0x8f2b
incq %r12
cmpq %r15, %r12
jbe 0x8ee0
leaq 0x2d19(%rip), %rsi      # 0xbc27
movl $0x1, %edi
xorl %eax, %eax
callq 0x3540
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incq %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x32d0
movq %rax, 0x230(%rbx)
movq %r12, 0x238(%rbx)
xorl %ebp, %ebp
jmp 0x8f1a
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/parse.c
// Function: m38_parse_body
int m38_parse_body(const size_t received_body_len,
			   const size_t content_length_num,
			   const unsigned char *raw_request,
			   m38_http_request *request) {

	const char *body_start = (char *)raw_request + request->header_len;
	/* We want to read the least amount. Read whatever is smallest. DO IT BECAUSE I SAY SO. */
	if (content_length_num == received_body_len) {
		request->body_len = content_length_num;
		request->full_body = (unsigned char *)strndup(body_start, content_length_num);
	} else if (received_body_len < content_length_num) {
		m38_log_msg(LOG_DEBUG, "FULL BODY: Received body length is less than clength for full_body.");
		request->body_len = received_body_len;
		request->full_body = (unsigned char *)strndup(body_start, request->body_len);
	} else if (content_length_num > 0 && content_length_num < received_body_len) {
		m38_log_msg(LOG_DEBUG, "FULL BODY: Content length is less than total received body length.");
		request->body_len = content_length_num;
		request->full_body = (unsigned char *)strndup(body_start, request->body_len);
	} else {
		m38_log_msg(LOG_DEBUG, "FULL BODY: Discrepancy between content-length and body length.");
		request->full_body = NULL;
	}

	if (!request->full_body) {
		m38_log_msg(LOG_WARN, "No body on request, even though we expect one.");
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
addq 0x238(%rcx), %r14
cmpq %rdi, %rsi
je 0x8f96
jbe 0x8f73
leaq 0x2cdc(%rip), %rsi      # 0xbc4a
movq %rdi, %r15
jmp 0x8f8a
testq %r15, %r15
setne %al
cmpq %rdi, %r15
setb %cl
testb %cl, %al
je 0x8fbb
leaq 0x2d04(%rip), %rsi      # 0xbc8e
movl $0x1, %edi
xorl %eax, %eax
callq 0x3540
movq %r15, 0x248(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x32d0
movq %rax, %rcx
movq %rax, 0x240(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x8ff1
jmp 0x8fd9
leaq 0x2d0f(%rip), %rsi      # 0xbcd1
movl $0x1, %edi
xorl %eax, %eax
callq 0x3540
movq $0x0, 0x240(%rbx)
leaq 0x2d30(%rip), %rsi      # 0xbd10
movl $0x2, %edi
xorl %eax, %eax
callq 0x3540
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/parse.c
// Function: m38_parse_form_encoded_body
int m38_parse_form_encoded_body(m38_http_request *request) {
	struct sparse_dict *new_dict = NULL;
	char *potential_kv_pair = NULL;
	char *duplicated_body = strndup((char *)request->full_body, request->body_len);
	if (!duplicated_body) {
		goto err;
	}

	new_dict = sparse_dict_init();

	while ((potential_kv_pair = strsep((char **)&request->full_body, "&")) != NULL) {
		char *key = NULL;
		char *value = NULL;
		key = strsep(&potential_kv_pair, "=");
		value = strsep(&potential_kv_pair, "=");

		if (!key || !value) {
			continue;
		}

		char *decoded_buffer = calloc(1, strlen(value));
		if (m38_url_decode(value, decoded_buffer) > 0) {
			sparse_dict_set(new_dict, key, strlen(key), decoded_buffer, strlen(decoded_buffer));
		} else {
			m38_log_msg(LOG_WARN, "Could not place item into form elements dict.");
		}
		free(decoded_buffer);
	}

	request->form_elements = new_dict;
	free(duplicated_body);
	return 0;

err:
	free(duplicated_body);
	free(new_dict);
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0x240(%rdi), %r14
xorl %eax, %eax
callq 0x31d0
movq %rax, 0x8(%rsp)
leaq 0x2d1b(%rip), %rsi      # 0xbd3f
movq %r14, %rdi
callq 0x33d0
movq %rax, (%rsp)
testq %rax, %rax
je 0x9117
leaq 0x2b96(%rip), %r12      # 0xbbd6
movq %rsp, %r13
leaq 0x2cf5(%rip), %r15      # 0xbd3f
movq %r13, %rdi
movq %r12, %rsi
callq 0x33d0
movq %rax, %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0x33d0
movq %rax, %rbp
testq %rbx, %rbx
setne %al
testq %rbp, %rbp
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x90ff
movq %r12, %r13
movq %r14, %r12
movq %r15, %r14
movq %rbp, %rdi
callq 0x3150
movl $0x1, %edi
movq %rax, %rsi
callq 0x32e0
movq %rax, %r15
movq %rbp, %rdi
movq %rax, %rsi
callq 0x30e0
testl %eax, %eax
jle 0x90d8
movq %rbx, %rdi
callq 0x3150
movq %rax, %rbp
movq %r15, %rdi
callq 0x3150
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x3300
jmp 0x90eb
movl $0x2, %edi
leaq 0x2c5d(%rip), %rsi      # 0xbd41
xorl %eax, %eax
callq 0x3540
movq %r15, %rdi
callq 0x3050
movq %r14, %r15
movq %r12, %r14
movq %r13, %r12
movq %rsp, %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x33d0
movq %rax, (%rsp)
testq %rax, %rax
jne 0x904a
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x250(%rax)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/perftests/kvldsclean/main.c
// Function: batch_set
static int
batch_set(struct wire_requestqueue * Q, size_t start, size_t N)
{
	struct many_state C;
	char buf[9];
	size_t x;
	struct kvldskey * key;

	/* Not failed or done yet.  No requests in progress yet. */
	C.failed = C.done = 0;
	C.Nip = 0;

	/* Set values. */
	for (x = start; x < start + N; x++) {
		/* Set "$x" = "$x". */
		sprintf(buf, "%08zu", x);
		if ((key = kvldskey_create((uint8_t *)buf, 8)) == NULL)
			goto err0;
		if (proto_kvlds_request_set(Q, key, key, callback_done, &C)) {
			warnp("Failed to send SET request");
			goto err1;
		}
		C.Nip += 1;
		kvldskey_free(key);
	}

	/* Spin until the requests are done. */
	if (events_spin(&C.done) || C.failed) {
		warnp("SET request failed");
		return (-1);
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
testq %rdx, %rdx
je 0x29e5
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
addq %rsi, %r14
leaq 0x1f(%rsp), %rbp
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rbp, %rdi
leaq 0x87d4(%rip), %rsi      # 0xb166
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movl $0x8, %esi
movq %rbp, %rdi
callq 0x551c
testq %rax, %rax
je 0x2a6c
movq %rax, %r13
movq %r12, %rdi
movq %rax, %rsi
movq %rax, %rdx
leaq 0x1da(%rip), %rcx       # 0x2b9f
movq %rsp, %r8
callq 0x5749
testl %eax, %eax
jne 0x2a1d
incq (%rsp)
movq %r13, %rdi
callq 0x2040
incq %r15
cmpq %r14, %r15
jb 0x2988
leaq 0xc(%rsp), %r14
movq %r14, %rdi
callq 0x2e6d
xorl %ebx, %ebx
orl -0x4(%r14), %eax
je 0x2a6c
callq 0x2090
cmpl $0x0, (%rax)
je 0x2a41
movq %rax, %rbx
leaq 0x8779(%rip), %rdi      # 0xb187
xorl %eax, %eax
callq 0x52d8
movl $0x0, (%rbx)
jmp 0x2a4f
callq 0x2090
cmpl $0x0, (%rax)
je 0x2a56
movq %rax, %r14
leaq 0x873b(%rip), %rdi      # 0xb16c
xorl %eax, %eax
callq 0x52d8
movl $0x0, (%r14)
jmp 0x2a64
leaq 0x873f(%rip), %rdi      # 0xb187
xorl %eax, %eax
callq 0x53f7
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2a6c
leaq 0x870f(%rip), %rdi      # 0xb16c
xorl %eax, %eax
callq 0x53f7
movq %r13, %rdi
callq 0x2040
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/perftests/kvldsclean/main.c
// Function: batch_delete
static int
batch_delete(struct wire_requestqueue * Q, size_t start, size_t N)
{
	struct many_state C;
	char buf[9];
	size_t x;
	struct kvldskey * key;

	/* Not failed or done yet.  No requests in progress yet. */
	C.failed = C.done = 0;
	C.Nip = 0;

	/* Set values. */
	for (x = start; x < start + N; x++) {
		/* Delete "$x". */
		sprintf(buf, "%08zu", x);
		if ((key = kvldskey_create((uint8_t *)buf, 8)) == NULL)
			goto err0;
		if (proto_kvlds_request_delete(Q, key, callback_done, &C)) {
			warnp("Failed to send DELETE request");
			goto err1;
		}
		C.Nip += 1;
		kvldskey_free(key);
	}

	/* Spin until the requests are done. */
	if (events_spin(&C.done) || C.failed) {
		warnp("DELETE request failed");
		return (-1);
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
testq %rdx, %rdx
je 0x2b07
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
addq %rsi, %r14
leaq 0x1f(%rsp), %rbp
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rbp, %rdi
leaq 0x86af(%rip), %rsi      # 0xb166
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movl $0x8, %esi
movq %rbp, %rdi
callq 0x551c
testq %rax, %rax
je 0x2b8e
movq %rax, %r13
movq %r12, %rdi
movq %rax, %rsi
leaq 0xb8(%rip), %rdx        # 0x2b9f
movq %rsp, %rcx
callq 0x5e02
testl %eax, %eax
jne 0x2b3f
incq (%rsp)
movq %r13, %rdi
callq 0x2040
incq %r15
cmpq %r14, %r15
jb 0x2aad
leaq 0xc(%rsp), %r14
movq %r14, %rdi
callq 0x2e6d
xorl %ebx, %ebx
orl -0x4(%r14), %eax
je 0x2b8e
callq 0x2090
cmpl $0x0, (%rax)
je 0x2b63
movq %rax, %rbx
leaq 0x8688(%rip), %rdi      # 0xb1b8
xorl %eax, %eax
callq 0x52d8
movl $0x0, (%rbx)
jmp 0x2b71
callq 0x2090
cmpl $0x0, (%rax)
je 0x2b78
movq %rax, %r14
leaq 0x8647(%rip), %rdi      # 0xb19a
xorl %eax, %eax
callq 0x52d8
movl $0x0, (%r14)
jmp 0x2b86
leaq 0x864e(%rip), %rdi      # 0xb1b8
xorl %eax, %eax
callq 0x53f7
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2b8e
leaq 0x861b(%rip), %rdi      # 0xb19a
xorl %eax, %eax
callq 0x53f7
movq %r13, %rdi
callq 0x2040
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: yyerror
void yyerror(char *format, ...) { /* Called by yyparse on error */
	va_list args;

	errorOccurred = true;
	(void) fprintf(stderr, "%s:%d: ", inputFileName, lineNumber);
	va_start(args, format);
	vfprintf(stderr, format, args);
	fprintf(stderr, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x32b3
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movb $0x1, 0x16854(%rip)     # 0x19b0e
movq 0x15d37(%rip), %r15     # 0x18ff8
movq (%r15), %rdi
movq 0x15ebd(%rip), %rdx     # 0x19188
leaq 0x15ed2(%rip), %rax     # 0x191a4
movl (%rax), %ecx
leaq 0xdfb1(%rip), %rsi      # 0x1128c
xorl %eax, %eax
callq 0x3160
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %r14, 0x10(%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x31d0
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x3130
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/regexp.c
// Function: OutOfMemory
static void OutOfMemory(char *func) {
	(void) fprintf(stderr, "Out of memory in %s\n", func);
	(void) fprintf(stderr, "%ld bytes allocated\n", totalMalloc);
	(void) fprintf(stderr, "%ld transitions\n", nrTransition);
	(void) fprintf(stderr, "%ld sets\n", nrSet);
	(void) fprintf(stderr, "%ld regexps\n", nrRegExp);
}

// Assembly:
pushq %rbx
movq %rdi, %rdx
movq 0x1563b(%rip), %rbx     # 0x18ff8
movq (%rbx), %rdi
leaq 0xf6a1(%rip), %rsi      # 0x13068
xorl %eax, %eax
callq 0x3160
movq (%rbx), %rdi
movq 0x18298(%rip), %rdx     # 0x1bc70
leaq 0xf69e(%rip), %rsi      # 0x1307d
xorl %eax, %eax
callq 0x3160
movq (%rbx), %rdi
movq 0x18288(%rip), %rdx     # 0x1bc78
leaq 0xf69b(%rip), %rsi      # 0x13092
xorl %eax, %eax
callq 0x3160
movq (%rbx), %rdi
movq 0x18278(%rip), %rdx     # 0x1bc80
leaq 0xf694(%rip), %rsi      # 0x130a3
xorl %eax, %eax
callq 0x3160
movq (%rbx), %rdi
movq 0x18268(%rip), %rdx     # 0x1bc88
leaq 0xf686(%rip), %rsi      # 0x130ad
xorl %eax, %eax
popq %rbx
jmp 0x3160
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: nrParameters
int nrParameters(Node argList) {
	int level = 0;
	int nrParameters = argList == NULL? 0: 1;

	for (Node nPtr = argList; nPtr != NULL; nPtr = nPtr->next) {
        const char *str = (const char *) nPtr->element.name;
        if (strcmp(str, ",") == 0 && level == 0) {
			nrParameters++;
        } else {
            if (strcmp(str, "{") == 0 || strcmp(str, "(") == 0 || strcmp(str, "[") == 0) {
                level++;
            } else if (strcmp(str, "}") == 0 || strcmp(str, ")") == 0 || strcmp(str, "]") == 0) {
                level--;
            }
        }
	}
	return nrParameters;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
setne %al
je 0x3ce8
xorl %ecx, %ecx
movq 0x18(%rdi), %rdx
movzbl (%rdx), %esi
cmpl $0x5a, %esi
jle 0x3c9c
cmpl $0x7a, %esi
jg 0x3cc3
cmpl $0x5b, %esi
je 0x3cd7
cmpl $0x5d, %esi
je 0x3ccd
jmp 0x3cdf
cmpl $0x28, %esi
je 0x3cd7
cmpl $0x29, %esi
je 0x3ccd
cmpl $0x2c, %esi
jne 0x3cdf
cmpb $0x0, 0x1(%rdx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
movzbl %sil, %edx
addl %edx, %eax
jmp 0x3cdf
cmpl $0x7b, %esi
je 0x3cd7
cmpl $0x7d, %esi
jne 0x3cdf
cmpb $0x0, 0x1(%rdx)
jne 0x3cdf
decl %ecx
jmp 0x3cdf
cmpb $0x0, 0x1(%rdx)
jne 0x3cdf
incl %ecx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
jne 0x3c7f
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: MakeRuleResult
RuleResult MakeRuleResult(Name returnVariable, Name returnType, Name initialValue) {
	RuleResult ruleResult = (RuleResult) mmalloc(sizeof(struct RuleResult));

	ruleResult->returnVariable = returnVariable;
	ruleResult->returnType = returnType;
	ruleResult->initialValue = initialValue;
	return ruleResult;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq 0xc2f0
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: MakeName
Name MakeName(char *str, int index, NameType nameType, short int lineNr) {
	Name name = (Name) mmalloc(sizeof(struct Name));

	name->name = MakeString(str);
	name->index = index;
	name->lineNr = lineNr;
	name->empty = false;
	name->first = NULL;
	name->nameType = nameType;
	name->rules = NULL;
	name->follow = NULL;
	name->arglist = NULL;
	name->ruleResult = NULL;
	name->keywords = NULL;
	name->usesLA = false;
	name->functions = NULL;
	name->nrParameters = 0;
	name->isTerminal = false;
	return (name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x68, %edi
callq 0xc2f0
movq %rax, %r12
movq %r15, %rdi
callq 0x3bfc
movq %rax, (%r12)
movslq %r14d, %rax
movq %rax, 0x28(%r12)
movl %ebx, 0x20(%r12)
movw $0x0, 0x30(%r12)
xorl %eax, %eax
movq %rax, 0x8(%r12)
movl %ebp, 0x38(%r12)
movq %rax, 0x40(%r12)
movl %eax, 0x32(%r12)
movl %eax, 0x48(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
movups %xmm0, 0x50(%r12)
movq %rax, 0x60(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: InsertSymbol
Name InsertSymbol(char *str, NodeList rules, Boolean lhs, NameType nameType) {
	Name name = GetInfo(FindNode(idTree, str, (TreeCmp) NameCmpStr));

	if (name == NULL) {
		name = MakeName(str, -1, nameType, lineNumber);
		InsertNodeSingle(&idTree, name, name, (TreeCmp) NameCmp);
	}
	if (lhs) {
		if (name->rules == NULL && name->nameType != token) {
			name->rules = rules;
		} else {
			yyerror("lhs %s already used", str);
		}
	}
	return (name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x15d59(%rip), %rdi     # 0x19b00
leaq 0x84(%rip), %rdx        # 0x3e32
movq %rbx, %rsi
callq 0xbca0
movq %rax, %rdi
callq 0xbbfa
movq %rax, %r15
testq %rax, %rax
jne 0x3dfc
leaq 0x153d7(%rip), %rax     # 0x191a4
movswl (%rax), %ecx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %r12d, %edx
callq 0x3d12
movq %rax, %r15
leaq 0x15d16(%rip), %rdi     # 0x19b00
leaq 0x49(%rip), %rcx        # 0x3e3a
movq %rax, %rsi
movq %rax, %rdx
callq 0xb7fc
testw %bp, %bp
je 0x3e13
cmpq $0x0, 0x18(%r15)
jne 0x3e1f
cmpl $0x4, 0x38(%r15)
je 0x3e1f
movq %r14, 0x18(%r15)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd2ea(%rip), %rdi      # 0x11110
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3250
jmp 0x3e13
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: InsertString
Name InsertString(char *str) {
	Name name = GetInfo(FindNode(idTree, str, (TreeCmp) NameCmpStr));

	if (name == NULL) {
		name = MakeName(str, ++nodeNumber, string, lineNumber);
		InsertNodeSingle(&idTree, name, name, (TreeCmp) NameCmp);
	}
	return (name);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x15c95(%rip), %rdi     # 0x19b00
leaq -0x40(%rip), %rdx       # 0x3e32
movq %rbx, %rsi
callq 0xbca0
movq %rax, %rdi
callq 0xbbfa
movq %rax, %r14
testq %rax, %rax
jne 0x3ecb
movl 0x15c78(%rip), %esi     # 0x19b08
incl %esi
movl %esi, 0x15c70(%rip)     # 0x19b08
leaq 0x15305(%rip), %rax     # 0x191a4
movswl (%rax), %ecx
movq %rbx, %rdi
movl $0x1, %edx
callq 0x3d12
movq %rax, %r14
leaq 0x15c47(%rip), %rdi     # 0x19b00
leaq -0x86(%rip), %rcx       # 0x3e3a
movq %rax, %rsi
movq %rax, %rdx
callq 0xb7fc
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: AssignString
void AssignString(Name name, Name str) {
	if (name->rules == NULL && name->nameType == identifier) {
		name->nameType = token;
		name->index = str->index;
	} else {
		yyerror("token already defined as lhs %s", name->name);
	}
}

// Assembly:
cmpq $0x0, 0x18(%rdi)
jne 0x3ef3
cmpl $0x0, 0x38(%rdi)
jne 0x3ef3
movl $0x4, 0x38(%rdi)
movq 0x28(%rsi), %rax
movq %rax, 0x28(%rdi)
retq
movq (%rdi), %rsi
leaq 0xd227(%rip), %rdi      # 0x11124
xorl %eax, %eax
jmp 0x3250
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: KeywordString
void KeywordString(Name name, Name str, Name ident) {
    if (name->keywords != NULL || name->functions != NULL) {
		yyerror("no keyword hierarchie allowed: %s", name->name);
	} else if (name->rules == NULL && name->nameType == identifier && (ident->nameType == identifier || ident->nameType == token)) {
		name->nameType = token;
		if (str == NULL) {
			name->index = ++nodeNumber;
		} else {
			name->index = str->index;
			str->index = 0;
		}
		ident->nameType = token;
		InsertNodeSingle(&ident->keywords, str, name, (TreeCmp) NameCmp);
		AddProperty("keywords");
	} else if (ident->nameType != identifier && ident->nameType != token) {
		yyerror("identifier already defined as lhs %s", ident->name);
	} else {
		yyerror("token already defined as lhs %s", name->name);
	}
}

// Assembly:
movq %rdi, %rax
cmpq $0x0, 0x58(%rdi)
jne 0x3fa5
cmpq $0x0, 0x60(%rax)
jne 0x3fa5
cmpq $0x0, 0x18(%rax)
jne 0x3f90
cmpl $0x0, 0x38(%rax)
jne 0x3f90
testl $0xfffffffb, 0x38(%rdx) # imm = 0xFFFFFFFB
jne 0x3f90
movl $0x4, 0x38(%rax)
testq %rsi, %rsi
je 0x3f51
movq 0x28(%rsi), %rcx
movq %rcx, 0x28(%rax)
movq $0x0, 0x28(%rsi)
jmp 0x3f65
movslq 0x15bb0(%rip), %rcx     # 0x19b08
incq %rcx
movl %ecx, 0x15ba7(%rip)     # 0x19b08
movq %rcx, 0x28(%rax)
pushq %rax
movl $0x4, 0x38(%rdx)
addq $0x58, %rdx
leaq -0x13e(%rip), %rcx      # 0x3e3a
movq %rdx, %rdi
movq %rax, %rdx
callq 0xb7fc
leaq 0xd1dc(%rip), %rdi      # 0x11166
popq %rax
jmp 0x3c19
testl $0xfffffffb, 0x38(%rdx) # imm = 0xFFFFFFFB
jne 0x3fb1
movq (%rax), %rsi
leaq 0xd181(%rip), %rdi      # 0x11124
jmp 0x3fbb
movq (%rax), %rsi
leaq 0xd195(%rip), %rdi      # 0x11144
jmp 0x3fbb
movq (%rdx), %rsi
leaq 0xd1b4(%rip), %rdi      # 0x1116f
xorl %eax, %eax
jmp 0x3250
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: Function
void Function(Name name, Name fun, Name ident) {
	if (name->keywords != NULL || name->functions != NULL) {
		yyerror("no function hierarchie allowed: %s", name->name);
	} else if (name->rules == NULL && name->nameType == identifier && (ident->nameType == identifier || ident->nameType == token)) {
		name->nameType = token;
		name->index = ++nodeNumber;
		fun->index = 0;
		fun->nameType = function;
		ident->nameType = token;
		InsertNodeSingle(&ident->functions, fun, name, (TreeCmp) NameCmp);
		AddProperty("functions");
	} else if (ident->nameType != identifier && ident->nameType != token) {
		yyerror("identifier already defined as lhs %s", ident->name);
	} else {
		yyerror("token already defined as lhs %s", name->name);
	}
}

// Assembly:
movq %rdi, %rax
cmpq $0x0, 0x58(%rdi)
jne 0x4054
cmpq $0x0, 0x60(%rax)
jne 0x4054
cmpq $0x0, 0x18(%rax)
jne 0x403f
cmpl $0x0, 0x38(%rax)
jne 0x403f
testl $0xfffffffb, 0x38(%rdx) # imm = 0xFFFFFFFB
jne 0x403f
pushq %rax
movl $0x4, %ecx
movl %ecx, 0x38(%rax)
movslq 0x15b0b(%rip), %rdi     # 0x19b08
incq %rdi
movl %edi, 0x15b02(%rip)     # 0x19b08
movq %rdi, 0x28(%rax)
movq $0x0, 0x28(%rsi)
movl $0x5, 0x38(%rsi)
movl %ecx, 0x38(%rdx)
addq $0x60, %rdx
leaq -0x1ed(%rip), %rcx      # 0x3e3a
movq %rdx, %rdi
movq %rax, %rdx
callq 0xb7fc
leaq 0xd463(%rip), %rdi      # 0x1149c
popq %rax
jmp 0x3c19
testl $0xfffffffb, 0x38(%rdx) # imm = 0xFFFFFFFB
jne 0x4060
movq (%rax), %rsi
leaq 0xd0d2(%rip), %rdi      # 0x11124
jmp 0x406a
movq (%rax), %rsi
leaq 0xd136(%rip), %rdi      # 0x11194
jmp 0x406a
movq (%rdx), %rsi
leaq 0xd105(%rip), %rdi      # 0x1116f
xorl %eax, %eax
jmp 0x3250
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: containsGrammarSymbol
Boolean containsGrammarSymbol(NodeList list) {
	NodeList ptr = list;

	while (ptr != NULL) {
		if (nodeContainsGrammarSymbol(ptr->first)) {
			return true;
		}
		ptr = ptr->rest;
	}
	return false;
}

// Assembly:
testq %rdi, %rdi
je 0x4130
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
callq 0x4139
testw %ax, %ax
jne 0x4133
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x4116
xorl %eax, %eax
jmp 0x4137
xorl %eax, %eax
retq
movw $0xffff, %ax            # imm = 0xFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: nodeContainsGrammarSymbol
static Boolean nodeContainsGrammarSymbol(Node node) {
	while (node != NULL) {
		switch (node->nodeType) {
			case single:
				if (node->element.name->nameType != code && node->element.name->nameType != output) {
					return true;
				}
				break;
			case option:
				if (nodeContainsGrammarSymbol(node->element.sub)) {
					return true;
				}
				break;
			case sequence:
				if (nodeContainsGrammarSymbol(node->element.sub)) {
					return true;
				}
				break;
			case chain:
				if (nodeContainsGrammarSymbol(node->element.sub->element.sub) ||
					  nodeContainsGrammarSymbol(node->element.sub->next->element.sub)) {
					return true;
				}
			case alternative:
				if (containsGrammarSymbol(node->element.alternatives)) {
					return true;
				}
				break;
			case breakToken:
			case errorMessage:
				return true;
		}
		node = node->next;
	}
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x41df
movq %rdi, %r14
leaq 0xceb0(%rip), %r15      # 0x11004
movl 0x4(%r14), %eax
cmpq $0x6, %rax
ja 0x41d2
movw $0xffff, %bx            # imm = 0xFFFF
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x18(%r14), %rdi
callq 0x4139
testw %ax, %ax
je 0x41d2
jmp 0x41e1
movq 0x18(%r14), %r12
movq 0x18(%r12), %rdi
callq 0x4139
testw %ax, %ax
jne 0x41e1
movq 0x28(%r12), %rax
movq 0x18(%rax), %rdi
callq 0x4139
testw %ax, %ax
je 0x41ba
jmp 0x41e1
movq 0x18(%r14), %r12
jmp 0x41cd
movq 0x18(%r14), %rax
movl 0x38(%rax), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
je 0x41d2
jmp 0x41e1
movq (%r12), %rdi
callq 0x4139
testw %ax, %ax
jne 0x41e1
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x41ba
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x4154
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: doIndent
void doIndent(int level) {
    fputc('\n', outputFile);
	while (level != 0) {
		fputs("	", outputFile);
		level--;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x158cc(%rip), %rsi     # 0x19ae8
movl $0xa, %edi
callq 0x3130
testl %ebx, %ebx
je 0x4244
leaq 0xcf86(%rip), %r14      # 0x111b7
movq 0x158b0(%rip), %rsi     # 0x19ae8
movq %r14, %rdi
callq 0x3110
decl %ebx
jne 0x4231
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: HasProperty
static Boolean HasProperty(char *property) {
	if (*property == '!') {
		return (FindNode(properties, property + 1, (TreeCmp) strcmp) == NULL);
	} else {
		return (FindNode(properties, property, (TreeCmp) strcmp) != NULL);
	}
}

// Assembly:
pushq %rax
movq %rdi, %rsi
cmpb $0x21, (%rdi)
movq 0x1385b(%rip), %rdi     # 0x19af8
jne 0x62b6
incq %rsi
movq 0x12d1f(%rip), %rdx     # 0x18fc8
callq 0xbca0
testq %rax, %rax
sete %al
jmp 0x62c8
movq 0x12d0b(%rip), %rdx     # 0x18fc8
callq 0xbca0
testq %rax, %rax
setne %al
movzbl %al, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/theovosse[P]llgen/llgen.c
// Function: InsertElement
static Boolean InsertElement(TREE *first, Name name) {
	Name sym = GetInfo(FindNode(*first, name, (TreeCmp) NameCmp));

	if (sym == NULL) {
		InsertNodeSingle(first, name, name, (TreeCmp) NameCmp);
		return (true);
	} else {
		return (false);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
leaq -0x24ad(%rip), %rdx     # 0x3e3a
callq 0xbca0
movq %rax, %rdi
callq 0xbbfa
testq %rax, %rax
je 0x62fd
xorl %eax, %eax
jmp 0x6316
leaq -0x24ca(%rip), %rcx     # 0x3e3a
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0xb7fc
movw $0xffff, %ax            # imm = 0xFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq