LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: accepttv
void
accepttv(int fd, void *arg)
{
	TV *tv = arg;
	int c;
	TVcon *con;

	c = alloccon(tv);
	if(c < 0){
		/* Nothing free */
		setdpykbd(fd, -1, -1);
		close(fd);
		return;
	}
	con = &tv->cons[c];
	GUARD;
	con->dpy = dpykbdlist[c].dpy;
	con->kbd = dpykbdlist[c].kbd;
	con->fd = fd;
	nodelay(con->fd);
	tv->omap[con->dpy] = c;
	UNGUARD;
	setdpykbd(con->fd, con->dpy, con->kbd);
	printf("connected display %o\n", con->dpy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
leaq 0x808e0(%rsi), %r12
leaq 0x3957(%rip), %rbp      # 0x72f0
xorl %r13d, %r13d
cmpq $0x20, %r13
je 0x39bc
cmpl $0x0, (%r12)
jns 0x39af
cmpl $0x0, (%rbp)
jns 0x39dd
incq %r13
addq $0x8, %rbp
addq $0xc, %r12
jmp 0x399c
pushq $-0x1
popq %rdx
movl %ebx, %edi
movl %edx, %esi
callq 0x38f3
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2140
leaq 0x965cc(%rip), %r15     # 0x99fb0
movq %r15, %rdi
callq 0x2340
movq (%rbp), %rax
movq %rax, 0x4(%r12)
movl %ebx, (%r12)
movl %ebx, %edi
callq 0x6ec5
movslq 0x4(%r12), %rax
movl %r13d, 0x80a60(%r14,%rax,4)
movq %r15, %rdi
callq 0x21e0
movl (%r12), %edi
movl 0x4(%r12), %esi
movl 0x8(%r12), %edx
callq 0x38f3
movl 0x4(%r12), %esi
leaq 0xba1c(%rip), %rdi      # 0xf450
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: svc_tv
int
svc_tv(Bus *bus, void *dev)
{
	TV *tv = dev;
	word key, kbd;
	int ch;

	ch = (tv->kms&0100040) == 0100040 ? 5 : 0;
	if(!tv->km_haskey)
		return ch;
	pthread_mutex_lock(&kblock);
	tv->km_haskey = 0;
	key = tv->km_key;
	kbd = tv->km_kbd;
	pthread_cond_signal(&kbcond);
	pthread_mutex_unlock(&kblock);

	bus->addr = tv->kma_hi | tv->kma_lo;
	bus->data = key;
	dato_bus(bus);
	tv->kma_lo = tv->kma_lo+2 & 0177;
	bus->addr = tv->kma_hi | tv->kma_lo;
	bus->data = (kbd&077) << 8;
	dato_bus(bus);
	tv->kma_lo = tv->kma_lo+2 & 0177;
	tv->kms &= ~0200;	/* DMA done */
	tv->kms |= 0100000;	/* interrupt bit */
	ch = (tv->kms&0100040) == 0100040 ? 5 : 0;
	return ch;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpl $0x0, 0x808d8(%rsi)
je 0x3b14
movq %rdi, %r14
leaq 0x9656d(%rip), %r15     # 0x99fd8
movq %r15, %rdi
callq 0x2340
andl $0x0, 0x808d8(%rbx)
movzwl 0x808de(%rbx), %r12d
movl 0x808dc(%rbx), %ebp
leaq 0x96571(%rip), %rdi     # 0x9a000
callq 0x2180
movq %r15, %rdi
callq 0x21e0
movl 0x808d4(%rbx), %eax
orl 0x808d0(%rbx), %eax
movl %eax, 0x8(%r14)
movw %r12w, 0xc(%r14)
movq %r14, %rdi
callq 0x24be
movl 0x808d4(%rbx), %eax
addl $0x2, %eax
andl $0x7f, %eax
movl %eax, 0x808d4(%rbx)
orl 0x808d0(%rbx), %eax
movl %eax, 0x8(%r14)
andl $0x3f, %ebp
shll $0x8, %ebp
movw %bp, 0xc(%r14)
movq %r14, %rdi
callq 0x24be
movl 0x808d4(%rbx), %eax
addl $0x2, %eax
andl $0x7f, %eax
movl %eax, 0x808d4(%rbx)
movzwl 0x808cc(%rbx), %eax
andl $0x7f7f, %eax           # imm = 0x7F7F
orl $0x8000, %eax           # imm = 0x8000
movw %ax, 0x808cc(%rbx)
jmp 0x3b1b
movzwl 0x808cc(%rbx), %eax
notl %eax
xorl %ecx, %ecx
testw $0x8020, %ax            # imm = 0x8020
sete %cl
leal (%rcx,%rcx,4), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: servetv
void
servetv(TV *tv, int port)
{
	pthread_t th;
	struct Serveargs *sa;
	sa = malloc(sizeof(struct Serveargs));
	sa->tv = tv;
	sa->port = port;
	pthread_create(&th, nil, servetv_thread, sa);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x10
popq %rdi
callq 0x21f0
movq %r14, (%rax)
movl %ebx, 0x8(%rax)
leaq 0x15(%rip), %rdx        # 0x3e62
movq %rsp, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x2240
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/tv.c
// Function: closecon
static void
closecon(TV *tv, TVcon *con)
{
	printf("disconnect display %o\n", con->dpy);
	tv->omap[con->dpy] = -1;
	close(con->fd);
	con->fd = -1;
	con->dpy = -1;
	con->kbd = -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
leaq 0xb5e2(%rip), %rdi      # 0xf47a
xorl %eax, %eax
callq 0x20f0
movslq 0x4(%rbx), %rax
orl $-0x1, 0x80a60(%r14,%rax,4)
movl (%rbx), %edi
callq 0x2140
orq $-0x1, (%rbx)
orl $-0x1, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Liutos[P]Eloquent/main.c
// Function: main
int main(int argc, char *argv[])
{
    lexer_t *lexer = lexer_new(stdin);
    parser_t *parser = parser_new(lexer);
    interp_t *interp = interp_new();
    ast_t *ast = NULL;
    ast_kind_t kind = parser_getast(parser, &ast);
    while (kind != AST_INVALID) {
        if (kind == AST_END_OF_FILE)
            break;
        ast_print(ast, stdout);
        fprintf(stdout, "\n");

        value_t *value = NULL;
        interp_execute(interp, ast, &value);
        value_print(value, stdout);
        fprintf(stdout, "\n");
        kind = parser_getast(parser, &ast);
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x7d77(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
callq 0x5674
movq %rax, %rdi
callq 0x5030
movq %rax, %rbx
callq 0x3564
movq %rax, %r14
leaq 0x10(%rsp), %r15
andq $0x0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5046
movq 0x7d39(%rip), %r13      # 0x9fd0
pushq $0xa
popq %rbp
leaq 0x8(%rsp), %r12
testl %eax, %eax
je 0x22fd
cmpl $0x3, %eax
je 0x22fd
movq 0x10(%rsp), %rdi
movq (%r13), %rsi
callq 0x5516
movq (%r13), %rsi
movl %ebp, %edi
callq 0x20a0
andq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x3704
movq 0x8(%rsp), %rdi
movq (%r13), %rsi
callq 0x252a
movq (%r13), %rsi
movl %ebp, %edi
callq 0x20a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5046
jmp 0x229f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: parser_data_init
void parser_data_init(struct parser_data* data, const char* client_address) {
  data->url        = buffer_new();
  data->client_address = strdup(client_address);
  data->headers    = new_map();
  map_set_free_func(data->headers, free);
  data->header.key = buffer_new();
  data->header.val = buffer_new();
  data->complete = 0;

  // Log the current time
  time_t rawtime;
  time(&rawtime);
  gmtime_r(&rawtime, &data->timeinfo);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
callq 0x6110
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x22d0
movq %rax, 0x8(%rbx)
xorl %eax, %eax
callq 0x665c
movq %rax, 0x48(%rbx)
movq 0x8b62(%rip), %rsi      # 0xafc0
movq %rax, %rdi
callq 0x6682
xorl %eax, %eax
callq 0x6110
movq %rax, 0x50(%rbx)
xorl %eax, %eax
callq 0x6110
movq %rax, 0x58(%rbx)
andl $0x0, 0x60(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x21e0
addq $0x10, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2110
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: parser_data_destroy
void parser_data_destroy(struct parser_data* data) {
  buffer_free(data->url);
  free(data->client_address);
  destroy_map(&data->headers);
  buffer_free(data->header.key);
  buffer_free(data->header.val);
  memset(&data, 0, sizeof(data));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x6247
movq 0x8(%rbx), %rdi
callq 0x2320
leaq 0x48(%rbx), %rdi
callq 0x668c
movq 0x50(%rbx), %rdi
callq 0x6247
movq 0x58(%rbx), %rdi
popq %rbx
jmp 0x6247
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: remove_query_string
void remove_query_string(buffer_t **path) {
  const ssize_t pos = buffer_indexof(*path, "?");

  if (pos == -1) {
    return;
  }

  buffer_t *result = buffer_slice(*path, 0, pos);
  buffer_free(*path);
  *path = result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x4c38(%rip), %rsi      # 0x711c
callq 0x6518
cmpq $-0x1, %rax
je 0x250a
movq (%rbx), %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x6498
movq %rax, %r14
movq (%rbx), %rdi
callq 0x6247
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: open_connection
int open_connection(int port)
{
  const int create_socket = socket(AF_INET, SOCK_STREAM, 0);
  if (create_socket < 1) {
    perror("opening socket\n");
    exit(EXIT_FAILURE);
  }

  const int yes = 1;
  if (setsockopt(create_socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1) {
    perror("setsockopt");
    exit(EXIT_FAILURE);
  }

  struct sockaddr_in address;
  address.sin_family = AF_INET;
  address.sin_addr.s_addr = INADDR_ANY;
  address.sin_port = htons(port);

  const int bound = bind(create_socket, (struct sockaddr *)&address, sizeof(address));

  if (bound != 0) {
    fprintf(stderr, "Failed to bind to port %d", port);
    perror(" ");
    exit(EXIT_FAILURE);
  }

  return create_socket;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2310
testl %eax, %eax
jle 0x257d
movl %eax, %ebp
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x2090
cmpl $-0x1, %eax
je 0x2586
leaq 0x8(%rsp), %rsi
movw $0x2, (%rsi)
andl $0x0, 0x4(%rsi)
movl %ebx, %eax
rolw $0x8, %ax
movw %ax, 0x2(%rsi)
pushq $0x10
popq %rdx
movl %ebp, %edi
callq 0x2230
testl %eax, %eax
jne 0x258f
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq 0x4b9a(%rip), %rdi      # 0x711e
jmp 0x25b0
leaq 0x4ba1(%rip), %rdi      # 0x712e
jmp 0x25b0
movq 0x8a62(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4b99(%rip), %rsi      # 0x7139
movl %ebx, %edx
xorl %eax, %eax
callq 0x21a0
leaq 0x5d91(%rip), %rdi      # 0x8341
callq 0x2270
pushq $0x1
popq %rdi
callq 0x22b0
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: set_root
static void set_root(command_t *self) {
  struct options* options = self->data;
  options->root = realpath(self->arg, NULL);
  if (!options->root) {
    fprintf(stderr, "Cannot find directory %s", self->arg);
    exit(EXIT_FAILURE);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x10(%rdi), %rdi
xorl %esi, %esi
callq 0x21c0
movq %rax, (%r14)
testq %rax, %rax
je 0x2a65
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x858c(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq 0x10(%rbx), %rdx
leaq 0x4823(%rip), %rsi      # 0x729d
xorl %eax, %eax
callq 0x21a0
pushq $0x1
popq %rdi
callq 0x22b0
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: set_port
static void set_port(command_t *self) {
  struct options* options = self->data;
  char* endptr = 0;
  options->port = strtol(self->arg, &endptr, 10);
  if (*endptr) {
    fprintf(stderr, "Error: invalid port number: %s\n", self->arg);
    exit(EXIT_FAILURE);
  }

  if (options->port > USHRT_MAX) {
    fprintf(stderr, "Error: port number %ld is larger than the max %d\n",
        options->port,
        USHRT_MAX);
    exit(EXIT_FAILURE);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
movq 0x10(%rdi), %rdi
pushq $0xa
popq %rdx
movq %r14, %rsi
callq 0x21b0
movq %rax, 0x8(%r15)
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x2ace
cmpq $0x10000, %rax          # imm = 0x10000
jge 0x2aec
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x8523(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq 0x10(%rbx), %rdx
leaq 0x47d3(%rip), %rsi      # 0x72b6
xorl %eax, %eax
callq 0x21a0
jmp 0x2b0c
movq 0x8505(%rip), %rcx      # 0xaff8
movq (%rcx), %rdi
leaq 0x47d9(%rip), %rsi      # 0x72d6
movq %rax, %rdx
movl $0xffff, %ecx           # imm = 0xFFFF
xorl %eax, %eax
callq 0x21a0
pushq $0x1
popq %rdi
callq 0x22b0
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: on_header_field
static int on_header_field(http_parser * parser, const char *at, size_t len) {
  struct parser_data *data = parser->data;

  if (buffer_length(data->header.val) > 0) {
    map_set(data->headers,  strdup(data->header.key->data),
        strdup(data->header.val->data));
    buffer_clear(data->header.key);
    buffer_clear(data->header.val);
  }
  buffer_append_n(data->header.key, at, len);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq 0x18(%rdi), %r13
movq 0x58(%r13), %rdi
callq 0x623e
testq %rax, %rax
je 0x2b99
movq 0x48(%r13), %r15
movq 0x50(%r13), %rax
movq 0x10(%rax), %rdi
callq 0x22d0
movq %rax, %r12
movq 0x58(%r13), %rax
movq 0x10(%rax), %rdi
callq 0x22d0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x6779
movq 0x50(%r13), %rdi
callq 0x65d6
movq 0x58(%r13), %rdi
callq 0x65d6
movq 0x50(%r13), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x63c9
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: send_error
static void send_error(int socket, int status, const struct request* request) {
  buffer_t* buffer = buffer_new();
  buffer_appendf(buffer, "http error %d", status);

  int age = 0;

  buffer_t* headers = response_headers(buffer_length(buffer), age, request->time, request->uri);
  int header_bytes_written = write(socket, headers->data, buffer_length(headers));
  buffer_free(headers);

  if (header_bytes_written == -1) {
    fputs("Error -1 writting error headers to socket\n", stderr);
  }

  int written = write(socket, buffer->data, buffer_length(buffer));
  if (written == -1){
    fprintf(stderr, "Error -1 writing error message to socket");
  }
  buffer_free(buffer);
  log_request(status, request);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r15d
xorl %eax, %eax
callq 0x6110
movq %rax, %r14
leaq 0x4722(%rip), %rsi      # 0x7308
movq %rax, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x62a9
movq %r14, %rdi
callq 0x623e
movq (%rbx), %rdx
movq 0x20(%rbx), %rsi
movl %eax, %edi
callq 0x2cab
movq %rax, %r12
movq 0x10(%rax), %r13
movq %rax, %rdi
callq 0x623e
movl %r15d, %edi
movq %r13, %rsi
movq %rax, %rdx
callq 0x20a0
movq %rax, %r13
movq %r12, %rdi
callq 0x6247
cmpl $-0x1, %r13d
je 0x2c75
movq 0x10(%r14), %r12
movq %r14, %rdi
callq 0x623e
movl %r15d, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x20a0
cmpl $-0x1, %eax
je 0x2c8d
movq %r14, %rdi
callq 0x6247
movl %ebp, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2dfa
movq 0x837c(%rip), %rax      # 0xaff8
movq (%rax), %rsi
leaq 0x4690(%rip), %rdi      # 0x7316
callq 0x2130
jmp 0x2c36
movq 0x8364(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x46a3(%rip), %rdi      # 0x7341
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x22c0
jmp 0x2c55
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: response_headers
static buffer_t* response_headers(int length, int max_age, const struct tm *timeinfo, const char* uri)
{
  buffer_t *result = buffer_new();
  buffer_append(result, "HTTP/1.1 200 OK\r\n");

  char time_buffer[time_buffer_size];
  const size_t time_size = strftime(time_buffer, time_buffer_size, "%a, %d %h %Y %T %Z", timeinfo);

  if (time_size == 0) {
    fprintf(stderr, "Error formatting time");
    exit(EXIT_SUCCESS);
  }

  // Date: Sun, 07 Sep 2014 14: 51:17 GMT
  buffer_appendf(result, "Date: %s\r\n", time_buffer);

  // TODO:
  // Last-Modified: Sun, 07 Sep 2014 01: 37:26 GMT
  // Content-Type:image / gif

  max_age = 31536000;
  buffer_appendf(result, "cache-control: public, max-age=%d\r\n", max_age);

  // Content - Length:459211

  buffer_set_content_type(result, uri);

  buffer_appendf(result, "Content-Length: %d\r\n", length);
  buffer_append(result, "Access-Control-Allow-Methods: GET\r\n");
  buffer_append(result, "Access-Control-Allow-Origin: *\r\n");
  buffer_append(result, "Server: Garcon 1.0\r\n");
  buffer_append(result, "\r\n");

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
xorl %eax, %eax
callq 0x6110
movq %rax, %rbx
leaq 0x469a(%rip), %rsi      # 0x736a
movq %rax, %rdi
callq 0x63a2
leaq 0x469d(%rip), %rdx      # 0x737c
movq %rsp, %rdi
pushq $0x64
popq %rsi
movq %r15, %rcx
callq 0x2240
testq %rax, %rax
je 0x2dd7
leaq 0x46a8(%rip), %rsi      # 0x73a5
movq %rsp, %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x62a9
leaq 0x469f(%rip), %rsi      # 0x73b0
movq %rbx, %rdi
movl $0x1e13380, %edx        # imm = 0x1E13380
xorl %eax, %eax
callq 0x62a9
pushq $0x2e
popq %rsi
movq %r14, %rdi
callq 0x2100
testq %rax, %rax
je 0x2d78
movq %rax, %r14
incq %r14
xorl %ecx, %ecx
leaq 0x8461(%rip), %r15      # 0xb1a0
leaq 0x10(%rcx), %r12
cmpq $0x120, %r12            # imm = 0x120
je 0x2d78
movq (%rcx,%r15), %rsi
incq %rsi
movq %r14, %rdi
callq 0x2050
movq %r12, %rcx
testl %eax, %eax
jne 0x2d3f
movq -0x8(%r12,%r15), %rdx
leaq 0x46d5(%rip), %rsi      # 0x7443
movq %rbx, %rdi
xorl %eax, %eax
callq 0x62a9
leaq 0x4655(%rip), %rsi      # 0x73d4
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x62a9
leaq 0x4657(%rip), %rsi      # 0x73e9
movq %rbx, %rdi
callq 0x63a2
leaq 0x466c(%rip), %rsi      # 0x740d
movq %rbx, %rdi
callq 0x63a2
leaq 0x467e(%rip), %rsi      # 0x742e
movq %rbx, %rdi
callq 0x63a2
leaq 0x466c(%rip), %rsi      # 0x742b
movq %rbx, %rdi
callq 0x63a2
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x821a(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x45a7(%rip), %rdi      # 0x738f
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x22c0
xorl %edi, %edi
callq 0x22b0
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/garcon.c
// Function: log_request
static void log_request(int status, const struct request* request) {

  char time_buffer[time_buffer_size];
  const size_t time_size = strftime(time_buffer,
      time_buffer_size, "%FT%T%z", request->time);

  if (time_size == 0) {
    // TODO: use longjmp back to the main loop rather than quitting
    // the server
    fprintf(stderr, "Error formatting time");
    exit(EXIT_SUCCESS);
  }

  // Log request in Apache "Combined Log Format"
  // http://httpd.apache.org/docs/1.3/logs.html
  // <ip-address> <identd> <user> [<time>] "<request>" <status> <bytes> "<Referer>" "<User-agent>"
  // 123.65.150.10 - - [23/Aug/2010:03:50:59 +0000] "POST /wordpress3/wp-admin/admin-ajax.php HTTP/1.1" 200 2 "http://www.example.com/wordpress3/wp-admin/post-new.php" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.25 Safari/534.3"
  // 127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)"
  printf("%s - - [%s] %s %s %d \"%s\"\n",
      request->client_address,
      time_buffer,
      request->method,
      request->uri,
      status,
      request->user_agent);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq 0x20(%rsi), %rcx
leaq 0x4645(%rip), %rdx      # 0x7456
leaq 0x10(%rsp), %rdi
pushq $0x64
popq %rsi
callq 0x2240
testq %rax, %rax
je 0x2e54
movq 0x18(%r14), %rsi
movq 0x10(%r14), %rcx
movq (%r14), %r8
movq 0x8(%r14), %rax
movq %rax, (%rsp)
leaq 0x4621(%rip), %rdi      # 0x745e
leaq 0x10(%rsp), %rdx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x20f0
addq $0x78, %rsp
popq %rbx
popq %r14
retq
movq 0x819d(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x452a(%rip), %rdi      # 0x738f
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x22c0
xorl %edi, %edi
callq 0x22b0
nop
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_new_with_size
buffer_t *
buffer_new_with_size(size_t n) {
  buffer_t *self = malloc(sizeof(buffer_t));
  if (!self) return NULL;
  self->len = n;
  self->data = self->alloc = calloc(n + 1, 1);
  return self;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x21f0
movq %rax, %rbx
testq %rax, %rax
je 0x6148
movq %r14, (%rbx)
incq %r14
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2190
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_new_with_string_length
buffer_t *
buffer_new_with_string_length(char *str, size_t len) {
  buffer_t *self = malloc(sizeof(buffer_t));
  if (!self) return NULL;
  self->len = len;
  self->data = self->alloc = str;
  return self;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x21f0
testq %rax, %rax
je 0x618a
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq %rbx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_new_with_copy
buffer_t *
buffer_new_with_copy(char *str) {
  size_t len = strlen(str);
  buffer_t *self = buffer_new_with_size(len);
  if (!self) return NULL;
  memcpy(self->alloc, str, len);
  self->data = self->alloc;
  return self;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x20d0
movq %rax, %r14
movq %rax, %rdi
callq 0x6118
movq %rax, %r15
testq %rax, %rax
je 0x61cb
movq 0x8(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21d0
movq %r12, 0x10(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_compact
ssize_t
buffer_compact(buffer_t *self) {
  size_t len = buffer_length(self);
  size_t rem = self->len - len;
  char *buf = calloc(len + 1, 1);
  if (!buf) return -1;
  memcpy(buf, self->data, len);
  free(self->alloc);
  self->len = len;
  self->data = self->alloc = buf;
  return rem;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x623e
movq %rax, %r15
movq (%r14), %rbx
leaq 0x1(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x2190
testq %rax, %rax
je 0x622c
movq %rax, %r12
subq %r15, %rbx
movq 0x10(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x21d0
movq 0x8(%r14), %rdi
callq 0x2320
movq %r15, (%r14)
movq %r12, 0x8(%r14)
movq %r12, 0x10(%r14)
jmp 0x622f
pushq $-0x1
popq %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_resize
int
buffer_resize(buffer_t *self, size_t n) {
  n = nearest_multiple_of(1024, n);
  self->len = n;
  self->alloc = self->data = realloc(self->alloc, n + 1);
  if (!self->alloc) return -1;
  self->alloc[n] = '\0';
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x3ff, %rbx            # imm = 0x3FF
andq $-0x400, %rbx           # imm = 0xFC00
movq %rbx, (%rdi)
movq 0x8(%rdi), %rdi
leaq 0x1(%rbx), %rsi
callq 0x2220
movq %rax, 0x10(%r14)
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x629e
movb $0x0, (%rax,%rbx)
xorl %eax, %eax
jmp 0x62a1
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_appendf
int buffer_appendf(buffer_t *self, const char *format, ...) {
  va_list ap;
  va_list tmpa;
  char *dst = NULL;
  int length = 0;
  int required = 0;
  int bytes = 0;

  va_start(ap, format);

  length = buffer_length(self);

  // First, we compute how many bytes are needed
  // for the formatted string and allocate that
  // much more space in the buffer.
  va_copy(tmpa, ap);
  required = vsnprintf(NULL, 0, format, tmpa);
  va_end(tmpa);
  if (-1 == buffer_resize(self, length + required)) {
    va_end(ap);
    return -1;
  }

  // Next format the string into the space that we
  // have made room for.
  dst = self->data + length;
  bytes = vsnprintf(dst, 1 + required, format, ap);
  va_end(ap);

  return bytes < 0
    ? -1
    : 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x6313
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
leaq 0x120(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
callq 0x623e
movq %rax, %r15
movaps (%rsp), %xmm0
leaq 0x20(%rsp), %rcx
movaps %xmm0, (%rcx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rcx)
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2080
movl %eax, %r12d
leal (%r12,%r15), %eax
movslq %eax, %rsi
movq %r14, %rdi
callq 0x6261
cmpl $-0x1, %eax
je 0x6390
movslq %r15d, %rdi
addq 0x10(%r14), %rdi
incl %r12d
movslq %r12d, %rsi
movq %rsp, %rcx
movq %rbx, %rdx
callq 0x2080
sarl $0x1f, %eax
jmp 0x6393
pushq $-0x1
popq %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_append_n
int
buffer_append_n(buffer_t *self, const char *str, size_t len) {
  size_t prev = strlen(self->data);
  size_t needed = len + prev;

  // enough space
  if (self->len > needed) {
    strncat(self->data, str, len);
    return 0;
  }

  // resize
  int ret = buffer_resize(self, needed);
  if (-1 == ret) return -1;
  strncat(self->data, str, len);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %r12
movq %r12, %rdi
callq 0x20d0
addq %rbx, %rax
cmpq %rax, (%r15)
ja 0x6402
movq %r15, %rdi
movq %rax, %rsi
callq 0x6261
cmpl $-0x1, %eax
je 0x641e
movq 0x10(%r15), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2160
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $-0x1
popq %rax
jmp 0x6412
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_prepend
int
buffer_prepend(buffer_t *self, char *str) {
  size_t len = strlen(str);
  size_t prev = strlen(self->data);
  size_t needed = len + prev;

  // enough space
  if (self->len > needed) goto move;

  // resize
  int ret = buffer_resize(self, needed);
  if (-1 == ret) return -1;

  // move
  move:
  memmove(self->data + len, self->data, len + 1);
  memcpy(self->data, str, len);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20d0
movq %rax, %r15
movq 0x10(%r14), %r12
movq %r12, %rdi
callq 0x20d0
addq %r15, %rax
cmpq %rax, (%r14)
ja 0x6464
movq %r14, %rdi
movq %rax, %rsi
callq 0x6261
cmpl $-0x1, %eax
je 0x6493
movq 0x10(%r14), %r12
leaq (%r12,%r15), %rdi
movq %r15, %rdx
incq %rdx
movq %r12, %rsi
callq 0x2250
movq 0x10(%r14), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x21d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $-0x1
popq %rax
jmp 0x6487
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_slice
buffer_t *
buffer_slice(buffer_t *buf, size_t from, ssize_t to) {
  size_t len = strlen(buf->data);

  // bad range
  if (to < from) return NULL;

  // relative to end
  if (to < 0) to = len - ~to;

  // cap end
  if (to > len) to = len;

  size_t n = to - from;
  buffer_t *self = buffer_new_with_size(n);
  memcpy(self->data, buf->data + from, n);
  return self;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq %rsi, %rdx
jae 0x64aa
xorl %r15d, %r15d
jmp 0x64f0
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
callq 0x20d0
testq %r15, %r15
leaq 0x1(%r15,%rax), %r12
cmovnsq %r15, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
movq %r12, %rdi
callq 0x6118
movq %rax, %r15
movq 0x10(%rax), %rdi
addq 0x10(%r14), %rbx
movq %rbx, %rsi
movq %r12, %rdx
callq 0x21d0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_trim_right
void
buffer_trim_right(buffer_t *self) {
  int c;
  size_t i = buffer_length(self) - 1;
  while ((c = self->data[i]) && isspace(c)) {
    self->data[i--] = 0;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x623e
movq %rax, %r14
decq %r14
movq 0x10(%rbx), %r15
movsbq (%r15,%r14), %r12
testq %r12, %r12
je 0x65ac
callq 0x2300
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
je 0x65ac
movb $0x0, (%r15,%r14)
jmp 0x6584
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/buffer/buffer.c
// Function: buffer_print
void
buffer_print(buffer_t *self) {
  size_t len = self->len;

  printf("\n ");

  // hex
  for (int i = 0; i < len; ++i) {
    printf(" %02x", self->alloc[i]);
    if ((i + 1) % 8 == 0) printf("\n ");
  }

  printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
xorl %r12d, %r12d
subq %rax, %r12
leaq 0x1d40(%rip), %r14      # 0x8340
movq %r14, %rdi
xorl %eax, %eax
callq 0x20f0
pushq $0x1
popq %r13
leaq 0x1d2e(%rip), %r15      # 0x8343
leaq (%r12,%r13), %rax
cmpq $0x1, %rax
je 0x6648
movq 0x8(%rbx), %rax
movsbl -0x1(%rax,%r13), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x20f0
testb $0x7, %r13b
jne 0x6643
movq %r14, %rdi
xorl %eax, %eax
callq 0x20f0
incq %r13
jmp 0x6615
pushq $0xa
popq %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2040
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/cmap/map.c
// Function: destroy_map
void destroy_map(struct map_t** map)
{
    struct map_node_t* node;
    struct map_node_t* next_node;

    for (node = (*map)->head; node != NULL; node = next_node) {
        free(node->key);

        if ((*map)->free_func && node->value) {
            (*(*map)->free_func)(node->value);
        }

        next_node = node->next;
        free(node);
        node = NULL;
    }

    free(*map);
    *map = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x66cf
movq (%r14), %rdi
callq 0x2320
movq (%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x66be
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x66be
callq *%rax
movq 0x10(%r14), %r15
movq %r14, %rdi
callq 0x2320
movq %r15, %r14
jmp 0x669a
movq (%rbx), %rdi
callq 0x2320
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/cmap/map.c
// Function: map_find
static struct map_find_results_t map_find(struct map_t* map, const char* key)
{
    struct map_find_results_t results;

    results.prev_node = NULL;
    results.node = NULL;
    results.exact_match = 0;

    struct map_node_t* node;
    for (node = map->head; node != NULL; node = node->next) {
        int cmp = (*map->cmp_func)(key, node->key);

        if (cmp <= 0) {
            results.node = node;
            results.exact_match = (cmp == 0);
            return results;
        }

        results.prev_node = node;
    }

    return results;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
andw $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r12d, %r12d
movq %rsi, %rax
movq (%rax), %r13
testq %r13, %r13
je 0x6756
movq (%r13), %rsi
movq %r14, %rdi
callq *0x10(%r15)
testl %eax, %eax
jle 0x675b
leaq 0x10(%r13), %rax
movq %r13, %r12
jmp 0x6736
movq %r12, (%rbx)
jmp 0x676c
movq %r12, (%rbx)
movq %r13, 0x8(%rbx)
sete %al
movzbl %al, %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/cmap/map.c
// Function: map_set
int map_set(struct map_t* map, const char* key, void* value)
{
    const struct map_find_results_t find_result = map_find(map, key);

    // found node with same key
    if (find_result.exact_match) {
        if (map->free_func && find_result.node->value) {
            (*map->free_func)(find_result.node->value);
        }

        find_result.node->value = value;
        return 0;
    }

    // create the new node.
    struct map_node_t* new_node = new_map_node(key, value);

    if (!new_node) {
        return -1;
    }

    // empty list
    if (map->head == NULL) {
        map->head = new_node;
        map->size = 1;
        return 0;
    }

    // put the new node in the proper place
    struct map_node_t* node = find_result.node;
    struct map_node_t* prev_node = find_result.prev_node;

    new_node->next = node;

    if (prev_node) {
        prev_node->next = new_node;
    } else {
        map->head = new_node;
    }

    map->size++;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6713
cmpw $0x0, 0x10(%r15)
je 0x67d7
movq 0x18(%rbx), %rax
movq 0x10(%rsp), %rbx
testq %rax, %rax
je 0x67c2
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x67c2
callq *%rax
movq %r12, 0x8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x18
popq %rdi
callq 0x21f0
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x67c8
movq %rax, %r15
andq $0x0, 0x10(%rax)
movq %r12, 0x8(%rax)
movq %r14, %rdi
callq 0x20d0
leaq 0x1(%rax), %rdi
callq 0x21f0
movq %rax, (%r15)
testq %rax, %rax
je 0x683f
movq %rax, %rdi
movq %r14, %rsi
callq 0x2060
cmpq $0x0, (%rbx)
je 0x684c
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%r15)
leaq 0x10(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
movq %r15, (%rcx)
incq 0x8(%rbx)
jmp 0x67c6
movq %r15, %rdi
callq 0x2320
jmp 0x67c8
movq %r15, (%rbx)
movq $0x1, 0x8(%rbx)
jmp 0x67c6
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/cmap/map.c
// Function: map_del
void map_del(struct map_t* map, const char* key)
{
    struct map_find_results_t find_results = map_find(map, key);

    if (!find_results.exact_match) {
        return;
    }

    struct map_node_t* node = find_results.node;

    if (map->free_func && node->value) {
        (*map->free_func)(node->value);
    }

    if (node == map->head) {
        map->head = map->head->next;
    } else {
        find_results.prev_node->next = node->next;
    }

    free(node->key);
    free(node);

    map->size--;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6713
cmpw $0x0, 0x10(%r14)
je 0x68c9
movq 0x8(%rsp), %r14
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x6898
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x6898
callq *%rax
movq (%rbx), %rax
cmpq %rax, %r14
je 0x68ae
movq 0x10(%r14), %rax
movq (%rsp), %rcx
movq %rax, 0x10(%rcx)
jmp 0x68b5
movq 0x10(%rax), %rax
movq %rax, (%rbx)
movq (%r14), %rdi
callq 0x2320
movq %r14, %rdi
callq 0x2320
decq 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/commander/commander.c
// Function: command_help
void
command_help(command_t *self) {
  printf("\n");
  printf("  Usage: %s %s\n", self->name, self->usage);
  printf("\n");
  printf("  Options:\n");
  printf("\n");

  int i;
  for (i = 0; i < self->option_count; ++i) {
    command_option_t *option = &self->options[i];
    printf("    %s, %-25s %s\n"
      , option->small
      , option->large_with_arg
      , option->description);
  }

  printf("\n");
  command_free(self);
  exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0xa
popq %rbp
movl %ebp, %edi
callq 0x2040
movq 0x8(%rbx), %rdx
movq 0x18(%rbx), %rsi
leaq 0x1a4d(%rip), %rdi      # 0x8349
xorl %eax, %eax
callq 0x20f0
movl %ebp, %edi
callq 0x2040
leaq 0x1bbe(%rip), %rdi      # 0x84cf
callq 0x2070
movl %ebp, %edi
callq 0x2040
leaq 0x58(%rbx), %r15
leaq 0x1a31(%rip), %r14      # 0x8359
xorl %r12d, %r12d
movslq 0x28(%rbx), %rax
cmpq %rax, %r12
jge 0x6952
movq -0x10(%r15), %rsi
movq -0x8(%r15), %rdx
movq (%r15), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x20f0
incq %r12
addq $0x38, %r15
jmp 0x692b
pushq $0xa
popq %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x6969
xorl %edi, %edi
callq 0x22b0
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/commander/commander.c
// Function: command_free
void
command_free(command_t *self) {
  int i;

  for (i = 0; i < self->option_count; ++i) {
    command_option_t *option = &self->options[i];
    free(option->argname);
    free(option->large);
  }

  if (self->nargv) {
    for (i = 0; self->nargv[i]; ++i) {
      free(self->nargv[i]);
    }
    free(self->nargv);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
xorl %r15d, %r15d
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jge 0x699b
movq -0x8(%r14), %rdi
callq 0x2320
movq (%r14), %rdi
callq 0x2320
incq %r15
addq $0x38, %r14
jmp 0x6978
movq 0x838(%rbx), %rdi
testq %rdi, %rdi
je 0x69d2
xorl %r14d, %r14d
movq (%rdi,%r14), %rax
testq %rax, %rax
je 0x69c8
movq %rax, %rdi
callq 0x2320
movq 0x838(%rbx), %rdi
addq $0x8, %r14
jmp 0x69aa
popq %rbx
popq %r14
popq %r15
jmp 0x2320
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/commander/commander.c
// Function: command_init
void
command_init(command_t *self, const char *name, const char *version) {
  self->arg = NULL;
  self->name = name;
  self->version = version;
  self->option_count = self->argc = 0;
  self->usage = "[options]";
  self->nargv = NULL;
  command_option(self, "-V", "--version", "output program version", command_version);
  command_option(self, "-h", "--help", "output help information", command_help);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
andl $0x0, 0x730(%rdi)
andl $0x0, 0x28(%rdi)
leaq 0x1970(%rip), %rax      # 0x836b
movq %rax, 0x8(%rdi)
andq $0x0, 0x838(%rdi)
leaq 0x1967(%rip), %rsi      # 0x8375
leaq 0x1963(%rip), %rdx      # 0x8378
leaq 0x1966(%rip), %rcx      # 0x8382
leaq 0x19a(%rip), %r8        # 0x6bbd
callq 0x6a4d
leaq 0x196a(%rip), %rsi      # 0x8399
leaq 0x1966(%rip), %rdx      # 0x839c
leaq 0x1966(%rip), %rcx      # 0x83a3
leaq -0x16c(%rip), %r8       # 0x68d8
movq %rbx, %rdi
popq %rbx
jmp 0x6a4d
// File: /workspace/github_c_makefile_star2_O2/marcomorain[P]garcon/deps/commander/commander.c
// Function: command_option
void
command_option(command_t *self, const char *small, const char *large, const char *desc, command_callback_t cb) {
  if (self->option_count == COMMANDER_MAX_OPTIONS) {
    command_free(self);
    error("Maximum option definitions exceeded");
  }
  int n = self->option_count++;
  command_option_t *option = &self->options[n];
  option->cb = cb;
  option->small = small;
  option->description = desc;
  option->required_arg = option->optional_arg = 0;
  option->large_with_arg = large;
  option->argname = malloc(strlen(large) + 1);
  assert(option->argname);
  option->large = malloc(strlen(large) + 1);
  assert(option->large);
  parse_argname(large, option->large, option->argname);
  if ('[' == option->argname[0]) option->optional_arg = 1;
  if ('<' == option->argname[0]) option->required_arg = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movslq 0x28(%rdi), %rax
cmpq $0x20, %rax
je 0x6b6b
movq %rdx, %rbx
leal 0x1(%rax), %edx
movl %edx, 0x28(%r15)
imulq $0x38, %rax, %r12
movq %r8, 0x60(%r15,%r12)
movq %rsi, 0x48(%r15,%r12)
movq %rcx, 0x58(%r15,%r12)
andq $0x0, 0x30(%r15,%r12)
movq %rbx, 0x50(%r15,%r12)
movq %rbx, %rdi
callq 0x20d0
leaq 0x1(%rax), %rdi
callq 0x21f0
movq %rax, 0x38(%r15,%r12)
testq %rax, %rax
je 0x6b7f
movq %rax, %r14
addq %r15, %r12
addq $0x30, %r12
movq %rbx, %rdi
callq 0x20d0
leaq 0x1(%rax), %rdi
callq 0x21f0
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x6b9e
movq %rax, %r15
movq %rbx, %rdi
callq 0x20d0
xorl %ecx, %ecx
pushq $0x1
popq %rsi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %edi, %edi
cmpq %rdi, %rax
je 0x6b34
movb (%rbx,%rdi), %r9b
testl %r8d, %r8d
je 0x6b0d
leaq (%r14,%rdx), %r10
incq %rdx
movl %esi, %r8d
movb %r9b, (%r10)
incq %rdi
jmp 0x6aed
movzbl %r9b, %r8d
cmpl $0x20, %r8d
je 0x6b2f
cmpl $0x5b, %r8d
je 0x6afb
cmpl $0x3c, %r8d
je 0x6afb
leaq (%r15,%rcx), %r10
incq %rcx
xorl %r8d, %r8d
jmp 0x6b05
xorl %r8d, %r8d
jmp 0x6b08
xorl %eax, %eax
movb %al, (%r14,%rdx)
movb %al, (%r15,%rcx)
movzbl (%r14), %eax
cmpl $0x3c, %eax
je 0x6b56
cmpl $0x5b, %eax
jne 0x6b5f
movl $0x1, (%r12)
jmp 0x6b5f
movl $0x1, 0x4(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x6969
leaq 0x1841(%rip), %rdi      # 0x83bb
callq 0x6bd9
leaq 0x1859(%rip), %rdi      # 0x83df
leaq 0x1862(%rip), %rsi      # 0x83ef
leaq 0x1876(%rip), %rcx      # 0x840a
movl $0xb9, %edx
callq 0x2120
leaq 0x18c4(%rip), %rdi      # 0x8469
leaq 0x1843(%rip), %rsi      # 0x83ef
leaq 0x1857(%rip), %rcx      # 0x840a
movl $0xbb, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O2/ryo[P]shmqueue/shmclient.c
// Function: main
int
main(int argc, char *argv[])
{
	struct keyvalue kv;
	int ch, i, rc, nloop;
	int opt_d = 0, opt_t = 0;

	while ((ch = getopt(argc, argv, "dt")) != -1) {
		switch (ch) {
		case 'd':
			opt_d = 1;
			break;
		case 't':
			opt_t = 1;
			break;
		default:
			usage();
			return 1;
		}
	}
	argc -= optind;
	argv += optind;

	shmqueue = shmqueue_new(MEMID, 0, 1, 1);

	for (nloop = i = 0; i >= 0; i++, nloop++) {
#if 1
		char key[1024];
		char data[1024];

		sprintf(key, "%d", i);
		sprintf(data, "data of %d", i);

		rc = shmqueue_keyvalue_store(shmqueue, (uint8_t *)key, (uint8_t *)data, strlen(data));
		if (rc != 0) {
			if ((nloop & 0xffff) == 0)
				printf("���Ԥ���(%d)\n", i);
			i--;
			continue;
		}

		if ((i & 0xff) == 0)
			printf("��������(%d)\n", i);

		fflush(stdout);
#endif
	}

	(void)&rc;
	(void)&kv;
#if 0
	for (i = 0; i < 10000; i++) {
		rc = shmqueue_getoldest(shmqueue, &kv);
		printf("rc = %d\n", rc);
		fflush(stdout);

		if (rc == 0) {
			fprintf(stderr, "EXPIRE: key=<%s>, storage_size=%u, storage=<%s>\n",
			    KEYVALUE_KEY(&kv),
			    kv.kv_storagesize,
			    KEYVALUE_STORAGE(&kv));
		}
	}
#endif


	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x1e08(%rip), %r14      # 0x303d
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x10d0
cmpl $0x64, %eax
je 0x1235
cmpl $0x74, %eax
je 0x1235
cmpl $-0x1, %eax
jne 0x1312
pushq $0x1
popq %rcx
movl $0x186a0, %edi          # imm = 0x186A0
xorl %esi, %esi
movl %ecx, %edx
callq 0x1808
movq %rax, 0x3e33(%rip)      # 0x50a0
leaq 0x400(%rsp), %r14
leaq 0x1d88(%rip), %r15      # 0x3004
movq %rsp, %r12
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %r14, %rdi
leaq 0x1d7e(%rip), %rsi      # 0x300c
movl %r13d, %edx
xorl %eax, %eax
callq 0x1100
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x1100
movq 0x3df1(%rip), %rbp      # 0x50a0
movq %r12, %rdi
callq 0x1060
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0x1ff6
testl %eax, %eax
je 0x12e3
testw %bx, %bx
jne 0x130b
leaq 0x1d38(%rip), %rdi      # 0x300f
movl %r13d, %esi
xorl %eax, %eax
callq 0x1070
jmp 0x130b
testb %r13b, %r13b
jne 0x12f9
leaq 0x1d2e(%rip), %rdi      # 0x301d
movl %r13d, %esi
xorl %eax, %eax
callq 0x1070
movq 0x3ce0(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
callq 0x10b0
incl %r13d
incl %ebx
jmp 0x1284
callq 0x120c
pushq $0x1
popq %rax
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]dhara/tests/jfill.c
// Function: main
int main(void)
{
	for (int i = 0; i < 100; i++) {
		printf("--------------------------------"
		       "--------------------------------\n");
		printf("Seed: %d\n", i);
		srandom(i);
		test();
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x119f(%rip), %rbx      # 0x304e
leaq 0x114e(%rip), %r14      # 0x3004
xorl %ebp, %ebp
cmpl $0x64, %ebp
je 0x1ee1
movq %rbx, %rdi
callq 0x1060
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1070
movl %ebp, %edi
callq 0x1050
callq 0x1ee8
incl %ebp
jmp 0x1eb8
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]dhara/tests/jfill.c
// Function: test
static void test(void)
{
	struct dhara_journal journal;
	const size_t page_size = 1 << sim_nand.log2_page_size;
	uint8_t page_buf[page_size];
	int rep;

	sim_reset();
	sim_inject_bad(10);
	sim_inject_failed(10);

	printf("Journal init\n");
	dhara_journal_init(&journal, &sim_nand, page_buf);
	printf("    capacity: %d\n", dhara_journal_capacity(&journal));
	printf("\n");

	for (rep = 0; rep < 5; rep++) {
		int count;

		printf("Rep: %d\n", rep);

		printf("    enqueue until error...\n");
		count = jt_enqueue_sequence(&journal, 0, -1);
		printf("    enqueue count: %d\n", count);
		printf("    size: %d\n", dhara_journal_size(&journal));

		printf("    dequeue...\n");
		jt_dequeue_sequence(&journal, 0, count);
		printf("    size: %d\n", dhara_journal_size(&journal));

		/* Only way to recover space here... */
		journal.tail_sync = journal.tail;
	}

	printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x11d8(%rip), %r14      # 0x30d8
movb (%r14), %cl
pushq $0x1
popq %rax
shll %cl, %eax
movq %rsp, -0x30(%rbp)
cltq
addq $0xf, %rax
andq $-0x10, %rax
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
callq 0x2034
pushq $0xa
popq %r15
movl %r15d, %edi
callq 0x2491
movl %r15d, %edi
callq 0x24c8
leaq 0x1150(%rip), %rdi      # 0x308f
callq 0x1060
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x11dc
movq %rbx, %rdi
callq 0x165a
leaq 0x10a9(%rip), %rdi      # 0x300e
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movl %r15d, %edi
callq 0x1030
leaq 0x10c3(%rip), %r14      # 0x3040
leaq 0x1133(%rip), %r15      # 0x30b7
xorl %r12d, %r12d
cmpl $0x5, %r12d
je 0x2019
leaq 0x1088(%rip), %rdi      # 0x3020
movl %r12d, %esi
xorl %eax, %eax
callq 0x1070
leaq 0x10f3(%rip), %rdi      # 0x309c
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
pushq $-0x1
popq %rdx
callq 0x2914
movl %eax, %r13d
leaq 0x1064(%rip), %rdi      # 0x3029
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
callq 0x1681
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movq %r15, %rdi
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x2bce
movq %rbx, %rdi
callq 0x1681
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movl -0x48(%rbp), %eax
movl %eax, -0x4c(%rbp)
incl %r12d
jmp 0x1f87
pushq $0xa
popq %rdi
callq 0x1030
movq -0x30(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq