LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x63b0
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x22d0
movq %rax, 0x8(%rbx)
xorl %eax, %eax
callq 0x696c
movq %rax, 0x48(%rbx)
movq 0x9942(%rip), %rsi      # 0xbfc0
movq %rax, %rdi
callq 0x6997
xorl %eax, %eax
callq 0x63b0
movq %rax, 0x50(%rbx)
xorl %eax, %eax
callq 0x63b0
movq %rax, 0x58(%rbx)
movl $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_O3/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 0x6516
movq 0x8(%rbx), %rdi
callq 0x2320
leaq 0x48(%rbx), %rdi
callq 0x69a1
movq 0x50(%rbx), %rdi
callq 0x6516
movq 0x58(%rbx), %rdi
popq %rbx
jmp 0x6516
// File: /workspace/github_c_makefile_star2_O3/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 0x5a15(%rip), %rsi      # 0x811c
callq 0x67f3
cmpq $-0x1, %rax
je 0x272d
movq (%rbx), %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x6773
movq %rax, %r14
movq (%rbx), %rdi
callq 0x6516
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2310
testl %eax, %eax
jle 0x27af
movl %eax, %ebp
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x2090
cmpl $-0x1, %eax
je 0x27b4
leaq 0x8(%rsp), %rsi
movw $0x2, (%rsi)
movl $0x0, 0x4(%rsi)
movl %ebx, %eax
rolw $0x8, %ax
movw %ax, 0x2(%rsi)
movl %ebp, %edi
movl $0x10, %edx
callq 0x2230
testl %eax, %eax
jne 0x27b9
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
callq 0x2384
callq 0x236f
movl %ebx, %edi
callq 0x2340
// File: /workspace/github_c_makefile_star2_O3/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 0x2cd2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq $0x10, %rbx
movq %rbx, %rdi
callq 0x2399
// File: /workspace/github_c_makefile_star2_O3/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 0x650d
testq %rax, %rax
je 0x2dc1
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 0x6a49
movq 0x50(%r13), %rdi
callq 0x68de
movq 0x58(%r13), %rdi
callq 0x68de
movq 0x50(%r13), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x66a0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x63b0
movq %rax, %r14
leaq 0x54fa(%rip), %rsi      # 0x8308
movq %rax, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x657a
movq %r14, %rdi
callq 0x650d
movq (%rbx), %rdx
movq 0x20(%rbx), %rsi
movl %eax, %edi
callq 0x2eab
movq %rax, %r12
movq 0x10(%rax), %r13
movq %rax, %rdi
callq 0x650d
movl %r15d, %edi
movq %r13, %rsi
movq %rax, %rdx
callq 0x20a0
movq %rax, %r13
movq %r12, %rdi
callq 0x6516
cmpl $-0x1, %r13d
je 0x2e9d
movq 0x10(%r14), %r12
movq %r14, %rdi
callq 0x650d
movl %r15d, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x20a0
cmpl $-0x1, %eax
je 0x2ea4
movq %r14, %rdi
callq 0x6516
movl %ebp, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2fe3
callq 0x2410
jmp 0x2e5e
callq 0x2426
jmp 0x2e7d
// File: /workspace/github_c_makefile_star2_O3/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 0x63b0
movq %rax, %rbx
leaq 0x549a(%rip), %rsi      # 0x836a
movq %rax, %rdi
callq 0x6679
leaq 0x549d(%rip), %rdx      # 0x837c
movq %rsp, %rdi
movl $0x64, %esi
movq %r15, %rcx
callq 0x2240
testq %rax, %rax
je 0x2fde
leaq 0x54a6(%rip), %rsi      # 0x83a5
movq %rsp, %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x657a
leaq 0x549d(%rip), %rsi      # 0x83b0
movq %rbx, %rdi
movl $0x1e13380, %edx        # imm = 0x1E13380
xorl %eax, %eax
callq 0x657a
movq %r14, %rdi
movl $0x2e, %esi
callq 0x2100
testq %rax, %rax
je 0x2f7f
movq %rax, %r14
incq %r14
movl $0x8, %r15d
leaq 0x9259(%rip), %r12      # 0xc1a0
movq -0x8(%r15,%r12), %rsi
incq %rsi
movq %r14, %rdi
callq 0x2050
testl %eax, %eax
je 0x2f6a
addq $0x10, %r15
cmpq $0x118, %r15            # imm = 0x118
jne 0x2f47
jmp 0x2f7f
movq (%r15,%r12), %rdx
leaq 0x54ce(%rip), %rsi      # 0x8443
movq %rbx, %rdi
xorl %eax, %eax
callq 0x657a
leaq 0x544e(%rip), %rsi      # 0x83d4
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x657a
leaq 0x5450(%rip), %rsi      # 0x83e9
movq %rbx, %rdi
callq 0x6679
leaq 0x5465(%rip), %rsi      # 0x840d
movq %rbx, %rdi
callq 0x6679
leaq 0x5477(%rip), %rsi      # 0x842e
movq %rbx, %rdi
callq 0x6679
leaq 0x5465(%rip), %rsi      # 0x842b
movq %rbx, %rdi
callq 0x6679
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2442
// File: /workspace/github_c_makefile_star2_O3/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 0x545c(%rip), %rdx      # 0x8456
leaq 0x10(%rsp), %rdi
movl $0x64, %esi
callq 0x2240
testq %rax, %rax
je 0x303f
movq 0x18(%r14), %rsi
movq 0x10(%r14), %rcx
movq (%r14), %r8
movq 0x8(%r14), %rax
movq %rax, (%rsp)
leaq 0x5436(%rip), %rdi      # 0x845e
leaq 0x10(%rsp), %rdx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x20f0
addq $0x78, %rsp
popq %rbx
popq %r14
retq
callq 0x2466
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x18, %edi
callq 0x21f0
movq %rax, %rbx
testq %rax, %rax
je 0x63ee
movq %r14, (%rbx)
incq %r14
movl $0x1, %esi
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_O3/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
movl $0x18, %edi
callq 0x21f0
testq %rax, %rax
je 0x644e
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_O3/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 0x63ba
movq %rax, %r15
testq %rax, %rax
je 0x648f
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_O3/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 %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r12
movq %r12, %rdi
callq 0x20d0
movq %rax, %r15
movq (%rbx), %r14
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x2190
testq %rax, %rax
je 0x64f9
movq %rax, %r13
subq %r15, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x21d0
movq 0x8(%rbx), %rdi
callq 0x2320
movq %r15, (%rbx)
movq %r13, 0x8(%rbx)
movq %r13, 0x10(%rbx)
jmp 0x6500
movq $-0x1, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x656d
movb $0x0, (%rax,%rbx)
xorl %eax, %eax
jmp 0x6572
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x65e4
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)
movq 0x10(%rdi), %rdi
callq 0x20d0
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 0x6530
cmpl $-0x1, %eax
je 0x6665
movslq %r15d, %rdi
addq 0x10(%r14), %rdi
incl %r12d
movslq %r12d, %rsi
movq %rsp, %rcx
movq %rbx, %rdx
callq 0x2080
sarl $0x1f, %eax
jmp 0x666a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x66d9
movq %r15, %rdi
movq %rax, %rsi
callq 0x6530
cmpl $-0x1, %eax
je 0x66f5
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
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x66e9
// File: /workspace/github_c_makefile_star2_O3/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 0x673d
movq %r14, %rdi
movq %rax, %rsi
callq 0x6530
cmpl $-0x1, %eax
je 0x676c
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
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6760
// File: /workspace/github_c_makefile_star2_O3/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 0x6785
xorl %r15d, %r15d
jmp 0x67cb
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 0x63ba
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_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r15
movq %r15, %rdi
callq 0x20d0
movb -0x1(%r15,%rax), %bpl
testb %bpl, %bpl
je 0x68b7
movq %rax, %r14
leaq -0x1(%rax), %r12
addq %rax, %r15
decq %r15
callq 0x2300
addq $-0x2, %r14
movq (%rax), %rcx
movsbq %bpl, %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x68b7
movb $0x0, (%r15)
movq 0x10(%rbx), %rcx
leaq (%rcx,%r12), %r15
decq %r15
decq %r12
movb (%rcx,%r14), %bpl
decq %r14
testb %bpl, %bpl
jne 0x688b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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), %r12
leaq 0x2a3e(%rip), %rdi      # 0x9340
xorl %eax, %eax
callq 0x20f0
testq %r12, %r12
je 0x6959
negq %r12
movl $0x1, %r13d
leaq 0x2a25(%rip), %r14      # 0x9343
leaq 0x2a1b(%rip), %r15      # 0x9340
movq 0x8(%rbx), %rax
movsbl -0x1(%rax,%r13), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x20f0
testb $0x7, %r13b
jne 0x6949
movq %r15, %rdi
xorl %eax, %eax
callq 0x20f0
leaq (%r12,%r13), %rax
incq %rax
incq %r13
cmpq $0x1, %rax
jne 0x6925
movl $0xa, %edi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O3/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), %rdi
movq (%rdi), %r14
testq %r14, %r14
je 0x69ea
movq (%r14), %rdi
callq 0x2320
movq (%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x69d3
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x69d3
callq *%rax
movq 0x10(%r14), %r15
movq %r14, %rdi
callq 0x2320
movq %r15, %r14
testq %r15, %r15
jne 0x69b4
movq (%rbx), %rdi
callq 0x2320
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/marcomorain[P]garcon/deps/cmap/map.c
// Function: map_get
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 %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
testq %r12, %r12
je 0x6a31
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
movq (%r12), %rsi
movq %r14, %rdi
callq *0x10(%r15)
testl %eax, %eax
jle 0x6a2f
movq 0x10(%r12), %r12
testq %r12, %r12
jne 0x6a14
jmp 0x6a33
je 0x6a42
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%r12), %rbx
jmp 0x6a33
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r13
testq %r13, %r13
je 0x6a8f
movq (%r13), %rsi
movq %r14, %rdi
callq *0x10(%rbx)
testl %eax, %eax
jle 0x6a98
movq %r13, %r15
movq 0x10(%r13), %r13
testq %r13, %r13
je 0x6aa9
movq (%r13), %rsi
movq %r14, %rdi
callq *0x10(%rbx)
testl %eax, %eax
jg 0x6a73
jmp 0x6a9b
movq %r12, (%rsp)
xorl %r15d, %r15d
jmp 0x6aad
xorl %r15d, %r15d
testl %eax, %eax
je 0x6b2a
movq %r12, (%rsp)
jmp 0x6ab0
movq %r12, (%rsp)
xorl %r13d, %r13d
movl $0x18, %edi
callq 0x21f0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x6b51
movq %rax, %r12
movq $0x0, 0x10(%rax)
movq (%rsp), %rax
movq %rax, 0x8(%r12)
movq %r14, %rdi
callq 0x20d0
leaq 0x1(%rax), %rdi
callq 0x21f0
movq %rax, (%r12)
testq %rax, %rax
je 0x6b20
movq %rax, %rdi
movq %r14, %rsi
callq 0x2060
cmpq $0x0, (%rbx)
je 0x6b44
movq %r13, 0x10(%r12)
leaq 0x10(%r15), %rax
testq %r15, %r15
cmoveq %rbx, %rax
movq %r12, (%rax)
incq 0x8(%rbx)
jmp 0x6b4f
movq %r12, %rdi
callq 0x2320
jmp 0x6b51
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x6b3e
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x6b3e
callq *%rax
movq %r12, 0x8(%r13)
jmp 0x6b4f
movq %r12, (%rbx)
movq $0x1, 0x8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x6be9
movq %rsi, %r15
movq %rdi, %rbx
movq (%r14), %rsi
movq %r15, %rdi
callq *0x10(%rbx)
testl %eax, %eax
jle 0x6ba0
movq %r14, %r12
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x6be9
movq (%r14), %rsi
movq %r15, %rdi
callq *0x10(%rbx)
testl %eax, %eax
jg 0x6b85
jmp 0x6ba3
xorl %r12d, %r12d
testl %eax, %eax
jne 0x6be9
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x6bbb
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x6bbb
callq *%rax
movq (%rbx), %rax
cmpq %rax, %r14
je 0x6bce
movq 0x10(%r14), %rax
movq %rax, 0x10(%r12)
jmp 0x6bd5
movq 0x10(%rax), %rax
movq %rax, (%rbx)
movq (%r14), %rdi
callq 0x2320
movq %r14, %rdi
callq 0x2320
decq 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xa, %edi
callq 0x2040
movq 0x8(%rbx), %rdx
movq 0x18(%rbx), %rsi
leaq 0x2729(%rip), %rdi      # 0x9349
xorl %eax, %eax
callq 0x20f0
movl $0xa, %edi
callq 0x2040
leaq 0x2897(%rip), %rdi      # 0x94cf
callq 0x2070
movl $0xa, %edi
callq 0x2040
cmpl $0x0, 0x28(%rbx)
jle 0x6c80
leaq 0x58(%rbx), %r15
leaq 0x2701(%rip), %r14      # 0x9359
xorl %r12d, %r12d
movq -0x10(%r15), %rsi
movq -0x8(%r15), %rdx
movq (%r15), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x20f0
incq %r12
movslq 0x28(%rbx), %rax
addq $0x38, %r15
cmpq %rax, %r12
jl 0x6c5b
movl $0xa, %edi
callq 0x2040
movq %rbx, %rdi
callq 0x6c99
xorl %edi, %edi
callq 0x22b0
// File: /workspace/github_c_makefile_star2_O3/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
cmpl $0x0, 0x28(%rdi)
jle 0x6ccf
leaq 0x40(%rbx), %r14
xorl %r15d, %r15d
movq -0x8(%r14), %rdi
callq 0x2320
movq (%r14), %rdi
callq 0x2320
incq %r15
movslq 0x28(%rbx), %rax
addq $0x38, %r14
cmpq %rax, %r15
jl 0x6cae
movq 0x838(%rbx), %rax
testq %rax, %rax
je 0x6d0f
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6d02
movl $0x8, %r14d
callq 0x2320
movq 0x838(%rbx), %rax
movq (%rax,%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x6ce9
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2320
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
movl %eax, 0x730(%rdi)
movl %eax, 0x28(%rdi)
leaq 0x2634(%rip), %rcx      # 0x936b
movq %rcx, 0x8(%rdi)
movq %rax, 0x838(%rdi)
leaq 0x262c(%rip), %rsi      # 0x9375
leaq 0x2628(%rip), %rdx      # 0x9378
leaq 0x262b(%rip), %rcx      # 0x9382
leaq 0x192(%rip), %r8        # 0x6ef0
callq 0x6d88
leaq 0x262f(%rip), %rsi      # 0x9399
leaq 0x262b(%rip), %rdx      # 0x939c
leaq 0x262b(%rip), %rcx      # 0x93a3
leaq -0x183(%rip), %r8       # 0x6bfc
movq %rbx, %rdi
popq %rbx
jmp 0x6d88
// File: /workspace/github_c_makefile_star2_O3/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 0x6eaa
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)
movq $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 0x6eb2
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 0x6ed1
movq %rax, %r15
movq %rbx, %rdi
callq 0x20d0
xorl %edi, %edi
testq %rax, %rax
je 0x6e6f
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movb (%rbx,%rsi), %r8b
testl %edi, %edi
je 0x6e4d
leaq (%r14,%rdx), %r9
incq %rdx
movl $0x1, %edi
movb %r8b, (%r9)
incq %rsi
cmpq %rsi, %rax
jne 0x6e2c
jmp 0x6e73
movzbl %r8b, %edi
cmpl $0x20, %edi
je 0x6e6b
cmpl $0x5b, %edi
je 0x6e34
cmpl $0x3c, %edi
je 0x6e34
leaq (%r15,%rcx), %r9
incq %rcx
xorl %edi, %edi
jmp 0x6e40
xorl %edi, %edi
jmp 0x6e43
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
movb %al, (%r14,%rdx)
movb %al, (%r15,%rcx)
movzbl (%r14), %eax
cmpl $0x3c, %eax
je 0x6e95
cmpl $0x5b, %eax
jne 0x6e9e
movl $0x1, (%r12)
jmp 0x6e9e
movl $0x1, 0x4(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x249d
leaq 0x2526(%rip), %rdi      # 0x93df
leaq 0x252f(%rip), %rsi      # 0x93ef
leaq 0x2543(%rip), %rcx      # 0x940a
movl $0xb9, %edx
callq 0x2120
leaq 0x2591(%rip), %rdi      # 0x9469
leaq 0x2510(%rip), %rsi      # 0x93ef
leaq 0x2524(%rip), %rcx      # 0x940a
movl $0xbb, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O3/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 0x1df8(%rip), %r14      # 0x303d
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x10e0
cmpl $0x64, %eax
je 0x1245
cmpl $0x74, %eax
je 0x1245
cmpl $-0x1, %eax
jne 0x1327
movl $0x186a0, %edi          # imm = 0x186A0
xorl %esi, %esi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x186e
movq %rax, 0x3e26(%rip)      # 0x50a8
leaq 0x400(%rsp), %r14
leaq 0x1d73(%rip), %r15      # 0x3004
movq %rsp, %r12
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %r14, %rdi
leaq 0x1d69(%rip), %rsi      # 0x300c
movl %r13d, %edx
xorl %eax, %eax
callq 0x1110
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x1110
movq 0x3de4(%rip), %rbp      # 0x50a8
movq %r12, %rdi
callq 0x1060
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0x20df
testl %eax, %eax
je 0x12f8
testw %bx, %bx
jne 0x1320
leaq 0x1d23(%rip), %rdi      # 0x300f
movl %r13d, %esi
xorl %eax, %eax
callq 0x1070
jmp 0x1320
testb %r13b, %r13b
jne 0x130e
leaq 0x1d19(%rip), %rdi      # 0x301d
movl %r13d, %esi
xorl %eax, %eax
callq 0x1070
movq 0x3ccb(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
callq 0x10c0
incl %r13d
incl %ebx
jmp 0x1299
leaq 0x1cfd(%rip), %rdi      # 0x302b
callq 0x1050
movl $0x1, %eax
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xefb(%rip), %rbx       # 0x304e
leaq 0xeaa(%rip), %r14       # 0x3004
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x1060
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1070
movl %ebp, %edi
callq 0x1050
callq 0x218a
incl %ebp
cmpl $0x64, %ebp
jne 0x215c
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xf36(%rip), %r14       # 0x30d8
movb (%r14), %cl
movl $0x1, %eax
shll %cl, %eax
movq %rsp, -0x30(%rbp)
cltq
addq $0xf, %rax
andq $-0x10, %rax
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
callq 0x22dc
movl $0xa, %edi
callq 0x2675
movl $0xa, %edi
callq 0x26c4
leaq 0xeac(%rip), %rdi       # 0x308f
callq 0x1060
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12ec
movq %rbx, %rdi
callq 0x1846
leaq 0xe05(%rip), %rdi       # 0x300e
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movl $0xa, %edi
callq 0x1030
leaq 0xe1d(%rip), %r13       # 0x3040
leaq 0xe8d(%rip), %r14       # 0x30b7
xorl %r15d, %r15d
leaq 0xdec(%rip), %rdi       # 0x3020
movl %r15d, %esi
xorl %eax, %eax
callq 0x1070
leaq 0xe57(%rip), %rdi       # 0x309c
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2b44
movl %eax, %r12d
leaq 0xdc6(%rip), %rdi       # 0x3029
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
callq 0x186d
movq %r13, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movq %r14, %rdi
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x2dec
movq %rbx, %rdi
callq 0x186d
movq %r13, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movl -0x48(%rbp), %eax
movl %eax, -0x4c(%rbp)
incl %r15d
cmpl $0x5, %r15d
jne 0x222d
movl $0xa, %edi
callq 0x1030
movq -0x30(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: fnf_to_sdd_auto
SddNode* fnf_to_sdd_auto(Fnf* fnf, SddManager* manager) {
  SddCompilerOptions* options = sdd_manager_options(manager);
  int verbose      = options->verbose;
  BoolOp op        = fnf->op;
  SddSize count    = fnf->litset_count;
  LitSet** litsets = (LitSet**) malloc(count*sizeof(LitSet*));
  for (SddSize i=0; i<count; i++) litsets[i] = fnf->litsets + i;

  if(verbose) { printf("\nclauses: %ld ",count); fflush(stdout); }
  SddNode* node = ONE(manager,op);
  for(int i=0; i<count; i++) {
    sort_litsets_by_lca(litsets+i,count-i,manager);
    sdd_ref(node,manager);
    SddNode* l = apply_litset(litsets[i],manager);
    sdd_deref(node,manager);
    node = sdd_apply(l,node,op,manager);
    if(verbose) { printf("%ld ",count-i-1); fflush(stdout); }
  }
  free(litsets);
  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x6830
movl 0x58(%rax), %eax
movl %eax, 0xc(%rsp)
movzwl 0x18(%r14), %ebp
movq 0x8(%r14), %r15
leaq (,%r15,8), %rdi
callq 0x21b0
movq %rax, %r13
testq %r15, %r15
je 0x2719
movq 0x10(%r14), %rax
leaq 0x1(%r15), %rcx
andq $-0x2, %rcx
leaq -0x1(%r15), %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x20a51(%rip), %xmm1    # 0x230f0
xorl %edx, %edx
movdqa 0x20a57(%rip), %xmm2    # 0x23100
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x20a57(%rip), %xmm4    # 0x23110
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x26f0
movq %rax, (%r13,%rdx,8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x2708
leaq 0x30(%rax), %rsi
movq %rsi, 0x8(%r13,%rdx,8)
addq $0x2, %rdx
paddq %xmm4, %xmm1
addq $0x60, %rax
cmpq %rdx, %rcx
jne 0x26b9
cmpl $0x0, 0xc(%rsp)
je 0x2740
leaq 0x209f9(%rip), %rdi     # 0x23120
movq %r15, %rsi
xorl %eax, %eax
callq 0x20e0
movq 0x28888(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21c0
movq %rbx, %rdi
testw %bp, %bp
je 0x274f
callq 0x6590
jmp 0x2754
callq 0x6580
movq %rax, %r12
testq %r15, %r15
movq %r13, 0x10(%rsp)
je 0x27dd
movzwl %bp, %ebp
movq %r13, %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2c0f
movq %r12, %rdi
movq %rbx, %rsi
callq 0x99a0
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x27f9
movq %rax, %r13
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9a90
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0xba00
movq %rax, %r12
cmpl $0x0, 0xc(%rsp)
je 0x27d4
leaq -0x1(%r15), %rsi
leaq 0x2096c(%rip), %rdi     # 0x2312a
xorl %eax, %eax
callq 0x20e0
movq 0x287f4(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21c0
addq $0x8, %r14
decq %r15
jne 0x2767
movq 0x10(%rsp), %rdi
callq 0x2030
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: apply_litset
SddNode* apply_litset(LitSet* litset, SddManager* manager) {

  BoolOp op            = litset->op; //conjoin (term) or disjoin (clause)
  SddLiteral* literals = litset->literals;
  SddNode* node        = ONE(manager,op); //will not be gc'd
  
  for(SddLiteral i=0; i<litset->literal_count; i++) {
    SddNode* literal = sdd_manager_literal(literals[i],manager);
    node             = sdd_apply(node,literal,op,manager);
  }
  
  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x18(%rdi), %ebp
movq 0x10(%rdi), %r12
movq %rsi, %rdi
testw %bp, %bp
je 0x2821
callq 0x6590
jmp 0x2826
callq 0x6580
movq %rax, %r15
cmpq $0x0, 0x8(%r14)
jle 0x285e
xorl %r13d, %r13d
movzwl %bp, %ebp
movq (%r12,%r13,8), %rdi
movq %rbx, %rsi
callq 0x65a0
movq %r15, %rdi
movq %rax, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0xba00
movq %rax, %r15
incq %r13
cmpq 0x8(%r14), %r13
jl 0x2836
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: fnf_to_sdd
SddNode* fnf_to_sdd(Fnf* fnf, SddManager* manager) {
  SddNode* test = degenerate_fnf_test(fnf,manager);
  if (test != NULL) return test;
  SddCompilerOptions* options = sdd_manager_options(manager);

  if(options->vtree_search_mode < 0) {
    sdd_manager_auto_gc_and_minimize_on(manager);
    return fnf_to_sdd_auto(fnf,manager);
  } else {
    sdd_manager_auto_gc_and_minimize_off(manager);
    return fnf_to_sdd_manual(fnf,manager);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x18(%rdi), %eax
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x2ad1
movq 0x10(%r14), %rdx
addq $0x8, %rdx
cmpq $0x0, (%rdx)
je 0x2ae0
addq $0x30, %rdx
decq %rcx
jne 0x2ac0
jmp 0x2afa
testw %ax, %ax
je 0x2ae5
movq %rbx, %rdi
callq 0x6590
jmp 0x2aed
testw %ax, %ax
je 0x2ad6
movq %rbx, %rdi
callq 0x6580
testq %rax, %rax
je 0x2afa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x6830
cmpl $0x0, 0x50(%rax)
js 0x2b22
movq %rbx, %rdi
callq 0x6140
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2870
movq %rbx, %rdi
callq 0x6130
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2638
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/fnf/utils.c
// Function: litset_cmp_lca
int litset_cmp_lca(const void* litset1_loc, const void* litset2_loc) {

  LitSet* litset1 = *(LitSet**)litset1_loc;
  LitSet* litset2 = *(LitSet**)litset2_loc;

  Vtree* vtree1 = litset1->vtree;
  Vtree* vtree2 = litset2->vtree;
  SddLiteral p1 = sdd_vtree_position(vtree1);
  SddLiteral p2 = sdd_vtree_position(vtree2);
  
  if(vtree1!=vtree2 && (sdd_vtree_is_sub(vtree2,vtree1) || (!sdd_vtree_is_sub(vtree1,vtree2) && (p1 > p2)))) return 1;
  else if(vtree1!=vtree2 && (sdd_vtree_is_sub(vtree1,vtree2) || (!sdd_vtree_is_sub(vtree2,vtree1) && (p1 < p2)))) return -1;
  else {
	
  SddLiteral l1 = litset1->literal_count;
  SddLiteral l2 = litset2->literal_count;
  
  if(l1 > l2) return 1;
  else if(l1 < l2) return -1;
  else { 
    //so the litset order is unique
  	//without this, final litset order may depend on system
    SddSize id1 = litset1->id;
    SddSize id2 = litset2->id;
    if(id1 > id2) return 1;
    else if(id1 < id2) return -1;
    else return 0;
  }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbp
movq (%rsi), %r15
movq 0x20(%rbp), %r14
movq 0x20(%r15), %r12
movq %r14, %rdi
callq 0x6990
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x6990
cmpq %r12, %r14
je 0x2bcf
movq %rax, %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0x9fc0
movl $0x1, %ebx
testl %eax, %eax
jne 0x2bfe
movq %r14, %rdi
movq %r12, %rsi
callq 0x9fc0
testl %eax, %eax
sete %al
cmpq %r13, (%rsp)
setg %cl
testb %cl, %al
jne 0x2bfe
movq %r14, %rdi
movq %r12, %rsi
callq 0x9fc0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x2bfe
movq %r12, %rdi
movq %r14, %rsi
callq 0x9fc0
testl %eax, %eax
sete %al
cmpq %r13, (%rsp)
setl %cl
testb %cl, %al
jne 0x2bfe
movq 0x8(%r15), %rax
movl $0x1, %ebx
cmpq %rax, 0x8(%rbp)
jg 0x2bfe
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jl 0x2bfe
movq (%rbp), %rax
movq (%r15), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
sbbl %edx, %edx
cmpq %rcx, %rax
movl $0x1, %ebx
cmovbel %edx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/UCLA-StarAI[P]TrimBN/src/fnf/utils.c
// Function: sort_litsets_by_lca
void sort_litsets_by_lca(LitSet** litsets, SddSize size, SddManager* manager) {
  //compute lcas of litsets
  for(SddLiteral i=0; i<size; i++) {
    LitSet* litset = litsets[i];
    litset->vtree  = sdd_manager_lca_of_literals(litset->literal_count,litset->literals,manager);
  }
  //sort
  qsort((LitSet**)litsets,size,sizeof(LitSet*),litset_cmp_lca);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x2c49
movq %rdx, %r15
xorl %r12d, %r12d
movq (%r14,%r12,8), %r13
movl 0x8(%r13), %edi
movq 0x10(%r13), %rsi
movq %r15, %rdx
callq 0xa040
movq %rax, 0x20(%r13)
incq %r12
cmpq %r12, %rbx
jne 0x2c29
leaq -0x114(%rip), %rcx      # 0x2b3c
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2060
nopl (%rax)