LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Nico01[P]obj2asm/t_tree.c
// Function: find
void *find(void *data, NODE_T *root_node, int (*cmp_routine)(const void *, const void *), NODE_T **node_ptr)
{
    NODE_T *curr_node;
    int curr_direct;

    /* Prepare initial value for tree traversal */
    NODE_T *child_node = root_node;

    /*  Traverse tree looking for the place to insert this new node.  If
    **  we find a node which gives a comparison result of 0 (equal), then
    **  we cannot insert this new node.  To indicate this duplicate value,
    **  a non-zero value is returned (the value happens to be a pointer to
    **  node which contains the duplicate value). */
    do {
        curr_node = child_node;

        /*  Compare this new node with the node at this position in the
        **  tree and determine which direction to proceed from here. */
        curr_direct = (*cmp_routine)(curr_node->data, data);

        //  is this node is a duplicate node?
        if (node_ptr && curr_direct == RIGHT) {
            *node_ptr = curr_node;
        }

        if (curr_direct == EQUAL) {
            if (node_ptr) {
                *node_ptr = curr_node;
            }
            return curr_node->data;
        }

        child_node = curr_node->ptr[curr_direct];

    } while (!curr_node->thread[curr_direct]);

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
xorl %r15d, %r15d
movq 0x20(%r14), %rdi
movq %r13, %rsi
callq *%r12
testq %rbx, %rbx
je 0x12840
cmpl $0x1, %eax
jne 0x12840
movq %r14, (%rbx)
jmp 0x12845
cmpl $0x2, %eax
je 0x12856
cltq
cmpl $0x0, 0x18(%r14,%rax,4)
movq 0x8(%r14,%rax,8), %r14
je 0x12827
jmp 0x12862
testq %rbx, %rbx
je 0x1285e
movq %r14, (%rbx)
movq 0x20(%r14), %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/main.c
// Function: help
static int help(const char *arg0) {
	assert(arg0);
	FILE *output = stdout;
	fprintf(output, "Usage: %s [-h] [-p port-number] [-m mode]\n", arg0);
	static const char *m = "\n\
eweb - an embeddable web-server\n\n\
git:       https://github.com/hower/eweb\n\
license:   MIT\n\
copyright: 2015-2016 http://www.codehosting.net\n\
           2018      Richard James Howe\n\
           (see project repo for more details)\n\
\n\
Options:\n\n\
\t-h,        Print this help message and exit successfully.\n\
\t-p number, Set server port number for server to listen to.\n\
\t-m mode,   Set server thread management mode.\n\
\n\
This is a demonstration program for a tiny, embeddable web-server. It\n\
is not a fully featured web-server but is designed to be tiny and\n\
most importantly portable with platform dependent functionality hidden\n\
within the library.\n\
\n\
Different methods for coping with simultaneous connections can be\n\
selected from with the '-m' flag. Valid modes are 'thread', 'fork'\n\
and 'single'. Your platform may not support all modes.\n\
\n";
	fputs(m, output);
	fprintf(output, "The default port the server listens on is %d.\n\n", DEFAULT_PORT);
	fprintf(output, "This program returns %d on success, and %d on failure.\n\n", EXIT_SUCCESS, EXIT_FAILURE);
	return 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x27fe
movq %rdi, %rdx
movq 0x6824(%rip), %rax      # 0x8fd0
movq (%rax), %rbx
leaq 0x2948(%rip), %rsi      # 0x50fe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2190
leaq 0x2962(%rip), %rdi      # 0x5129
movq %rbx, %rsi
callq 0x20f0
leaq 0x2c88(%rip), %rsi      # 0x545e
movq %rbx, %rdi
movl $0x1f90, %edx           # imm = 0x1F90
xorl %eax, %eax
callq 0x2190
leaq 0x2ca2(%rip), %rsi      # 0x548e
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x2190
leaq 0x28dd(%rip), %rdi      # 0x50e2
leaq 0x2848(%rip), %rsi      # 0x5054
leaq 0x28d4(%rip), %rcx      # 0x50e7
movl $0xf4, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/main.c
// Function: send_response
static int send_response(eweb_os_t *w, eweb_os_hit_args_t *args, const char *path, const char *request_body, http_verb type) {
	assert(w);
	assert(path);
	UNUSED(type);
	const size_t path_length = strlen(path);
	if (path_length > 3 && !strncmp(&path[path_length - 3], "api", 3))
		return send_api_response(w, args, path, request_body);
	if (path_length == 0)
		return send_file_response(w, args, "index.html", request_body, 10);
	return send_file_response(w, args, path, request_body, path_length);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x295b
movq %rdx, %r15
testq %rdx, %rdx
je 0x297a
movq %rsi, %rbx
movq %rdi, %r14
movq %r15, %rdi
callq 0x20b0
cmpq $0x4, %rax
jb 0x28bf
cmpb $0x61, -0x3(%r15,%rax)
jne 0x28c4
cmpb $0x70, -0x2(%r15,%rax)
jne 0x28c4
cmpb $0x69, -0x1(%r15,%rax)
jne 0x28c4
cmpq $0x1, 0x30(%rbx)
jne 0x28a2
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4204
movq %rax, %r12
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4204
movq %rax, %rdi
callq 0x20b0
leaq 0x2d08(%rip), %rsi      # 0x559b
movq %r12, %rdi
movq %rax, %rdx
callq 0x2070
testl %eax, %eax
je 0x28f4
leaq 0x2d14(%rip), %rdx      # 0x55bd
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x31b1
testq %rax, %rax
je 0x28e0
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %rax, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2999
leaq 0x2ca9(%rip), %rdx      # 0x5590
movl $0xa, %ecx
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x28d0
leaq 0x4(%rsp), %r12
movl $0x0, (%r12)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41c4
movq %rax, %rdi
callq 0x22a0
leal 0x1(%rax), %edx
cmpl $0x64, %eax
movl $0x1, %ecx
cmovbl %edx, %ecx
leaq 0x3bcc(%rip), %rdx      # 0x64f4
movl $0x4, %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x20d0
leaq 0x2c65(%rip), %rdx      # 0x55a3
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rcx
movq %r15, %r8
callq 0x32db
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2bcb(%rip), %rdi      # 0x552d
leaq 0x26eb(%rip), %rsi      # 0x5054
leaq 0x2bbf(%rip), %rcx      # 0x552f
movl $0xe8, %edx
callq 0x20e0
leaq 0x2c0a(%rip), %rdi      # 0x558b
leaq 0x26cc(%rip), %rsi      # 0x5054
leaq 0x2ba0(%rip), %rcx      # 0x552f
movl $0xe9, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_write_header
int eweb_write_header(eweb_os_t *w, const int socket_fd, const char *head, long content_len) {
	assert(w);
	assert(head);
	int r = EWEB_OK;
	char cl[64+1] = { 0 };
	string_t *header = string_new(w, 255);
	if (!header)
		goto fail;
	if (!string_add(w, header, head))
		goto fail;
	if (!string_add(w, header, "\nContent-Length: "))
		goto fail;
	snprintf(cl, sizeof(cl), "%ld", content_len);
	if (!string_add(w, header, cl))
		goto fail;
	if (!string_add(w, header, "\r\n\r\n"))
		goto fail;
	const long wlen = header->used_bytes - 1;
	if (w->write(w, socket_fd, string_chars(w, header), wlen) != wlen)
		r = EWEB_ERROR;
	string_free(w, header);
	return r;
fail:
	string_free(w, header);
	return EWEB_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
testq %rdi, %rdi
je 0x2ee3
movq %rdx, %r12
testq %rdx, %rdx
je 0x2f02
movq %rcx, %r15
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movb $0x0, 0x40(%rsp)
movl $0xff, %esi
callq 0x2f21
testq %rax, %rax
je 0x2eac
movq %rax, %r14
decq 0x10(%rax)
movq %r12, %rdi
callq 0x20b0
leaq 0x1(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x42db
testl %eax, %eax
jne 0x2e84
decq 0x10(%r14)
leaq 0x2ac6(%rip), %rdx      # 0x58d9
movl $0x12, %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42db
testl %eax, %eax
jne 0x2e84
leaq 0x2abd(%rip), %rdx      # 0x58eb
movq %rsp, %r12
movl $0x41, %esi
movq %r12, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x20d0
decq 0x10(%r14)
movq %r12, %rdi
callq 0x20b0
leaq 0x1(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x42db
testl %eax, %eax
jne 0x2e84
decq 0x10(%r14)
leaq 0x2a7f(%rip), %rdx      # 0x58ef
movl $0x5, %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42db
testl %eax, %eax
je 0x2ec0
movq (%r14), %rsi
movl $0x1, %ebp
testq %rsi, %rsi
je 0x2e98
movq 0x18(%rbx), %rdi
callq *0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq *0x10(%rbx)
jmp 0x2eb1
movl $0x1, %ebp
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdx
movq 0x10(%r14), %r15
decq %r15
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rcx
callq *0x30(%rbx)
xorl %ebp, %ebp
cmpq %r15, %rax
setne %bpl
movq (%r14), %rsi
jmp 0x2e8c
leaq 0x2643(%rip), %rdi      # 0x552d
leaq 0x299a(%rip), %rsi      # 0x588b
leaq 0x299a(%rip), %rcx      # 0x5892
movl $0x80, %edx
callq 0x20e0
leaq 0x29cb(%rip), %rdi      # 0x58d4
leaq 0x297b(%rip), %rsi      # 0x588b
leaq 0x297b(%rip), %rcx      # 0x5892
movl $0x81, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: string_new
string_t *string_new(eweb_os_t *w, const long increments) {
	string_t *s = eweb_malloc_or_die(w, sizeof(*s));
	if (!s)
		goto fail;
	if (bcreate(w, s, 1, increments) != EWEB_OK)
		goto fail;
	if (badd(w, s, "\0", 1) != EWEB_OK)
		goto fail;
	return s;
fail:
	string_free(w, s);
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x28, %esi
callq 0x3a6c
movq %rax, %rbx
testq %rax, %rax
je 0x2f97
testq %r14, %r14
je 0x2fad
movq $0x1, 0x18(%rbx)
movq %r15, 0x20(%rbx)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3f4a
movq %rax, (%rbx)
testq %rax, %rax
je 0x2f97
movq 0x18(%rbx), %rax
imulq 0x20(%rbx), %rax
movq %rax, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x32e3(%rip), %rdx      # 0x6266
movl $0x1, %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42db
testl %eax, %eax
je 0x2fa4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x307a
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2579(%rip), %rdi      # 0x552d
leaq 0x28d0(%rip), %rsi      # 0x588b
leaq 0x3228(%rip), %rcx      # 0x61ea
movl $0x207, %edx            # imm = 0x207
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: string_add
string_t *string_add(eweb_os_t *w, string_t * s, const char *char_array) {
	assert(s);
	assert(char_array);
	s->used_bytes--;
	if (badd(w, s, char_array, strlen(char_array) + 1) != EWEB_OK)
		return NULL;
	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x3013
movq %rdx, %r14
testq %rdx, %rdx
je 0x3032
movq %rsi, %rbx
movq %rdi, %r15
decq 0x10(%rsi)
movq %r14, %rdi
callq 0x20b0
leaq 0x1(%rax), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x42db
xorl %ecx, %ecx
testl %eax, %eax
cmoveq %rbx, %rcx
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3362(%rip), %rdi      # 0x637c
leaq 0x286a(%rip), %rsi      # 0x588b
leaq 0x308b(%rip), %rcx      # 0x60b3
movl $0x241, %edx            # imm = 0x241
callq 0x20e0
leaq 0x30b6(%rip), %rdi      # 0x60ef
leaq 0x284b(%rip), %rsi      # 0x588b
leaq 0x306c(%rip), %rcx      # 0x60b3
movl $0x242, %edx            # imm = 0x242
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_write_html
int eweb_write_html(eweb_os_t *w, const int socket_fd, const char *head, const char *html) {
	assert(w);
	assert(head);
	assert(html);
	const long r = eweb_write_header(w, socket_fd, head, strlen(html));
	if (r != EWEB_OK)
		return r;
	const long wlen = strlen(html);
	return w->write(w, socket_fd, html, wlen) == wlen ? EWEB_OK : EWEB_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3154
movq %rdx, %r15
testq %rdx, %rdx
je 0x3173
movq %rcx, %rbx
testq %rcx, %rcx
je 0x3192
movl %esi, %ebp
movq %rdi, %r14
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %rax, %rcx
callq 0x2d8c
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x3149
movq %rbx, %rdi
callq 0x20b0
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq *0x30(%r14)
movq %rax, %rcx
xorl %eax, %eax
cmpq %r15, %rcx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23d2(%rip), %rdi      # 0x552d
leaq 0x2729(%rip), %rsi      # 0x588b
leaq 0x278b(%rip), %rcx      # 0x58f4
movl $0x9b, %edx
callq 0x20e0
leaq 0x275a(%rip), %rdi      # 0x58d4
leaq 0x270a(%rip), %rsi      # 0x588b
leaq 0x276c(%rip), %rcx      # 0x58f4
movl $0x9c, %edx
callq 0x20e0
leaq 0x23fd(%rip), %rdi      # 0x5596
leaq 0x26eb(%rip), %rsi      # 0x588b
leaq 0x274d(%rip), %rcx      # 0x58f4
movl $0x9d, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_forbidden_403
int eweb_forbidden_403(eweb_os_t *w, eweb_os_hit_args_t *args, const char *info) {
	assert(args);
	assert(info);
	const int r = eweb_write_html(w, args->socketfd,
		"HTTP/1.1 403 Forbidden\nServer: eweb\nConnection: close\nContent-Type: text/html",
		"<!DOCTYPE html>\n"
		"<html><head>\n<title>403 Forbidden</title>\n"
		"</head><body>\n<h1>Forbidden</h1>\nThe requested URL, file type or operation is not allowed.\n</body>"
		"</html>");
	w->log(w, EWEB_OK, "403 FORBIDDEN: %s/%d", info, args->socketfd);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x3208
movq %rdx, %r14
testq %rdx, %rdx
je 0x3227
movq %rsi, %r15
movq %rdi, %rbx
movl 0x40(%rsi), %esi
leaq 0x27b9(%rip), %rdx      # 0x598e
leaq 0x2800(%rip), %rcx      # 0x59dc
callq 0x30d8
movl %eax, %ebp
movl 0x40(%r15), %r8d
leaq 0x2892(%rip), %rdx      # 0x5a80
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
xorl %eax, %eax
callq *0x50(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x272d(%rip), %rdi      # 0x593c
leaq 0x2675(%rip), %rsi      # 0x588b
leaq 0x2724(%rip), %rcx      # 0x5941
movl $0xa6, %edx
callq 0x20e0
leaq 0x275b(%rip), %rdi      # 0x5989
leaq 0x2656(%rip), %rsi      # 0x588b
leaq 0x2705(%rip), %rcx      # 0x5941
movl $0xa7, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_not_found_404
int eweb_not_found_404(eweb_os_t *w, eweb_os_hit_args_t *args, const char *info) {
	assert(args);
	assert(info);
	const int r = eweb_write_html(w, args->socketfd,
		"HTTP/1.1 404 Not Found\nServer: eweb\nConnection: close\nContent-Type: text/html",
		"<!DOCTYPE html>\n"
		"<html><head>\n<title>404 Not Found</title>\n"
		"</head><body>\n<h1>Not Found</h1>\nThe requested URL was not found on this server.\n</body></html>");
	w->log(w, EWEB_OK, "404 NOT FOUND: %s/%d", info, args->socketfd);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x329d
movq %rdx, %r14
testq %rdx, %rdx
je 0x32bc
movq %rsi, %r15
movq %rdi, %rbx
movl 0x40(%rsi), %esi
leaq 0x2873(%rip), %rdx      # 0x5add
leaq 0x28ba(%rip), %rcx      # 0x5b2b
callq 0x30d8
movl %eax, %ebp
movl 0x40(%r15), %r8d
leaq 0x2942(%rip), %rdx      # 0x5bc5
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
xorl %eax, %eax
callq *0x50(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2698(%rip), %rdi      # 0x593c
leaq 0x25e0(%rip), %rsi      # 0x588b
leaq 0x27e3(%rip), %rcx      # 0x5a95
movl $0xb3, %edx
callq 0x20e0
leaq 0x26c6(%rip), %rdi      # 0x5989
leaq 0x25c1(%rip), %rsi      # 0x588b
leaq 0x27c4(%rip), %rcx      # 0x5a95
movl $0xb4, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_ok_200
int eweb_ok_200(eweb_os_t *w, eweb_os_hit_args_t *args, const char *custom_headers, const char *html, const char *path) {
	assert(w);
	string_t *headers = string_new(w, 255);
	if (!headers)
		goto fail;
	if (!string_add(w, headers, "HTTP/1.1 200 OK\nServer: eweb\nCache-Control: no-cache\nPragma: no-cache"))
		goto fail;
	if (!custom_headers)
		if (!string_add(w, headers, custom_headers))
			goto fail;
	eweb_write_html(w, args->socketfd, string_chars(w, headers), html);
	string_free(w, headers);
	w->log(w, EWEB_OK, "200 OK: %s/%d", path, args->socketfd);
	return EWEB_OK;
fail:
	string_free(w, headers);
	w->log(w, EWEB_ERROR, "Failed to serve (200)");
	return EWEB_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x33d0
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %rbx
movl $0xff, %esi
callq 0x2f21
testq %rax, %rax
je 0x3350
movq %rax, %r15
decq 0x10(%rax)
leaq 0x291c(%rip), %rdx      # 0x5c37
movl $0x46, %ecx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x42db
testl %eax, %eax
je 0x336b
movq (%r15), %rsi
testq %rsi, %rsi
je 0x333e
movq 0x18(%rbx), %rdi
callq *0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq *0x10(%rbx)
leaq 0x2934(%rip), %rdx      # 0x5c8b
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq *0x50(%rbx)
jmp 0x33bf
testq %rbp, %rbp
je 0x33ef
movl 0x40(%r12), %esi
movq (%r15), %rdx
movq %rbx, %rdi
movq %r13, %rcx
callq 0x30d8
movq (%r15), %rsi
testq %rsi, %rsi
je 0x3392
movq 0x18(%rbx), %rdi
callq *0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq *0x10(%rbx)
movl 0x40(%r12), %r8d
leaq 0x28cd(%rip), %rdx      # 0x5c7d
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
xorl %eax, %eax
callq *0x50(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2156(%rip), %rdi      # 0x552d
leaq 0x24ad(%rip), %rsi      # 0x588b
leaq 0x27f5(%rip), %rcx      # 0x5bda
movl $0xbf, %edx
callq 0x20e0
leaq 0x2cf9(%rip), %rdi      # 0x60ef
leaq 0x248e(%rip), %rsi      # 0x588b
leaq 0x2caf(%rip), %rcx      # 0x60b3
movl $0x242, %edx            # imm = 0x242
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_get_header
eweb_http_header_t eweb_get_header(const char *name, const char *request, const long max_len) {
	assert(name);
	assert(request);
	eweb_http_header_t retval = { .name = { 0 } };
	size_t x = 0;
	char *ptr = strstr(request, name);
	char * const end = ptr + max_len;
	strncpy(retval.name, name, sizeof(retval.name) - 1);
	retval.name[sizeof(retval.name) - 1] = 0;

	if (!ptr) {
		retval.value[0] = 0;
		return retval;
	}

	while (*ptr++ != ':' && ptr <= end) ; // !?
	while (isblank(*++ptr) && ptr <= end) ; // !?
	while (x < (sizeof(retval.value) - 1)/*!!*/ && *ptr != '\r' && *ptr != '\n' && ptr <= end)
		retval.value[x++] = *ptr++;
	retval.value[x] = 0;
	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x34e7
movq %rdx, %r12
testq %rdx, %rdx
je 0x3506
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
addq $0x32, %rdi
movl $0xff, %edx
xorl %esi, %esi
callq 0x2100
movq %r12, %rdi
movq %r15, %rsi
callq 0x2300
movq %rax, %r12
movl $0x31, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2060
movb $0x0, 0x31(%rbx)
testq %r12, %r12
je 0x34d8
addq %r12, %r14
incq %r12
leaq 0x1(%r12), %r15
cmpb $0x3a, -0x1(%r12)
je 0x3486
cmpq %r14, %r12
movq %r15, %r12
jbe 0x3471
callq 0x2320
movq (%rax), %rcx
movsbq (%r15), %rdx
leaq 0x1(%r15), %rax
testb $0x1, (%rcx,%rdx,2)
je 0x34a4
cmpq %r14, %r15
movq %rax, %r15
jbe 0x348e
decq %rax
xorl %ecx, %ecx
movzbl (%rax), %edx
cmpl $0xa, %edx
je 0x34d3
cmpl $0xd, %edx
je 0x34d3
cmpq %r14, %rax
ja 0x34d3
incq %rax
movb %dl, 0x32(%rbx,%rcx)
incq %rcx
cmpq $0xfe, %rcx
jne 0x34a9
movl $0xfe, %ecx
movb $0x0, 0x32(%rbx,%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x27b3(%rip), %rdi      # 0x5ca1
leaq 0x2396(%rip), %rsi      # 0x588b
leaq 0x27aa(%rip), %rcx      # 0x5ca6
movl $0xd3, %edx
callq 0x20e0
leaq 0x20b4(%rip), %rdi      # 0x55c1
leaq 0x2377(%rip), %rsi      # 0x588b
leaq 0x278b(%rip), %rcx      # 0x5ca6
movl $0xd4, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_get_body_start
static long eweb_get_body_start(const char *request) { /* return the starting index of the request body, or end of the HTTP headers */
	assert(request);
	const char *ptr = strstr(request, "\r\n\r\n"); // !!
	return !ptr ? -1 : (ptr + 4) - request;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x39f0
movq %rdi, %rbx
leaq 0x1f1f(%rip), %rsi      # 0x58ef
callq 0x2300
movq %rax, %rdx
subq %rbx, %rdx
addq $0x4, %rdx
xorl %ecx, %ecx
cmpq $0x1, %rax
sbbq %rcx, %rcx
orq %rdx, %rcx
movq %rcx, %rax
popq %rbx
retq
leaq 0x1bca(%rip), %rdi      # 0x55c1
leaq 0x1e8d(%rip), %rsi      # 0x588b
leaq 0x2721(%rip), %rcx      # 0x6126
movl $0xea, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_finish_hit
static int eweb_finish_hit(eweb_os_t *w, eweb_os_hit_args_t *args, int exit_code) {
	assert(args);
	UNUSED(exit_code);
	w->close(w, args->socketfd);
	string_free(w, args->buffer);
	eweb_free(w, args->headers);
	eweb_clear_form_values(w, args);
	eweb_free(w, args->content_type);
	eweb_free(w, args);
	w->thread_exit(w, exit_code);
	return EWEB_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl 0x40(%rsi), %esi
callq *0x40(%rdi)
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x307a
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x418f
movq %r14, %rdi
movq %r15, %rsi
callq 0x439a
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x418f
movq %r14, %rdi
movq %r15, %rsi
callq 0x418f
movq 0x78(%r14), %rax
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_malloc_or_die
void *eweb_malloc_or_die(eweb_os_t *w, size_t num_bytes) {
	assert(w);
	assert(!(w->allocation_error));
	void *mem = w->allocator.malloc(w->allocator.arena, num_bytes);
	if (!mem) {
		w->allocation_error = 1;
		w->log(w, EWEB_ERROR, "malloc of %zu bytes failed", num_bytes);
		w->exit(w, 1);
	}
	return mem;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x3ac5
movq %rdi, %rbx
testb $0x1, 0x98(%rdi)
jne 0x3ae4
movq %rsi, %r14
movq 0x18(%rbx), %rdi
callq *(%rbx)
movq %rax, %r15
testq %rax, %rax
jne 0x3abc
orb $0x1, 0x98(%rbx)
leaq 0x24f4(%rip), %rdx      # 0x5f95
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rcx
xorl %eax, %eax
callq *0x50(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq *0x58(%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1a61(%rip), %rdi      # 0x552d
leaq 0x1db8(%rip), %rsi      # 0x588b
leaq 0x2476(%rip), %rcx      # 0x5f50
movl $0x1db, %edx            # imm = 0x1DB
callq 0x20e0
leaq 0x2493(%rip), %rdi      # 0x5f7e
leaq 0x1d99(%rip), %rsi      # 0x588b
leaq 0x2457(%rip), %rcx      # 0x5f50
movl $0x1dc, %edx            # imm = 0x1DC
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_server
int eweb_server(eweb_os_t *w, unsigned port, responder_cb_t responder_func) {
	assert(w);
	if (w->init(w) < 0)
		return w->log(w, EWEB_ERROR, "initialization failed");

	if (!port) {
		port = 8080;
		w->log(w->file, EWEB_OK, "using default port (%u)", port);
	}

	w->log(w, EWEB_OK, "eweb server initialized (port = %u), (mode = %u)", port, w->threading_mode);

	const int listenfd = w->open(w, port);
	if (listenfd < 0)
		return w->log(w, EWEB_ERROR, "open failed");

	for (unsigned long hit = 1;;hit++) {
		const int socketfd = w->accept(w, listenfd);
		if (socketfd < 0) {
			/*if (!doing_shutdown) */
			w->log(w, EWEB_ERROR, "accept failed");
			continue;
		}

		eweb_os_hit_args_t *args = eweb_calloc_or_die(w, 1, sizeof(struct eweb_os_hit_args));
		if (!args) {
			w->close(w, socketfd);
			goto fail;
		}
		args->hit = hit;
		args->socketfd = socketfd;
		args->listenfd = listenfd;
		args->responder_function = responder_func;
		args->w = w;

		/* !! Who cleans up on failure? */
		const long rval = w->thread_new(w, args);
		if (rval != EWEB_OK) {
			w->log(w, EWEB_ERROR, "thread new failed");
			continue;
		}
	}
	return EWEB_OK;
fail:
	w->close(w, listenfd);
	return EWEB_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3f2b
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq *0x60(%rdi)
testq %rax, %rax
js 0x3eff
testl %ebp, %ebp
jne 0x3e3f
movq 0x88(%rbx), %rdi
leaq 0x2015(%rip), %rdx      # 0x5e43
movl $0x1f90, %ebp           # imm = 0x1F90
xorl %esi, %esi
movl $0x1f90, %ecx           # imm = 0x1F90
xorl %eax, %eax
callq *0x50(%rbx)
movl 0x98(%rbx), %r8d
shrl %r8d
andl $0x3, %r8d
leaq 0x2007(%rip), %rdx      # 0x5e5b
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %ecx
xorl %eax, %eax
callq *0x50(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq *0x20(%rbx)
movq %rax, %r15
testl %r15d, %r15d
js 0x3f08
movl $0x1, %r13d
leaq 0x2017(%rip), %rbp      # 0x5e98
movq %rbx, %rdi
movl %r15d, %esi
callq *0x28(%rbx)
movq %rax, %r12
movq %rbp, %rdx
testl %r12d, %r12d
js 0x3ed4
movl $0x1, %esi
movl $0x50, %edx
movq %rbx, %rdi
callq 0x3f4a
testq %rax, %rax
je 0x3ee6
movq %r13, 0x38(%rax)
movl %r12d, 0x40(%rax)
movl %r15d, 0x44(%rax)
movq %r14, (%rax)
movq %rbx, 0x48(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq *0x70(%rbx)
leaq 0x1fd7(%rip), %rdx      # 0x5ea6
testq %rax, %rax
je 0x3ee1
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq *0x50(%rbx)
incq %r13
jmp 0x3e81
movq %rbx, %rdi
movl %r12d, %esi
callq *0x40(%rbx)
movq %rbx, %rdi
movl %r15d, %esi
callq *0x40(%rbx)
movl $0x1, %eax
jmp 0x3f1c
leaq 0x1f27(%rip), %rdx      # 0x5e2d
jmp 0x3f0f
leaq 0x1f7d(%rip), %rdx      # 0x5e8c
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq *0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15fb(%rip), %rdi      # 0x552d
leaq 0x1952(%rip), %rsi      # 0x588b
leaq 0x1eb2(%rip), %rcx      # 0x5df2
movl $0x170, %edx            # imm = 0x170
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_calloc_or_die
void *eweb_calloc_or_die(eweb_os_t *w, const size_t num, const size_t size) {
	assert(w);
	assert(!(w->allocation_error));
	void *mem = w->allocator.malloc(w->allocator.arena, num * size); /**@todo check for overflow! */
	if (!mem) {
		w->allocation_error = 1;
		w->log(w, EWEB_ERROR, "calloc failed [%zu x %zu] bytes", num, size);
		w->exit(w, 1);
	}
	memset(mem, 0, num * size);
	return mem;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x3fc4
movq %rdi, %rbx
testb $0x1, 0x98(%rdi)
jne 0x3fe3
movq %rdx, %r15
movq %rsi, %r12
movq 0x18(%rbx), %rdi
movq %rdx, %r14
imulq %rsi, %r14
movq %r14, %rsi
callq *(%rbx)
movq %rax, %r13
testq %rax, %rax
jne 0x3fae
orb $0x1, 0x98(%rbx)
leaq 0x20b5(%rip), %rdx      # 0x6045
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rcx
movq %r15, %r8
xorl %eax, %eax
callq *0x50(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq *0x58(%rbx)
movq %r13, %rdi
xorl %esi, %esi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2100
leaq 0x1562(%rip), %rdi      # 0x552d
leaq 0x18b9(%rip), %rsi      # 0x588b
leaq 0x202a(%rip), %rcx      # 0x6003
movl $0x1f3, %edx            # imm = 0x1F3
callq 0x20e0
leaq 0x1f94(%rip), %rdi      # 0x5f7e
leaq 0x189a(%rip), %rsi      # 0x588b
leaq 0x200b(%rip), %rcx      # 0x6003
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_url_decode
int eweb_url_decode(eweb_os_t *w, char *s) {
	assert(s);
	const size_t len = strlen(s);
	char *s_copy = eweb_calloc_or_die(w, 1, len + 1);
	if (!s_copy)
		return EWEB_ERROR;
	char *ptr = s_copy;

	for (size_t i = 0; i < len; i++) {
		if (s[i] == '+') {
			*ptr++ = ' ';
		} else if ((s[i] != '%') || (!isxdigit(s[i + 1]) || !isxdigit(s[i + 2]))) {
			*ptr++ = s[i];
		} else {
			*ptr++ = ((eweb_decode_char(s[i + 1]) << 4) | eweb_decode_char(s[i + 2]));
			i += 2;
		}
	}
	*ptr = 0;
	memcpy(s, s_copy, len + 1);
	eweb_free(w, s_copy);
	return EWEB_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
je 0x412b
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20b0
movq %rax, %r13
leaq 0x1(%rax), %r15
movl $0x1, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3f4a
testq %rax, %rax
je 0x4117
movq %r15, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %rax, (%rsp)
movq %rax, %rbp
testq %r13, %r13
je 0x40e7
xorl %r12d, %r12d
movq (%rsp), %rbp
movzbl (%r14,%r12), %ebx
cmpl $0x2b, %ebx
je 0x40d7
cmpl $0x25, %ebx
jne 0x40d9
callq 0x2320
movq (%rax), %rax
movsbq 0x1(%r14,%r12), %r15
testb $0x10, 0x1(%rax,%r15,2)
je 0x40d9
movsbq 0x2(%r14,%r12), %rcx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x40d9
addq $0x2, %r12
movq %rcx, %rbx
callq 0x2310
movq (%rax), %rax
movl (%rax,%r15,4), %ecx
xorl %edx, %edx
cmpb $0x3a, %cl
setge %dl
leal (%rdx,%rdx,8), %edx
addl %ecx, %edx
shlb $0x4, %dl
movl (%rax,%rbx,4), %eax
leal 0xa9(%rax), %ecx
movl %eax, %ebx
addl $0xd0, %ebx
cmpb $0x3a, %al
cmovgel %ecx, %ebx
orb %dl, %bl
jmp 0x40d9
movb $0x20, %bl
movb %bl, (%rbp)
incq %rbp
incq %r12
cmpq %r13, %r12
jb 0x4068
movb $0x0, (%rbp)
movq %r14, %rdi
movq (%rsp), %rbx
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
callq 0x21b0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x414a
movq 0x18(%rax), %rdi
movq %rbx, %rsi
callq *0x10(%rax)
xorl %eax, %eax
jmp 0x411c
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x224a(%rip), %rdi      # 0x637c
leaq 0x1752(%rip), %rsi      # 0x588b
leaq 0x1d78(%rip), %rcx      # 0x5eb8
movl $0x1a2, %edx            # imm = 0x1A2
callq 0x20e0
leaq 0x13dc(%rip), %rdi      # 0x552d
leaq 0x1733(%rip), %rsi      # 0x588b
leaq 0x1f06(%rip), %rcx      # 0x6065
movl $0x200, %edx            # imm = 0x200
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_free
void eweb_free(eweb_os_t *w, void *ptr) {
	assert(w);
	if (!ptr)
		return;
	w->allocator.free(w->allocator.arena, ptr);
}

// Assembly:
testq %rdi, %rdi
je 0x41a4
testq %rsi, %rsi
je 0x41a3
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rdi
jmpq *%rax
retq
pushq %rax
leaq 0x1381(%rip), %rdi      # 0x552d
leaq 0x16d8(%rip), %rsi      # 0x588b
leaq 0x1eab(%rip), %rcx      # 0x6065
movl $0x200, %edx            # imm = 0x200
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_form_value
char *eweb_form_value(eweb_os_hit_args_t *args, const long i) {
	assert(args);
	if (i >= args->form_value_counter || i < 0)
		return NULL;
	return args->form_values[i].value;
}

// Assembly:
testq %rdi, %rdi
je 0x41e4
xorl %eax, %eax
testq %rsi, %rsi
js 0x41e3
cmpq %rsi, 0x30(%rdi)
jle 0x41e3
movq 0x20(%rdi), %rax
leaq (%rsi,%rsi,2), %rcx
movq 0x8(%rax,%rcx,8), %rax
retq
pushq %rax
leaq 0x1750(%rip), %rdi      # 0x593c
leaq 0x1698(%rip), %rsi      # 0x588b
leaq 0x1ce7(%rip), %rcx      # 0x5ee1
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_form_name
char *eweb_form_name(eweb_os_hit_args_t *args, const long i) {
	assert(args);
	if (i >= args->form_value_counter || i < 0)
		return NULL;
	return args->form_values[i].name;
}

// Assembly:
testq %rdi, %rdi
je 0x4223
xorl %eax, %eax
testq %rsi, %rsi
js 0x4222
cmpq %rsi, 0x30(%rdi)
jle 0x4222
movq 0x20(%rdi), %rax
leaq (%rsi,%rsi,2), %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
leaq 0x1711(%rip), %rdi      # 0x593c
leaq 0x1659(%rip), %rsi      # 0x588b
leaq 0x1ce0(%rip), %rcx      # 0x5f19
movl $0x1c6, %edx            # imm = 0x1C6
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_realloc_or_die
void *eweb_realloc_or_die(eweb_os_t *w, void *ptr, size_t num_bytes) {
	assert(w);
	assert(!(w->allocation_error));
	void *mem = w->allocator.realloc(w->allocator.arena, ptr, num_bytes);
	if (!mem) {
		w->allocation_error = 1;
		w->log(w, EWEB_ERROR, "realloc of %zu bytes failed", num_bytes);
		w->exit(w, 1);
	}
	return mem;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x429d
movq %rdi, %rbx
testb $0x1, 0x98(%rdi)
jne 0x42bc
movq %rdx, %r14
movq 0x18(%rbx), %rdi
callq *0x8(%rbx)
movq %rax, %r15
testq %rax, %rax
jne 0x4294
orb $0x1, 0x98(%rbx)
leaq 0x1d6e(%rip), %rdx      # 0x5fe7
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rcx
xorl %eax, %eax
callq *0x50(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq *0x58(%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1289(%rip), %rdi      # 0x552d
leaq 0x15e0(%rip), %rsi      # 0x588b
leaq 0x1cfe(%rip), %rcx      # 0x5fb0
movl $0x1e7, %edx            # imm = 0x1E7
callq 0x20e0
leaq 0x1cbb(%rip), %rdi      # 0x5f7e
leaq 0x15c1(%rip), %rsi      # 0x588b
leaq 0x1cdf(%rip), %rcx      # 0x5fb0
movl $0x1e8, %edx            # imm = 0x1E8
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: badd
static int badd(eweb_os_t *w, block_t *b, const void *data, const long len) {
	assert(b);
	assert(data);
	if ((b->alloc_bytes - b->used_bytes) < len) {
		while ((b->alloc_bytes - b->used_bytes) < len) // !?
			b->alloc_bytes += (b->chunk_size * b->elem_bytes);
		void *p = b->ptr;
		if (!(p = eweb_realloc_or_die(w, b->ptr, b->alloc_bytes)))
			return EWEB_ERROR;
		b->ptr = p;
	}
	memcpy((char*)b->ptr + b->used_bytes, data, len);
	b->used_bytes += len;
	memset((char*)b->ptr + b->used_bytes, 0, b->alloc_bytes - b->used_bytes);
	return EWEB_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
je 0x437b
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rax
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rdi
movq %rdx, %rcx
subq %rdi, %rcx
cmpq %rbx, %rcx
jge 0x433d
movq 0x18(%r14), %rcx
imulq 0x20(%r14), %rcx
negq %rdi
addq %rcx, %rdx
leaq (%rdi,%rdx), %rsi
cmpq %rbx, %rsi
jl 0x4314
movq %rdx, 0x8(%r14)
movq (%r14), %rsi
movq %rax, %rdi
callq 0x4243
testq %rax, %rax
je 0x4374
movq %rax, (%r14)
movq 0x10(%r14), %rdi
jmp 0x4340
movq (%r14), %rax
addq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x21b0
addq 0x10(%r14), %rbx
movq %rbx, 0x10(%r14)
movq (%r14), %rdi
addq %rbx, %rdi
movq 0x8(%r14), %rdx
subq %rbx, %rdx
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x2100
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x1, %ebx
jmp 0x436c
leaq 0x1edf(%rip), %rdi      # 0x6261
leaq 0x1502(%rip), %rsi      # 0x588b
leaq 0x1e96(%rip), %rcx      # 0x6226
movl $0x214, %edx            # imm = 0x214
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_clear_form_values
static int eweb_clear_form_values(eweb_os_t *w, eweb_os_hit_args_t *args) {
	assert(args);
	if (!args->form_values)
		return EWEB_OK;
	for (args->form_value_counter--; args->form_value_counter >= 0; args->form_value_counter--)
		eweb_free(w, args->form_values[args->form_value_counter].data);
	eweb_free(w, args->form_values);
	args->form_values = NULL;
	return EWEB_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x43f8
movq %rdi, %r14
movq 0x30(%rbx), %rcx
leaq -0x1(%rcx), %rax
movq %rax, 0x30(%rbx)
testq %rcx, %rcx
jle 0x43e8
movq 0x20(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq 0x10(%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x418f
movq 0x30(%rbx), %rcx
leaq -0x1(%rcx), %rax
movq %rax, 0x30(%rbx)
testq %rcx, %rcx
jg 0x43be
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x418f
movq $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/eweb.c
// Function: eweb_strtok
static char *eweb_strtok(char *restrict s, const char *restrict sep, char **restrict p) {
	if (!s && !(s = *p))
		return NULL;
	s += strspn(s, sep);
	if (!*s)
		return *p = 0;
	*p = s + strcspn(s, sep);
	if (**p)
		*(*p)++ = 0;
	else
		*p = 0;
	return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x4417
movq (%r14), %rbx
testq %rbx, %rbx
je 0x445a
leaq 0x1db8(%rip), %rsi      # 0x61d6
movq %rbx, %rdi
callq 0x2120
cmpb $0x0, (%rbx,%rax)
je 0x4453
addq %rax, %rbx
leaq 0x1da0(%rip), %rsi      # 0x61d6
movq %rbx, %rdi
callq 0x2140
cmpb $0x0, (%rbx,%rax)
je 0x445e
addq %rbx, %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r14)
movb $0x0, (%rax)
jmp 0x4465
movq $0x0, (%r14)
xorl %ebx, %ebx
jmp 0x4465
movq $0x0, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/unix.c
// Function: eweb_accept
static long eweb_accept(eweb_os_t *w, int listenfd) {
	assert(w);
	struct sockaddr_in cli_addr = { 0 };
	if (doing_shutdown)
		return -1;
	socklen_t length = sizeof(cli_addr);
	errno = 0;
	const int socketfd = accept(listenfd, (struct sockaddr *)&cli_addr, &length);
	if (socketfd < 0) {
		w->log(w, EWEB_ERROR, "accept failed: %s", strerror(errno));
		return socketfd;
	}

	struct timeval timeout = { .tv_sec = 60, .tv_usec = 0 };
	errno = 0;
	if (setsockopt(socketfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(struct timeval)) < 0) {
		w->log(w, EWEB_ERROR, "setsocketopt(SO_RCVTIMEO) failed: %s", strerror(errno));
		w->close(w, socketfd);
		return -1;
	}
	return socketfd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
testq %rdi, %rdi
je 0x472a
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $-0x1, %rax
cmpl $0x0, 0x4b62(%rip)      # 0x91b4
je 0x465f
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xc(%rsp), %r15
movl $0x10, (%r15)
callq 0x2050
movq %rax, %r14
movl $0x0, (%rax)
leaq 0x10(%rsp), %rsi
movl %ebp, %edi
movq %r15, %rdx
callq 0x2290
movl %eax, %ebp
testl %eax, %eax
js 0x46c8
movups 0x1ebe(%rip), %xmm0     # 0x6558
leaq 0x20(%rsp), %rcx
movaps %xmm0, (%rcx)
movl $0x0, (%r14)
movl %ebp, %edi
movl $0x1, %esi
movl $0x14, %edx
movl $0x10, %r8d
callq 0x2090
testl %eax, %eax
js 0x46f3
movl %ebp, %eax
jmp 0x4654
movq 0x50(%rbx), %r15
movl (%r14), %edi
callq 0x22d0
leaq 0x1c6c(%rip), %rdx      # 0x6347
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rcx
xorl %eax, %eax
callq *%r15
movslq %ebp, %rax
jmp 0x4654
movq 0x50(%rbx), %r15
movl (%r14), %edi
callq 0x22d0
leaq 0x1c53(%rip), %rdx      # 0x6359
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rcx
xorl %eax, %eax
callq *%r15
movq %rbx, %rdi
movl %ebp, %esi
callq *0x40(%rbx)
movq $-0x1, %rax
jmp 0x4654
leaq 0xdfc(%rip), %rdi       # 0x552d
leaq 0x1b40(%rip), %rsi      # 0x6278
leaq 0x1be5(%rip), %rcx      # 0x6324
movl $0x7b, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/unix.c
// Function: eweb_sleep
static long eweb_sleep(eweb_os_t *w, unsigned seconds) {
	assert(w);
	UNUSED(w);
	long i = seconds;
	while((i = sleep(i)));
	return EWEB_OK;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x47f9
movl %esi, %eax
movl %eax, %edi
callq 0x22e0
testl %eax, %eax
jne 0x47ea
xorl %eax, %eax
popq %rcx
retq
leaq 0xd2d(%rip), %rdi       # 0x552d
leaq 0x1a71(%rip), %rsi      # 0x6278
leaq 0x1bfb(%rip), %rcx      # 0x6409
movl $0xb5, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/unix.c
// Function: eweb_log
static long eweb_log(eweb_os_t *w, int error, const char *fmt, ...) {
	assert(w);
	FILE *output = w->file ? w->file : stderr;
	va_list ap;
	va_start(ap, fmt);
	fprintf(output, "%d: ", error);
	vfprintf(output, fmt, ap);
	fputc('\n', output);
	va_end(ap);
	fflush(output);
	return error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x4870
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)
testq %rdi, %rdi
je 0x4904
movq %rdx, %r14
movl %esi, %ebx
movq 0x88(%rdi), %r15
testq %r15, %r15
jne 0x4894
movq 0x475f(%rip), %rax      # 0x8ff0
movq (%rax), %r15
leaq 0x20(%rsp), %rax
movq %rsp, %r12
movq %rax, 0x10(%r12)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r12)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%r12)
leaq 0x1ba4(%rip), %rsi      # 0x6467
movq %r15, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2190
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2280
movl $0xa, %edi
movq %r15, %rsi
callq 0x2130
movq %r15, %rdi
callq 0x21e0
movslq %ebx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xc22(%rip), %rdi       # 0x552d
leaq 0x1966(%rip), %rsi      # 0x6278
leaq 0x1b1b(%rip), %rcx      # 0x6434
movl $0x2a, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/unix.c
// Function: eweb_init
static long eweb_init(eweb_os_t *w) {
	UNUSED(w);
#ifndef SIGCLD
	signal(SIGCHLD, SIG_IGN);
#else
	signal(SIGCLD, SIG_IGN);
#endif
	signal(SIGHUP,  SIG_IGN); /* ignore terminal hangups */
	signal(SIGPIPE, SIG_IGN); /* ignore broken pipes */
	return 0;
}

// Assembly:
pushq %rax
movl $0x1, %esi
movl $0x11, %edi
callq 0x2180
movl $0x1, %esi
movl $0x1, %edi
callq 0x2180
movl $0x1, %esi
movl $0xd, %edi
callq 0x2180
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/unix.c
// Function: eweb_thread_new
static long eweb_thread_new(eweb_os_t *w, eweb_os_hit_args_t *args) {
	assert(w);
	assert(args);
	if (w->threading_mode == EWEB_TM_SINGLE_THREAD_E) { /**@todo allow configurable mode selection */
		return eweb_hit(w, args);
	} else if (w->threading_mode == EWEB_TM_MULTI_PROCESS_E) {
		errno = 0;
		const int pid = fork();
		if (pid < 0)
			return w->log(w, EWEB_ERROR, "failed to fork(): %d", strerror(errno));
		if (pid == 0) { /* child */
			close(args->listenfd);
			return eweb_hit(w, args); /* never returns */
		}
		close(args->socketfd);
	} else if (w->threading_mode == EWEB_TM_MULTI_THREADS_E) {
		pthread_t thread_id; /** ??? */
		if (pthread_create(&thread_id, NULL, eweb_thread_main, args) != 0)
			return w->log(w, EWEB_ERROR, "failed to create thread");
	} else {
		w->log(w, EWEB_ERROR, "invalid threading MODE: %u", w->threading_mode);
		abort();
	}
	return EWEB_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x4a91
movq %rsi, %r14
testq %rsi, %rsi
je 0x4ab0
movq %rdi, %rbx
movl 0x98(%rdi), %eax
shrl %eax
andl $0x3, %eax
leaq 0x188c(%rip), %rcx      # 0x6268
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3525
cltq
jmp 0x4a4a
callq 0x2050
movq %rax, %r15
movl $0x0, (%rax)
callq 0x22f0
testl %eax, %eax
js 0x4a54
je 0x4a83
movl 0x40(%r14), %edi
callq 0x2110
jmp 0x4a48
leaq 0x1d2(%rip), %rdx       # 0x4bf1
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x2240
testl %eax, %eax
je 0x4a48
leaq 0x1abe(%rip), %rdx      # 0x64f7
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq *0x50(%rbx)
jmp 0x4a4a
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x50(%rbx), %r14
movl (%r15), %edi
callq 0x22d0
leaq 0x1a7b(%rip), %rdx      # 0x64e2
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rcx
xorl %eax, %eax
movq %r14, %r8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmpq *%r8
movl 0x44(%r14), %edi
callq 0x2110
jmp 0x49e5
leaq 0xa95(%rip), %rdi       # 0x552d
leaq 0x17d9(%rip), %rsi      # 0x6278
leaq 0x1a04(%rip), %rcx      # 0x64aa
movl $0xd2, %edx
callq 0x20e0
leaq 0xe85(%rip), %rdi       # 0x593c
leaq 0x17ba(%rip), %rsi      # 0x6278
leaq 0x19e5(%rip), %rcx      # 0x64aa
movl $0xd3, %edx
callq 0x20e0
leaq 0x1a39(%rip), %rdx      # 0x650f
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq *0x50(%rbx)
callq 0x2040
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/unix.c
// Function: eweb_thread_exit
static long eweb_thread_exit(eweb_os_t *w, int exit_code) {
	assert(w);
	UNUSED(w);
	if (w->threading_mode == EWEB_TM_MULTI_PROCESS_E) {
		w->exit(w, exit_code);
	} else if (w->threading_mode == EWEB_TM_MULTI_THREADS_E) {
		UNUSED(exit_code);
		pthread_exit(NULL);
	} else {
		UNUSED(exit_code);
	}
	return EWEB_OK;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x4b13
movl 0x98(%rdi), %eax
shrl %eax
andl $0x3, %eax
cmpl $0x2, %eax
je 0x4b0c
cmpl $0x3, %eax
jne 0x4b0f
xorl %edi, %edi
callq 0x21c0
callq *0x58(%rdi)
xorl %eax, %eax
popq %rcx
retq
leaq 0xa13(%rip), %rdi       # 0x552d
leaq 0x1757(%rip), %rsi      # 0x6278
leaq 0x1a02(%rip), %rcx      # 0x652a
movl $0xbd, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/unix.c
// Function: eweb_os_new
eweb_os_t *eweb_os_new(eweb_allocator_t *allocator, eweb_threading_mode_e mode) {
	eweb_os_t *w = NULL;
	const eweb_allocator_t *a = allocator ? allocator : &eweb_os_default_allocator;
	w = a->malloc(a->arena, sizeof(*w));
	if (!w)
		return w;
	memset(w, 0, sizeof(*w));
	*w = eweb_os;
	w->file = stderr;
	w->allocator = *a;
	switch (mode) {
	case EWEB_TM_SINGLE_THREAD_E: break;
	case EWEB_TM_MULTI_PROCESS_E: break;
	default: /* fall through */
	case EWEB_TM_MULTI_THREADS_E:
		mode = EWEB_TM_MULTI_THREADS_E;
		break;
	}
	w->threading_mode = mode;
	return w;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
testq %rdi, %rdi
leaq 0x426e(%rip), %r15      # 0x8dc0
cmovneq %rdi, %r15
movq 0x18(%r15), %rdi
movl $0xa0, %esi
callq *(%r15)
movq %rax, %r14
testq %rax, %rax
je 0x4bbe
leaq 0x41af(%rip), %rsi      # 0x8d20
movl $0xa0, %edx
movq %r14, %rdi
callq 0x21b0
movq 0x446b(%rip), %rax      # 0x8ff0
movq (%rax), %rax
movq %rax, 0x88(%r14)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
leal -0x1(%rbx), %eax
addb %bl, %bl
andb $0x6, %bl
cmpl $0x2, %eax
movzbl %bl, %eax
movl $0x6, %ecx
cmovbl %eax, %ecx
movb %cl, 0x98(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/howerj[P]eweb/unix.c
// Function: eweb_thread_main
static void *eweb_thread_main(void *targs) {
	eweb_os_hit_args_t *args = (struct eweb_os_hit_args *)targs;
	pthread_detach(pthread_self());
	eweb_hit(args->w, args);
	return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2250
movq %rax, %rdi
callq 0x21f0
movq 0x48(%rbx), %rdi
movq %rbx, %rsi
callq 0x3525
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/silverneko[P]miku/isolate/isolate.c
// Function: set_dir_action
static int set_dir_action(char *arg)
{
  arg = xstrdup(arg);

  char *colon = strchr(arg, ':');
  unsigned int flags = 0;
  while (colon)
    {
      *colon++ = 0;
      char *next = strchr(colon, ':');
      if (next)
	*next = 0;
      flags |= parse_dir_option(colon);
      colon = next;
    }

  char *eq = strchr(arg, '=');
  if (eq)
    {
      *eq++ = 0;
      return add_dir_rule(arg, (*eq ? eq : NULL), flags);
    }
  else
    {
      char *out = xmalloc(1 + strlen(arg) + 1);
      sprintf(out, "/%s", arg);
      return add_dir_rule(arg, out, flags);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x2490
testq %rax, %rax
je 0x2cc1
movq %rax, (%rsp)
movq %rax, %rdi
movl $0x3a, %esi
callq 0x21f0
testq %rax, %rax
je 0x2c36
movq %rax, %r15
xorl %r14d, %r14d
leaq 0x252a(%rip), %rbx      # 0x5108
movb $0x0, (%r15)
movq %r15, %r12
incq %r12
movq %r12, %rdi
movl $0x3a, %esi
callq 0x21f0
movq %rax, %r15
testq %rax, %rax
je 0x2c01
movb $0x0, (%r15)
movq %rbx, %r13
xorl %ebp, %ebp
movslq (%r13), %rsi
addq %rbx, %rsi
movq %r12, %rdi
callq 0x22f0
testl %eax, %eax
je 0x2c2b
incq %rbp
addq $0x4, %r13
cmpq $0x5, %rbp
jne 0x2c06
jmp 0x2cb0
btsl %ebp, %r14d
testq %r15, %r15
jne 0x2bde
jmp 0x2c39
xorl %r14d, %r14d
movq (%rsp), %rbx
movq %rbx, %rdi
movl $0x3d, %esi
callq 0x21f0
testq %rax, %rax
je 0x2c67
movq %rax, %rcx
incq %rcx
movb $0x0, (%rax)
xorl %esi, %esi
cmpb $0x0, 0x1(%rax)
cmovneq %rcx, %rsi
movq %rbx, %rdi
jmp 0x2c9a
movq %rbx, %rdi
callq 0x2180
leaq 0x2(%rax), %rdi
callq 0x2360
testq %rax, %rax
je 0x2cc1
movq %rax, %r15
leaq 0x28da(%rip), %rsi      # 0x5561
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2460
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a0e
leaq 0x26a6(%rip), %rdi      # 0x535d
movq %r12, %rsi
xorl %eax, %eax
callq 0x2d7f
leaq 0x2687(%rip), %rdi      # 0x534f
xorl %eax, %eax
callq 0x2d7f