LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_advert_cname_extract
int EXPORTED
obstcp_advert_cname_extract(char *output, unsigned *ooutlen, const char *name) {
  unsigned j = 0;  // current offset into output
  const unsigned outlen = *ooutlen;

  while (*name) {
    if (strncmp(name, kDNSMagic, kDNSMagicLen) == 0) {
      char good = 1;
      unsigned count = 0;
      const char *i;

      for (i = name + kDNSMagicLen; *i; ++i, count++) {
        const char c = *i;
        if (c == '.' || !c)
          break;
        if ((c >= '0' && c <= '9') ||
          (c > 'a' && c <= 'z' && c != 'e' && c != 'i' && c != 'o') ||
          (c > 'A' && c <= 'Z' && c != 'E' && c != 'I' && c != 'O'))
          continue;
        good = 0;
        break;
      }

      if (!count)
        good = 0;

      if (good) {
        if (!buffer_put((uint8_t *) output, outlen, &j,
                        name + kDNSMagicLen, count)) goto spc;
        name += kDNSMagicLen + count;
        if (*name == '.')
          name++;
        continue;
      }
    }

    while (*name && *name != '.')
      name++;
    if (*name == '.') {
      name++;
    } else {
      break;
    }
  }

  if (!j) {
    errno = EEXIST;
    return 0;
  }

  *ooutlen = j;

  return 1;

 spc:
  errno = ENOSPC;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb (%rdx), %r13b
testb %r13b, %r13b
je 0x1aa3
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movl (%rsi), %eax
movl %eax, 0xc(%rsp)
xorl %r14d, %r14d
movl %r14d, %ebp
leaq 0x57fb(%rip), %r14      # 0x71ce
movl $0x5, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1060
testl %eax, %eax
jne 0x1a35
leaq 0x5(%r15), %rsi
xorl %r12d, %r12d
movzbl (%rsi,%r12), %eax
testl %eax, %eax
je 0x1a30
cmpl $0x2e, %eax
je 0x1a30
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x1a2b
leal -0x62(%rax), %ecx
cmpb $0x18, %cl
ja 0x1a11
addl $-0x65, %eax
jmp 0x1a1c
leal -0x42(%rax), %ecx
cmpb $0x18, %cl
ja 0x1a35
addl $-0x45, %eax
cmpl $0xa, %eax
ja 0x1a2b
movl $0x411, %ecx            # imm = 0x411
btl %eax, %ecx
jb 0x1a35
incq %r12
jmp 0x19ee
testl %r12d, %r12d
jne 0x1a55
incq %r15
testb %r13b, %r13b
je 0x1a96
movzbl %r13b, %eax
cmpl $0x2e, %eax
je 0x1a4b
movb (%r15), %r13b
jmp 0x1a35
movb (%r15), %r13b
testb %r13b, %r13b
jne 0x19d3
jmp 0x1a96
movl %ebp, %edi
leaq (%rdi,%r12), %r14
cmpl 0xc(%rsp), %r14d
ja 0x1abf
addq 0x10(%rsp), %rdi
movl %r12d, %edx
callq 0x10b0
leal 0x5(%r12), %eax
leaq (%r15,%rax), %rcx
xorl %edx, %edx
cmpb $0x2e, (%r15,%rax)
sete %dl
leaq (%rcx,%rdx), %r15
movb (%rdx,%rcx), %r13b
testb %r13b, %r13b
jne 0x19c9
addl %r12d, %ebp
testl %ebp, %ebp
je 0x1aa3
movl %ebp, (%rbx)
movl $0x1, %eax
jmp 0x1ab0
callq 0x1050
movl $0x11, (%rax)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1050
movl $0x1c, (%rax)
jmp 0x1aae
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_advert_hostent_extract
int EXPORTED
obstcp_advert_hostent_extract(char *output, unsigned *outlen,
                              const struct hostent *hent) {
  unsigned i;

  for (i = 0; hent->h_aliases[i]; ++i) {
      if (!obstcp_advert_cname_extract(output, outlen, hent->h_aliases[i])) {
        if (errno != EEXIST)
          return 0;
      } else {
        return 1;
      }
  }

  if (hent->h_name) {
    return obstcp_advert_cname_extract(output, outlen, hent->h_name);
  } else {
    errno = EEXIST;
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdx), %rax
movq (%rax), %rdx
testq %rdx, %rdx
je 0x1b20
movl $0x1, %ebp
movl $0x1, %r12d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x199b
testl %eax, %eax
jne 0x1b48
callq 0x1050
cmpl $0x11, (%rax)
jne 0x1b46
movq 0x8(%r15), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rdx
incl %r12d
testq %rdx, %rdx
jne 0x1af4
movq (%r15), %rdx
testq %rdx, %rdx
je 0x1b3b
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x199b
callq 0x1050
movl $0x11, (%rax)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_advert_cname_encode
void EXPORTED
obstcp_advert_cname_encode(char *output,
                           const char *advert, unsigned advertlen) {
  unsigned i = 0, j = 0;  // i indexes @advert, j indexes @output

  while (advertlen) {
    memcpy(output + j, kDNSMagic, kDNSMagicLen);
    j += kDNSMagicLen;
    unsigned todo = advertlen;
    if (todo > kDNSCharsPerLabel)
      todo = kDNSCharsPerLabel;
    memcpy(output + j, advert + i, todo);
    i += todo;
    j += todo;
    advertlen -= todo;
    output[j++] = '.';
  }
}

// Assembly:
testl %edx, %edx
je 0x1be1
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
movl %r13d, %eax
movb $0x78, 0x4(%r15,%rax)
movl $0x78306561, (%r15,%rax) # imm = 0x78306561
cmpl $0x3a, %ebx
movl $0x3a, %r12d
cmovbl %ebx, %r12d
leal 0x5(%r13), %edi
addq %r15, %rdi
movl %ebp, %esi
addq %r14, %rsi
movq %r12, %rdx
callq 0x10b0
addl %r12d, %ebp
leal (%r12,%r13), %eax
addl $0x5, %eax
addl %r12d, %r13d
addl $0x6, %r13d
movb $0x2e, (%r15,%rax)
subl %r12d, %ebx
jne 0x1b86
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_keys_key_add
int EXPORTED
obstcp_keys_key_add(struct obstcp_keys *keys, const uint8_t *private_key) {
  struct obstcp_keypair *kp, *a;
  static const uint8_t basepoint[32] = {9};

  kp = (struct obstcp_keypair *) malloc(sizeof(struct obstcp_keypair));
  if (!kp) {
    errno = ENOMEM;
    return 0;
  }

  memcpy(kp->private_key, private_key, 32);
  kp->private_key[0] &= 248;
  kp->private_key[31] &= 127;
  kp->private_key[31] |= 64;

  curve25519(kp->public_key, kp->private_key, basepoint);

  kp->keyid = key_keyid(kp->public_key);

  for (a = keys->keys; a; a = a->next) {
    if (a->keyid == kp->keyid) {
      free(kp);
      errno = ENOSPC;
      return 0;
    }
  }


  kp->next = keys->keys;
  keys->keys = kp;

  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movl $0x50, %edi
callq 0x10c0
testq %rax, %rax
je 0x1c92
movq %rax, %r14
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm0, (%rax)
andb $-0x8, (%rax)
movups %xmm1, 0x10(%rax)
movb 0x1f(%rax), %al
andb $0x3f, %al
orb $0x40, %al
movb %al, 0x1f(%r14)
movq %r14, %rdi
addq $0x20, %rdi
leaq 0x54b9(%rip), %rdx      # 0x70f0
movq %r14, %rsi
callq 0x5880
movdqu 0x20(%r14), %xmm0
movdqu 0x30(%r14), %xmm1
pxor %xmm0, %xmm1
pshufd $0xee, %xmm1, %xmm2     # xmm2 = xmm1[2,3,2,3]
pxor %xmm1, %xmm2
pshufd $0x55, %xmm2, %xmm0     # xmm0 = xmm2[1,1,1,1]
pxor %xmm2, %xmm0
movd %xmm0, 0x40(%r14)
movq (%rbx), %rax
testq %rax, %rax
je 0x1c84
movd %xmm0, %ecx
movq %rax, %rdx
cmpl %ecx, 0x40(%rdx)
je 0x1c9f
movq 0x48(%rdx), %rdx
testq %rdx, %rdx
jne 0x1c76
movq %rax, 0x48(%r14)
movq %r14, (%rbx)
movl $0x1, %eax
jmp 0x1cb4
callq 0x1050
movl $0xc, (%rax)
jmp 0x1cb2
movq %r14, %rdi
callq 0x1030
callq 0x1050
movl $0x1c, (%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_keys_free
void EXPORTED
obstcp_keys_free(struct obstcp_keys *keys) {
  struct obstcp_keypair *kp, *next;

  for (kp = keys->keys; kp; kp = next) {
    next = kp->next;
    free(kp);
  }

  keys->keys = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1cda
movq 0x48(%rdi), %r14
callq 0x1030
movq %r14, %rdi
testq %r14, %r14
jne 0x1cc9
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/./cursor.h
// Function: cursor_read
static const uint8_t * MAYBEUNUSED
cursor_read(uint8_t *buffer, struct obstcp_cursor *c, size_t n) {
  struct iovec iov;

  if (!c->get(c, &iov, n))
    abort();

  if (iov.iov_len == n)
    return (const uint8_t *) iov.iov_base;

  size_t j = 0;
  while (n) {
    memcpy(buffer + j, iov.iov_base, iov.iov_len);
    n -= iov.iov_len;
    j += iov.iov_len;
    if (!c->get(c, &iov, n))
      abort();
  }

  return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq *(%r15)
testl %eax, %eax
je 0x22a3
cmpq %r14, 0x10(%rsp)
jne 0x226b
movq 0x8(%rsp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
testq %r14, %r14
je 0x2259
leaq (%rbx,%rbp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %r13
movq %r13, %rdx
callq 0x10b0
subq %r13, %r14
addq %r13, %rbp
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *(%r15)
testl %eax, %eax
jne 0x2272
callq 0x1040
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/./iovec_cursor.h
// Function: iovec_cursor_copy_cursor
static void MAYBEUNUSED
iovec_cursor_copy_cursor(struct iovec_cursor *dest, struct obstcp_cursor *src) {
  while (!iovec_cursor_full(dest)) {
    struct iovec iov;
    if (!src->get(src, &iov, ULONG_MAX))
      return;

    iovec_cursor_append(dest, iov.iov_base, iov.iov_len);
  }
}

// Assembly:
movl 0x1c(%rdi), %eax
cmpl 0x18(%rdi), %eax
je 0x2309
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq $-0x1, %rdx
callq *(%rbx)
testl %eax, %eax
je 0x2300
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x10(%r14), %rdx
movl 0x1c(%r14), %esi
leal 0x1(%rsi), %edi
shlq $0x4, %rsi
movq %rax, (%rdx,%rsi)
movl %edi, 0x1c(%r14)
movq %rcx, 0x8(%rdx,%rsi)
cmpl 0x18(%r14), %edi
jne 0x22c2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obs_encrypt
static void
obs_encrypt(struct obstcp_half_connection *hc, uint8_t *out,
        const uint8_t *in, size_t len) {
  size_t l = len, j = 0, i;

  if (hc->used < 64) {
    const size_t m = min_t(size_t, 64u - hc->used, l);
    xor(out, in, hc->keystream + hc->used, m);
    l -= m;
    hc->used += m;
    j += m;
  }
  const unsigned chunks = l >> 6;
  if (chunks) {
    for (i = 0; i < chunks; ++i) {
      salsa208(hc->keystream, hc->block_ctr, hc->key, sigma);
      block_ctr_inc(hc->block_ctr);
      xor(out + j, in + j, hc->keystream, 64);
      l -= 64;
      j += 64;
    }
  }
  if (l) {
    salsa208(hc->keystream, hc->block_ctr, hc->key, sigma);
    block_ctr_inc(hc->block_ctr);
    xor(out + j, in + j, hc->keystream, l);
    hc->used = l;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl 0x40(%rdi), %edx
cmpq $0x3f, %rdx
ja 0x2357
movl $0x40, %r13d
subq %rdx, %r13
cmpq %rbx, %r13
cmovaeq %rbx, %r13
addq %r14, %rdx
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %ecx
callq 0x363b
subq %r13, %rbx
addl %r13d, 0x40(%r14)
jmp 0x235a
xorl %r13d, %r13d
movq %rbx, %rcx
shrq $0x6, %rcx
testl %ecx, %ecx
je 0x2416
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
andq %rax, %rcx
je 0x241b
movq %rbx, 0x10(%rsp)
leaq 0x64(%r14), %rbp
leaq 0x44(%r14), %rax
movq %rax, 0x18(%rsp)
movq %r12, (%rsp)
addq %r13, %r12
movq %r15, 0x8(%rsp)
addq %r13, %r15
xorl %ebx, %ebx
movq %rcx, 0x20(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movq 0x18(%rsp), %rdx
leaq 0x4d6f(%rip), %rcx      # 0x7120
callq 0x3774
xorl %eax, %eax
incb (%rbp,%rax)
jne 0x23cb
leaq 0x1(%rax), %rcx
cmpq $0xf, %rax
movq %rcx, %rax
jne 0x23b8
xorl %eax, %eax
movl (%r14,%rax,4), %ecx
xorl (%r15,%rax,4), %ecx
movl %ecx, (%r12,%rax,4)
incq %rax
cmpq $0x10, %rax
jne 0x23cd
addq $0x40, %r13
incq %rbx
addq $0x40, %r12
addq $0x40, %r15
movq 0x20(%rsp), %rcx
cmpq %rcx, %rbx
jne 0x239f
movabsq $-0x3fffffffc1, %rax    # imm = 0xFFFFFFC00000003F
movq 0x10(%rsp), %rbx
andq %rax, %rbx
movq 0x8(%rsp), %r15
movq (%rsp), %r12
testq %rbx, %rbx
je 0x2464
leaq 0x64(%r14), %rsi
leaq 0x44(%r14), %rdx
leaq 0x4cf6(%rip), %rcx      # 0x7120
movq %r14, %rdi
callq 0x3774
movl $0x64, %eax
incb (%r14,%rax)
jne 0x244a
leaq 0x1(%rax), %rcx
cmpq $0x73, %rax
movq %rcx, %rax
jne 0x2437
addq %r13, %r12
addq %r13, %r15
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x363b
movl %ebx, 0x40(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_server_encrypt
ssize_t EXPORTED
obstcp_server_encrypt(struct obstcp_server_ctx *ctx, uint8_t *output,
                      const uint8_t *buffer, size_t len) {
  obs_encrypt(&ctx->u.b.out, output, buffer, len);
  if (!ctx->frame_valid && ctx->state == SRV_ST_2ND_FRAME_PENDING) {
    ctx->state = SRV_ST_RUNNING;
  }

  ctx->frame_valid = 1;

  return len;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
addq $0x7c, %rdi
callq 0x230a
cmpb $0x0, 0x195(%r14)
jne 0x24b2
cmpl $0x2, 0x190(%r14)
jne 0x24b2
movl $0x3, 0x190(%r14)
movb $0x1, 0x195(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_server_prefix
int EXPORTED
obstcp_server_prefix(struct obstcp_server_ctx *ctx, struct iovec *prefix) {
  static const uint8_t banner[2] = {0, 0};

  if (!ctx->frame_valid) return -1;

  if (ctx->state == SRV_ST_FIRST_FRAME) {
    prefix->iov_base = (void *) banner;
    prefix->iov_len = 2;
    ctx->state = SRV_ST_2ND_FRAME_PENDING;
    return 1;
  } else {
    prefix->iov_len = 0;
    return 0;
  }
}

// Assembly:
cmpb $0x0, 0x195(%rdi)
je 0x24f9
cmpl $0x1, 0x190(%rdi)
jne 0x24ff
leaq 0x4c32(%rip), %rax      # 0x7110
movq %rax, (%rsi)
movq $0x2, 0x8(%rsi)
movl $0x2, 0x190(%rdi)
movl $0x1, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movq $0x0, 0x8(%rsi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_client_banner
void EXPORTED
obstcp_client_banner(struct obstcp_client_ctx *ctx,
                     struct iovec *out) {
  if (ctx->state != CLI_ST_WRITING) abort();
  out->iov_base = (void *) ctx->buffer;
  out->iov_len = ctx->n;
  ctx->n = 0;

  ctx->state = CLI_ST_READING;
}

// Assembly:
cmpl $0x0, 0x270(%rdi)
jne 0x2819
movq %rdi, (%rsi)
movl 0x184(%rdi), %eax
movq %rax, 0x8(%rsi)
movl $0x0, 0x184(%rdi)
movl $0x1, 0x270(%rdi)
retq
pushq %rax
callq 0x1040
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_client_accum_init
void EXPORTED
obstcp_client_accum_init(struct obstcp_accum *ac, struct obstcp_client_ctx *ctx) {
  obstcp_accum_init(ac);
  ac->is_server = 0;
  ac->frame_size = obstcp_client_frame_payload_sz(ctx);
  ac->ctx = ctx;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
movl $0x1b8, %edx            # imm = 0x1B8
xorl %esi, %esi
callq 0x1080
movdqa 0x4676(%rip), %xmm0     # 0x70b0
movl $0x58, %eax
movdqa 0x4679(%rip), %xmm1     # 0x70c0
movdqa 0x4681(%rip), %xmm2     # 0x70d0
pshufd $0xf5, %xmm2, %xmm3     # xmm3 = xmm2[1,1,3,3]
pcmpeqd %xmm4, %xmm4
movdqa 0x4680(%rip), %xmm5     # 0x70e0
movdqa %xmm0, %xmm6
pxor %xmm1, %xmm6
movdqa %xmm2, %xmm8
pcmpgtd %xmm6, %xmm8
pshufd $0xf5, %xmm6, %xmm7     # xmm7 = xmm6[1,1,3,3]
pcmpeqd %xmm3, %xmm7
pand %xmm8, %xmm7
movdqa %xmm0, %xmm6
psubq %xmm4, %xmm6
movd %xmm7, %ecx
testb $0x1, %cl
je 0x2a9a
movd %xmm6, %ecx
movb %cl, -0x48(%r14,%rax)
pextrw $0x4, %xmm7, %ecx
testb $0x1, %cl
je 0x2aad
pextrw $0x4, %xmm6, %ecx
movb %cl, (%r14,%rax)
paddq %xmm5, %xmm0
addq $0x90, %rax
cmpq $0x208, %rax            # imm = 0x208
jne 0x2a60
movb $-0x1, 0x178(%r14)
movl $0xffff00, 0x1ba(%r14) # imm = 0xFFFF00
movw $0xffff, 0x8(%r14)      # imm = 0xFFFF
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_server_accum_init
void EXPORTED
obstcp_server_accum_init(struct obstcp_accum *ac, struct obstcp_server_ctx *ctx) {
  obstcp_accum_init(ac);
  ac->is_server = 1;
  ac->frame_size = obstcp_server_frame_payload_sz(ctx);
  ac->ctx = ctx;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
movl $0x1b8, %edx            # imm = 0x1B8
xorl %esi, %esi
callq 0x1080
movdqa 0x45aa(%rip), %xmm0     # 0x70b0
movl $0x58, %eax
movdqa 0x45ad(%rip), %xmm1     # 0x70c0
movdqa 0x45b5(%rip), %xmm2     # 0x70d0
pshufd $0xf5, %xmm2, %xmm3     # xmm3 = xmm2[1,1,3,3]
pcmpeqd %xmm4, %xmm4
movdqa 0x45b4(%rip), %xmm5     # 0x70e0
movdqa %xmm0, %xmm6
pxor %xmm1, %xmm6
movdqa %xmm2, %xmm8
pcmpgtd %xmm6, %xmm8
pshufd $0xf5, %xmm6, %xmm7     # xmm7 = xmm6[1,1,3,3]
pcmpeqd %xmm3, %xmm7
pand %xmm8, %xmm7
movdqa %xmm0, %xmm6
psubq %xmm4, %xmm6
movd %xmm7, %ecx
testb $0x1, %cl
je 0x2b66
movd %xmm6, %ecx
movb %cl, -0x48(%r14,%rax)
pextrw $0x4, %xmm7, %ecx
testb $0x1, %cl
je 0x2b79
pextrw $0x4, %xmm6, %ecx
movb %cl, (%r14,%rax)
paddq %xmm5, %xmm0
addq $0x90, %rax
cmpq $0x208, %rax            # imm = 0x208
jne 0x2b2c
movb $-0x1, 0x178(%r14)
movl $0x1ffff00, 0x1ba(%r14) # imm = 0x1FFFF00
movw $0xffff, 0x8(%r14)      # imm = 0xFFFF
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/./iovec_cursor.h
// Function: iovec_cursor_copy
static size_t MAYBEUNUSED
iovec_cursor_copy(struct iovec_cursor *dest, struct iovec_cursor *src,
                  size_t len) {
  while (len && dest->i < dest->count && src->i < src->count) {
    size_t bytes = src->iov[src->i].iov_len - src->j;
    if (bytes > len) bytes = len;

    dest->iov[dest->i].iov_base = src->iov[src->i].iov_base + src->j;
    dest->iov[dest->i].iov_len = bytes;

    len -= bytes;
    src->j += bytes;
    if (src->j == src->iov[src->i].iov_len) {
      src->j = 0;
      src->i++;
    }
    dest->i++;
  }

  return len;
}

// Assembly:
testq %rdx, %rdx
je 0x2f5a
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x18(%rdi), %eax
movl 0x1c(%rdi), %ecx
cmpl %eax, %ecx
jae 0x2f53
movl 0x1c(%rsi), %r8d
cmpl 0x18(%rsi), %r8d
jae 0x2f53
movq %r8, %r10
shlq $0x4, %r10
movq 0x10(%rsi), %r11
movq 0x20(%rsi), %rbx
movq 0x8(%r11,%r10), %r9
subq %rbx, %r9
cmpq %rdx, %r9
cmovaeq %rdx, %r9
leaq (%r9,%rbx), %r14
addq (%r11,%r10), %rbx
movq 0x10(%rdi), %r15
movl %ecx, %r12d
shlq $0x4, %r12
movq %rbx, (%r15,%r12)
movq %r9, 0x8(%r15,%r12)
movq %r14, 0x20(%rsi)
cmpq 0x8(%r11,%r10), %r14
jne 0x2f46
movq $0x0, 0x20(%rsi)
incl %r8d
movl %r8d, 0x1c(%rsi)
movl 0x1c(%rdi), %ecx
subq %r9, %rdx
incl %ecx
movl %ecx, 0x1c(%rdi)
testq %rdx, %rdx
jne 0x2ee1
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/./iovec_cursor.h
// Function: iovec_cursor_get
static void MAYBEUNUSED
iovec_cursor_get(struct iovec *iov, struct iovec_cursor *c, size_t len) {
  assert(!iovec_cursor_full(c));

  size_t count = c->iov[c->i].iov_len - c->j;
  if (count > len) count = len;

  iov->iov_base = c->iov[c->i].iov_base + c->j;
  iov->iov_len = count;
  c->j += count;
  if (c->j == c->iov[c->i].iov_len) {
    c->j = 0;
    c->i++;
  }
}

// Assembly:
movl 0x1c(%rsi), %eax
cmpl 0x18(%rsi), %eax
je 0x2fab
movq %rax, %rcx
shlq $0x4, %rcx
movq 0x10(%rsi), %r8
movq 0x20(%rsi), %r9
movq 0x8(%r8,%rcx), %r10
subq %r9, %r10
cmpq %rdx, %r10
cmovaeq %rdx, %r10
movq (%r8,%rcx), %rdx
addq %r9, %rdx
movq %rdx, (%rdi)
movq %r10, 0x8(%rdi)
addq %r9, %r10
movq %r10, 0x20(%rsi)
cmpq 0x8(%r8,%rcx), %r10
jne 0x2faa
movq $0x0, 0x20(%rsi)
incl %eax
movl %eax, 0x1c(%rsi)
retq
pushq %rax
leaq 0x4221(%rip), %rdi      # 0x71d4
leaq 0x4230(%rip), %rsi      # 0x71ea
leaq 0x423a(%rip), %rcx      # 0x71fb
movl $0x76, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: obstcp_accum_commit
ssize_t EXPORTED
obstcp_accum_commit(struct obstcp_accum *ac, ssize_t bytes) {
  struct obstcp_accum_buffer *ab = NULL;
  uint8_t c, next;
  ssize_t used = 0;

  if (bytes < 0) {
    errno = EINVAL;
    return -1;
  }

  for (c = ac->data_head; bytes && c != 0xff; c = next) {
    ab = &ac->buffers[c];

    if (ab->prefix_used < ab->prefix_len) {
      size_t a = ab->prefix_len - ab->prefix_used;
      if (a > bytes) a = bytes;
      ab->prefix_used += a;
      bytes -= a;
    }

    size_t a = ab->payload_len - ab->payload_used;
    if (a > bytes) a = bytes;
    ab->payload_used += a;
    bytes -= a;
    used += a;

    next = ab->next;

    if (ab->payload_len == ab->payload_used &&
        ab->prefix_len == ab->prefix_used) {

      ac->data_head = ab->next;
      if (ac->data_head == 0xff) ac->data_tail = 0xff;

      ab->next = ac->free_head;
      ac->free_head = c;
    }
  }

  // The user has claimed to have written more bytes than we've ever given
  // them.
  if (bytes) {
    errno = EINVAL;
    return -1;
  }

  return used;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rsi, %rsi
js 0x30a2
movb 0x1bb(%rdi), %dl
setne %r8b
cmpb $-0x1, %dl
setne %al
andb %r8b, %al
cmpb $0x1, %al
jne 0x309b
leaq 0xa(%rdi), %rcx
xorl %eax, %eax
movzbl %dl, %r8d
leaq (%r8,%r8,8), %r8
leaq (%rcx,%r8,8), %r8
movb 0x5(%r8), %r9b
movzbl 0x4(%r8), %r10d
cmpb %r10b, %r9b
jae 0x302e
movzbl %r9b, %r11d
movq %r10, %rbx
subq %r11, %rbx
cmpq %rsi, %rbx
cmovaeq %rsi, %rbx
addl %ebx, %r9d
movb %r9b, 0x5(%r8)
subq %rbx, %rsi
movzwl (%r8), %r14d
movzwl 0x2(%r8), %ebx
movq %r14, %r11
subq %rbx, %r11
cmpq %rsi, %r11
cmovaeq %rsi, %r11
leal (%r11,%rbx), %ebp
movw %bp, 0x2(%r8)
movb 0x6(%r8), %bl
cmpw %bp, %r14w
jne 0x307f
cmpb %r9b, %r10b
jne 0x307f
movb %bl, 0x1bb(%rdi)
cmpb $-0x1, %bl
jne 0x306e
movb $-0x1, 0x1bc(%rdi)
movb 0x1ba(%rdi), %r9b
movb %r9b, 0x6(%r8)
movb %dl, 0x1ba(%rdi)
subq %r11, %rsi
addq %r11, %rax
testq %rsi, %rsi
setne %r8b
je 0x309d
movl %ebx, %edx
cmpb $-0x1, %bl
jne 0x2ff9
jmp 0x309d
xorl %eax, %eax
testb %r8b, %r8b
je 0x30b4
callq 0x1050
movl $0x16, (%rax)
movq $-0x1, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/./varbuf.h
// Function: varbuf_copy_in
static int MAYBEUNUSED
varbuf_copy_in(struct varbuf *vb, const uint8_t *buffer, size_t len) {
  off_t j = 0;

  if (vb->tail) {
    size_t remaining = vb->tail->length - vb->tail->used;
    if (remaining > len)
      remaining = len;

    memcpy(vb->tail->data + vb->tail->used, buffer, remaining);
    vb->tail->used += remaining;
    j += remaining;
    len -= remaining;
  }

  if (len) {
    size_t alloc = len;
    if (alloc < VARBUF_CHUNK_SIZE)
      alloc = VARBUF_CHUNK_SIZE;

    struct chunk *const chunk = malloc(sizeof(struct chunk) + alloc);
    if (!chunk) {
      errno = ENOMEM;
      return -1;
    }

    chunk->length = alloc;
    chunk->used = len;
    chunk->read = 0;
    chunk->next = NULL;
    chunk->prev = vb->tail;
    if (vb->tail) {
      vb->tail->next = chunk;
      vb->tail = chunk;
    } else {
      vb->tail = vb->head = chunk;
    }

    memcpy(chunk->data, buffer + j, len);
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rax
xorl %r12d, %r12d
testq %rax, %rax
je 0x347b
movq (%rax), %r13
movq 0x8(%rax), %rcx
subq %rcx, %r13
cmpq %rbx, %r13
cmovaeq %rbx, %r13
leaq (%rax,%rcx), %rdi
addq $0x28, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x10b0
movq 0x8(%r15), %rbp
addq %r13, 0x8(%rbp)
subq %r13, %rbx
jmp 0x3480
xorl %ebp, %ebp
xorl %r13d, %r13d
testq %rbx, %rbx
je 0x34f5
cmpq $0x101, %rbx            # imm = 0x101
movl $0x100, %r12d           # imm = 0x100
cmovaeq %rbx, %r12
leaq 0x28(%r12), %rdi
callq 0x10c0
testq %rax, %rax
je 0x34e4
movq %r12, (%rax)
movq %rbx, 0x8(%rax)
xorl %r12d, %r12d
movq %r12, 0x10(%rax)
movq %r12, 0x20(%rax)
movq %rbp, 0x18(%rax)
leaq 0x20(%rbp), %rcx
testq %rbp, %rbp
cmoveq %r15, %rcx
movq %rax, (%rcx)
movq %rax, 0x8(%r15)
addq $0x28, %rax
addq %r13, %r14
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x10b0
jmp 0x34f5
callq 0x1050
movl $0xc, (%rax)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: read_wrapper
static ssize_t
read_wrapper(void *ctx, uint8_t *buffer, size_t len) {
  intptr_t fd = (intptr_t) ctx;
  ssize_t n;

  do {
    n = read(fd, buffer, len);
  } while (n == -1 && errno == EINTR);

  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1090
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x3551
callq 0x1050
cmpl $0x4, (%rax)
je 0x3530
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/./iovec_cursor.h
// Function: iovec_cursor_get_
static int MAYBEUNUSED
iovec_cursor_get_(void *arg, struct iovec *iov, size_t n) {
  struct iovec_cursor *c = arg;

  if (c->i == c->count)
    return 0;

  size_t todo = c->iov[c->i].iov_len - c->j;
  if (todo > n)
    todo = n;

  iov->iov_base = c->iov[c->i].iov_base + c->j;
  iov->iov_len = todo;

  c->j += todo;
  if (c->j == c->iov[c->i].iov_len) {
    c->j = 0;
    c->i++;
  }

  return 1;
}

// Assembly:
movl 0x1c(%rdi), %ecx
xorl %eax, %eax
cmpl 0x18(%rdi), %ecx
je 0x35c7
movq %rcx, %r8
shlq $0x4, %r8
movq 0x10(%rdi), %r9
movq 0x20(%rdi), %rax
movq 0x8(%r9,%r8), %r10
subq %rax, %r10
cmpq %rdx, %r10
cmovaeq %rdx, %r10
movq (%r9,%r8), %rdx
addq %rax, %rdx
movq %rdx, (%rsi)
movq %r10, 0x8(%rsi)
addq %rax, %r10
movq %r10, 0x20(%rdi)
movl $0x1, %eax
cmpq 0x8(%r9,%r8), %r10
jne 0x35c7
movq $0x0, 0x20(%rdi)
incl %ecx
movl %ecx, 0x1c(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/./iovec_cursor.h
// Function: iovec_cursor_fold
static int MAYBEUNUSED
iovec_cursor_fold(void *arg, int (*f) (void *, uint8_t *, size_t len), void *ctx) {
  struct iovec_cursor *c = arg;
  int r;
  unsigned i;

  for (i = c->i; i < c->count; ++i) {
    if (i == c->i) {
      r = f(ctx, c->iov[i].iov_base + c->j, c->iov[i].iov_len - c->j);
    } else {
      r = f(ctx, c->iov[i].iov_base, c->iov[i].iov_len);
    }

    if (r)
      return r;
  }

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x1c(%rdi), %r12d
cmpl 0x18(%rdi), %r12d
jae 0x362f
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %r12, %r13
shlq $0x4, %r13
orq $0x8, %r13
movl 0x1c(%r15), %ecx
movq 0x10(%r15), %rax
movq -0x8(%rax,%r13), %rsi
cmpq %rcx, %r12
jne 0x3611
movq 0x20(%r15), %rcx
addq %rcx, %rsi
movq (%rax,%r13), %rdx
subq %rcx, %rdx
jmp 0x3615
movq (%rax,%r13), %rdx
movq %rbx, %rdi
callq *%r14
testl %eax, %eax
jne 0x3631
incq %r12
movl 0x18(%r15), %eax
addq $0x10, %r13
cmpq %rax, %r12
jb 0x35ef
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/libobstcp.c
// Function: xor
static void
xor(uint8_t *dst, const uint8_t *src, const uint8_t *xorbytes, unsigned l) {
  const unsigned words = l >> 2;
  const unsigned bytes = l & 3;
  uint32_t *dst32 = (uint32_t *) dst;
  const uint32_t *src32 = (uint32_t *) src;
  const uint32_t *xorbytes32 = (uint32_t *) xorbytes;
  unsigned i;

  for (i = 0; i < words; ++i) {
    dst32[i] = src32[i] ^ xorbytes32[i];
  }

  for (i = 0; i < bytes; ++i) {
    dst[words * 4 + i] = src[words * 4 + i] ^ xorbytes[words * 4 + i];
  }
}

// Assembly:
movl %ecx, %eax
andl $0x3, %eax
cmpl $0x4, %ecx
jb 0x3663
movl %ecx, %r8d
shrl $0x2, %r8d
xorl %r9d, %r9d
movl (%rdx,%r9,4), %r10d
xorl (%rsi,%r9,4), %r10d
movl %r10d, (%rdi,%r9,4)
incq %r9
cmpq %r9, %r8
jne 0x364f
testl %eax, %eax
je 0x368b
andl $-0x4, %ecx
movl %eax, %eax
addq %rcx, %rsi
addq %rcx, %rdx
addq %rcx, %rdi
xorl %ecx, %ecx
movb (%rdx,%rcx), %r8b
xorb (%rsi,%rcx), %r8b
movb %r8b, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x3677
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/./varbuf.h
// Function: varbuf_cursor_fold
static int MAYBEUNUSED
varbuf_cursor_fold(void *arg, int (*f) (void *, uint8_t *, size_t), void *ctx) {
  struct varbuf_cursor *c = arg;
  int r;

  const struct chunk *chunk = c->chunk;
  while (chunk) {
    r = f(ctx, (uint8_t *) chunk->data + c->chunk->read, chunk->used - c->chunk->read);
    if (r)
      return r;
    chunk = chunk->next;
  }

  if (c->used - c->read) {
    r = f(ctx, c->extra, c->used - c->read);
  } else {
    r = 0;
  }

  return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0x3745
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
leaq (%r15,%rax), %rsi
addq $0x28, %rsi
movq 0x8(%r15), %rdx
subq %rax, %rdx
movq %rbx, %rdi
callq *%r12
testl %eax, %eax
jne 0x3751
movq 0x20(%r15), %r15
jmp 0x3719
movq 0x28(%r14), %rdx
xorl %eax, %eax
subq 0x18(%r14), %rdx
jne 0x375d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x20(%r14), %rsi
movq %rbx, %rdi
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/sha256.c
// Function: sha256_update
void
sha256_update(struct sha256_ctx *md, const uint8_t *in, unsigned inlen) {
  unsigned n;
  unsigned block_size = sizeof(md->buf);

  if (md->curlen > block_size) return;

  while (inlen > 0) {
    if (md->curlen == 0 && inlen >= block_size) {
      sha256_transform(md->state, (uint8_t *)in);
      md->length += block_size * 8;
      in             += block_size;
      inlen          -= block_size;
    } else {
      n = MIN(inlen, (block_size - md->curlen));
      memcpy(md->buf + md->curlen, in, (size_t)n);
      md->curlen += n;
      in             += n;
      inlen          -= n;
      if (md->curlen == block_size) {
        sha256_transform(md->state, md->buf);
        md->length += block_size * 8;
        md->curlen = 0;
      }
    }
  }
}

// Assembly:
cmpl $0x41, 0x28(%rdi)
setae %al
testl %edx, %edx
sete %cl
orb %al, %cl
jne 0x3cc1
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2c(%rdi), %r12
leaq 0x8(%rdi), %r13
movl 0x28(%r15), %edi
testq %rdi, %rdi
setne %al
cmpl $0x40, %ebx
setb %cl
orb %al, %cl
jne 0x3c67
movq %r13, %rdi
movq %r14, %rsi
callq 0x3cc2
addq $0x200, (%r15)          # imm = 0x200
addq $0x40, %r14
addl $-0x40, %ebx
jmp 0x3caf
movl $0x40, %ebp
subl %edi, %ebp
cmpl %ebp, %ebx
cmovbl %ebx, %ebp
addq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x10b0
movl %ebp, %eax
addl 0x28(%r15), %eax
subl %ebp, %ebx
movl %eax, 0x28(%r15)
addq %rbp, %r14
cmpl $0x40, %eax
jne 0x3caf
movq %r13, %rdi
movq %r12, %rsi
callq 0x3cc2
addq $0x200, (%r15)          # imm = 0x200
movl $0x0, 0x28(%r15)
testl %ebx, %ebx
jne 0x3c38
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/sha256.c
// Function: sha256_final
void
sha256_final(struct sha256_ctx *md, uint8_t *out) {
  unsigned i;

  if (md->curlen >= sizeof(md->buf)) return;

  /* increase the length of the message */
  md->length += md->curlen * 8;

  /* append the '1' bit */
  md->buf[md->curlen++] = (uint8_t)0x80;

  /* if the length is currently above 56 bytes we append zeros
   * then compress.  Then we can fall back to padding zeros and length
   * encoding like normal.
   */
  if (md->curlen > 56) {
    while (md->curlen < 64) {
      md->buf[md->curlen++] = (uint8_t)0;
    }
    sha256_transform(md->state, md->buf);
    md->curlen = 0;
  }

  /* pad upto 56 bytes of zeroes */
  while (md->curlen < 56) {
    md->buf[md->curlen++] = (uint8_t)0;
  }

  /* store length */
  put64_msb(md->length, md->buf + 56);
  sha256_transform(md->state, md->buf);

  /* copy output */
  for (i = 0; i < 8; i += 2) {
    put32_msb(md->state[i], out + (4 * i));
    put32_msb(md->state[i + 1], out + (4 * (i + 1)));
  }
}

// Assembly:
movl 0x28(%rdi), %eax
cmpq $0x3f, %rax
ja 0x5790
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rax,8), %rcx
addq %rcx, (%rdi)
leaq 0x2c(%rdi), %r15
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%rdi)
movb $-0x80, 0x2c(%rdi,%rax)
cmpl $0x38, %eax
jb 0x571d
cmpl $0x3f, %eax
je 0x570d
leaq (%r14,%rax), %rdi
addq $0x2d, %rdi
movl $0x3f, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x1080
movl $0x40, 0x28(%r14)
leaq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x3cc2
xorl %ecx, %ecx
jmp 0x5722
cmpl $0x37, %eax
je 0x5742
movl %ecx, %eax
leaq (%r14,%rax), %rdi
addq $0x2c, %rdi
movl $0x38, %edx
subl %ecx, %edx
xorl %esi, %esi
callq 0x1080
movl $0x38, 0x28(%r14)
movq (%r14), %rax
movq %rax, %rcx
shrq $0x20, %rcx
bswapl %eax
bswapl %ecx
movl %ecx, 0x64(%r14)
movl %eax, 0x68(%r14)
leaq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x3cc2
movq $-0x2, %rax
movl 0x10(%r14,%rax,4), %ecx
bswapl %ecx
movl %ecx, 0x8(%rbx,%rax,4)
movl 0x14(%r14,%rax,4), %ecx
bswapl %ecx
movl %ecx, 0xc(%rbx,%rax,4)
addq $0x2, %rax
cmpq $0x6, %rax
jb 0x576b
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/base32.c
// Function: base32_decode
int
base32_decode(uint8_t *output, const char *in, unsigned inlen) {
  unsigned i = 0, j = 0;
  unsigned v = 0, bits = 0;

  while (j < inlen) {
    if (in[j] & 0x80)
      goto PROTO;
    const uint8_t b = kValues[(int) in[j++]];
    if (b > 31)
      goto PROTO;

    v |= ((unsigned) b) << bits;
    bits += 5;

    if (bits >= 8) {
      output[i++] = v;
      bits -= 8;
      v >>= 8;
    }
  }

  return 1;

 PROTO:
  errno = EPROTO;
  return 0;
}

// Assembly:
movl $0x1, %eax
testl %edx, %edx
je 0x5809
pushq %rbx
movl %edx, %edx
xorl %r8d, %r8d
leaq 0x1aaf(%rip), %r9       # 0x7260
xorl %ecx, %ecx
xorl %ebx, %ebx
xorl %r10d, %r10d
movsbq (%rsi,%r8), %r11
testq %r11, %r11
js 0x57fb
movzbl (%r11,%r9), %r11d
cmpl $0x1f, %r11d
ja 0x57fb
shll %cl, %r11d
orl %ebx, %r11d
cmpl $0x3, %ecx
jb 0x57eb
movl %r10d, %ebx
incl %r10d
movb %r11b, (%rdi,%rbx)
addl $-0x3, %ecx
shrl $0x8, %r11d
jmp 0x57ee
addl $0x5, %ecx
incq %r8
movl %r11d, %ebx
cmpq %r8, %rdx
jne 0x57b8
jmp 0x5808
callq 0x1050
movl $0x47, (%rax)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/agl[P]obstcp/base32.c
// Function: base32_encode
void
base32_encode(char *output, const uint8_t *in, unsigned inlen) {
  unsigned i = 0, j = 0;
  unsigned v = 0, bits = 0;
  static const char kChars[] = "0123456789bcdfghjklmnpqrstuvwxyz";

  while (j < inlen) {
    v |= ((unsigned) in[j++]) << bits;
    bits += 8;

    while (bits >= 5) {
      output[i++] = kChars[v & 31];
      bits -= 5;
      v >>= 5;
    }
  }

  if (bits)
    output[i++] = kChars[v];
}

// Assembly:
testl %edx, %edx
je 0x587c
pushq %rbx
movl %edx, %r8d
xorl %r10d, %r10d
leaq 0x1aaf(%rip), %rax      # 0x72e0
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r9d, %r9d
movzbl (%rsi,%r10), %r11d
shll %cl, %r11d
orl %r11d, %edx
orl $0x8, %ecx
movl %edx, %r11d
andl $0x1f, %r11d
movb (%r11,%rax), %r11b
movl %r9d, %ebx
incl %r9d
movb %r11b, (%rdi,%rbx)
addl $-0x5, %ecx
shrl $0x5, %edx
cmpl $0x4, %ecx
ja 0x5846
incq %r10
cmpq %r8, %r10
jne 0x5838
testl %ecx, %ecx
popq %rbx
je 0x587c
movl %r9d, %ecx
movb (%rdx,%rax), %al
movb %al, (%rdi,%rcx)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/antonblanchard[P]will-it-scale/tests/lseek2.c
// Function: testcase_prepare
void testcase_prepare(unsigned long nr_tasks, unsigned long nr)
{
	char buf[BUFLEN];
	int fd = mkstemp(tmpfile);

	memset(buf, 0, sizeof(buf));
	assert(fd >= 0);
	assert(write(fd, buf, sizeof(buf)) == sizeof(buf));
	close(fd);
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
leaq 0x24ed(%rip), %rdi      # 0x5190
callq 0x21e0
movl %eax, %ebx
movq %rsp, %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x2140
testl %ebx, %ebx
js 0x2ce3
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebx, %edi
callq 0x20d0
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x2d02
movl %ebx, %edi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
jmp 0x2150
leaq 0x5ce(%rip), %rdi       # 0x32b8
leaq 0x5cf(%rip), %rsi       # 0x32c0
leaq 0x5d7(%rip), %rcx       # 0x32cf
movl $0x13, %edx
callq 0x2130
leaq 0x5fa(%rip), %rdi       # 0x3303
leaq 0x5b0(%rip), %rsi       # 0x32c0
leaq 0x5b8(%rip), %rcx       # 0x32cf
movl $0x14, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/antonblanchard[P]will-it-scale/tests/lseek2.c
// Function: testcase
void testcase(unsigned long long *iterations)
{
	int fd = open(tmpfile, O_RDWR);

	assert(fd >= 0);

	while (1) {
		lseek(fd, 0, SEEK_SET);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2462(%rip), %rdi      # 0x5190
movl $0x2, %esi
xorl %eax, %eax
callq 0x2220
testl %eax, %eax
js 0x2d50
movl %eax, %ebp
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2120
incq (%rbx)
jmp 0x2d40
leaq 0x561(%rip), %rdi       # 0x32b8
leaq 0x562(%rip), %rsi       # 0x32c0
leaq 0x5c9(%rip), %rcx       # 0x332e
movl $0x1c, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_unless
int test_unless() {
	size_t new_size = 0;
	const char document[] = 
		"xXx UNLESS @dne xXx\n"
		"<p>You should see this. 1/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS NOT @dne xXx\n"
		"<p>You should not see this. 1/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS @falsey xXx\n"
		"<p>You should see this. 2/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS NOT @falsey xXx\n"
		"<p>You should not see this. 2/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS @truthy xXx\n"
		"<p>You should not see this. 3/3</p>\n"
		"xXx ENDLESS xXx\n"
		"xXx UNLESS NOT @truthy xXx\n"
		"<p>You should see this. 3/3</p>\n"
		"xXx ENDLESS xXx\n";

	const char document_correct[] = "\n<p>You should see this. 1/3</p>\n"
		"\n<p>You should see this. 2/3</p>\n"
		"\n<p>You should see this. 3/3</p>\n";

	greshunkel_ctext *ctext = gshkl_init_context();
	gshkl_add_string(ctext, "truthy", "TRUE");
	gshkl_add_string(ctext, "falsey", "FALSE");
	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, document_correct);
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0x3ea4(%rip), %rsi      # 0x51e0
leaq 0x10(%rsp), %r14
movl $0x1bd, %edx            # imm = 0x1BD
movq %r14, %rdi
callq 0x1190
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
leaq 0x3cac(%rip), %rsi      # 0x500b
leaq 0x3cac(%rip), %rdx      # 0x5012
movq %rax, %rdi
callq 0x1f61
leaq 0x3ca2(%rip), %rsi      # 0x5017
leaq 0x3ca2(%rip), %rdx      # 0x501e
movq %r15, %rdi
callq 0x1f61
movl $0x1bc, %edx            # imm = 0x1BC
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24bc
movq %rax, %rbx
movq %r15, %rdi
callq 0x2457
leaq 0x3ff7(%rip), %rsi      # 0x53a0
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_template_include
int test_template_include() {
	size_t new_size = 0;
	const char document[] = "xXx SCREAM _include.html xXx";
	const char document_correct[] = 
"<p>This is a test include file with it's own context and strings and stuff.</p>\n"
"\n"
"    <li>This is a test. a</li>\n"
"    <li>This is a test. b</li>\n"
"    <li>This is a test. c</li>\n"
"    <li>This is a test. 1</li>\n"
"    <li>This is a test. 2</li>\n"
"    <li>This is a test. 3</li>";

	greshunkel_ctext *ctext = gshkl_init_context();
	gshkl_add_string(ctext, "TEST", "This is a test.");
	greshunkel_var loop_test = gshkl_add_array(ctext, "LOOP_TEST");

	gshkl_add_string_to_loop(&loop_test, "a");
	gshkl_add_string_to_loop(&loop_test, "b");
	gshkl_add_string_to_loop(&loop_test, "c");

	gshkl_add_int_to_loop(&loop_test, 1);
	gshkl_add_int_to_loop(&loop_test, 2);
	gshkl_add_int_to_loop(&loop_test, 3);

	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, document_correct);
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movups 0x402a(%rip), %xmm0     # 0x541d
leaq 0x10(%rsp), %r14
movups %xmm0, 0xd(%r14)
movaps 0x400c(%rip), %xmm0     # 0x5410
movaps %xmm0, (%r14)
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
leaq 0x3c83(%rip), %rsi      # 0x509c
leaq 0x3c04(%rip), %rdx      # 0x5024
movq %rax, %rdi
callq 0x1f61
leaq 0x3c68(%rip), %rdx      # 0x5097
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2167
leaq 0x3bee(%rip), %rsi      # 0x5034
movq %r12, %rdi
callq 0x2392
leaq 0x3c3c(%rip), %rsi      # 0x5091
movq %r12, %rdi
callq 0x2392
leaq 0x4de9(%rip), %rsi      # 0x624d
movq %r12, %rdi
callq 0x2392
movq %r12, %rdi
movl $0x1, %esi
callq 0x2232
movq %r12, %rdi
movl $0x2, %esi
callq 0x2232
movq %r12, %rdi
movl $0x3, %esi
callq 0x2232
movl $0x1c, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24bc
movq %rax, %rbx
movq %r15, %rdi
callq 0x2457
leaq 0x3f78(%rip), %rsi      # 0x5430
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_filters
int test_filters() {
	size_t new_size = 0;
	const char document[] = "<li>XxX return_z xXx @ONE xXx XxX XxX return_z XxX</li>";

	greshunkel_ctext *ctext = gshkl_init_context();
	gshkl_add_int(ctext, "ONE", 1);
	gshkl_add_filter(ctext, "return_z", &return_z, NULL);

	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, "<li>z z</li>");
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movaps 0x4061(%rip), %xmm0     # 0x5560
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x20(%r14)
movaps 0x4040(%rip), %xmm0     # 0x5550
movaps %xmm0, 0x10(%r14)
movaps 0x4024(%rip), %xmm0     # 0x5540
movaps %xmm0, (%r14)
movabsq $0x3e696c2f3c5878, %rax # imm = 0x3E696C2F3C5878
movq %rax, 0x30(%r14)
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
leaq 0x3af7(%rip), %rsi      # 0x5036
movq %rax, %rdi
movl $0x1, %edx
callq 0x206b
leaq 0x3ae7(%rip), %rsi      # 0x503a
leaq -0x24e(%rip), %rdx      # 0x130c
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x1ef6
movl $0x37, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24bc
movq %rax, %rbx
movq %r15, %rdi
callq 0x2457
leaq 0x3aba(%rip), %rsi      # 0x5043
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_subcontext_interpolation
int test_subcontext_interpolation() {
	size_t new_size = 0;
	const char document[] = 
		"xXx @image.name xXx\n"
		"xXx @image.id xXx";
	const char document_correct[] = "test_name\n1";

	greshunkel_ctext *ctext = gshkl_init_context();
	greshunkel_ctext *sub = gshkl_init_context();
	gshkl_add_string(sub, "name", "test_name");
	gshkl_add_int(sub, "id", 1);
	gshkl_add_sub_context(ctext, "image", sub);

	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, document_correct);
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movaps 0x47f2(%rip), %xmm0     # 0x6150
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps 0x47d1(%rip), %xmm0     # 0x6140
movaps %xmm0, (%r14)
movabsq $0x7858782064692e, %rax # imm = 0x7858782064692E
movq %rax, 0x1e(%r14)
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
xorl %eax, %eax
callq 0x1d48
movq %rax, %r12
leaq 0x36dc(%rip), %rsi      # 0x5078
leaq 0x36d0(%rip), %rdx      # 0x5073
movq %rax, %rdi
callq 0x1f61
leaq 0x374e(%rip), %rsi      # 0x5100
movq %r12, %rdi
movl $0x1, %edx
callq 0x206b
leaq 0x3709(%rip), %rsi      # 0x50cf
movq %r15, %rdi
movq %r12, %rdx
callq 0x1df6
movl $0x25, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24bc
movq %rax, %rbx
movq %r15, %rdi
callq 0x2457
leaq 0x36fe(%rip), %rsi      # 0x50f4
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/greshunkel_test.c
// Function: test_loop_in_unless
int test_loop_in_unless() {
	size_t new_size = 0;
	const char document[] =
		"xXx UNLESS NOT @errors xXx\n"
		"    xXx LOOP error errors xXx\n"
		"        xXx @error xXx\n"
		"    xXx BBL xXx\n"
		"xXx ENDLESS xXx\n";
	const char document_correct[] = "\n        1\n    \n        2\n    \n        3\n    \n";

	greshunkel_ctext *ctext = gshkl_init_context();
	greshunkel_var loop = gshkl_add_array(ctext, "errors");
	gshkl_add_string_to_loop(&loop, "1");
	gshkl_add_string_to_loop(&loop, "2");
	gshkl_add_string_to_loop(&loop, "3");

	char *rendered = gshkl_render(ctext, document, strlen(document), &new_size);
	gshkl_free_context(ctext);

	int ret = strcmp(rendered, document_correct);
	if (ret) {
		free(rendered);
		return 1;
	}

	free(rendered);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x290, %rsp            # imm = 0x290
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0x4731(%rip), %rsi      # 0x6170
leaq 0x10(%rsp), %r14
movl $0xe, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movb $0x0, 0x70(%r14)
xorl %eax, %eax
callq 0x1d48
movq %rax, %r15
leaq 0x369e(%rip), %rdx      # 0x5103
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x2167
leaq 0x367f(%rip), %rsi      # 0x50fe
movq %r12, %rdi
callq 0x2392
leaq 0x367c(%rip), %rsi      # 0x510a
movq %r12, %rdi
callq 0x2392
leaq 0x366f(%rip), %rsi      # 0x510c
movq %r12, %rdi
callq 0x2392
movl $0x70, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x24bc
movq %rax, %rbx
movq %r15, %rdi
callq 0x2457
leaq 0x4726(%rip), %rsi      # 0x61f0
movq %rbx, %rdi
callq 0x1170
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x290, %rsp            # imm = 0x290
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: gshkl_add_filter
int gshkl_add_filter(greshunkel_ctext *ctext,
		const char name[const],
		char *(*filter_func)(const char *argument),
		void (*clean_up)(char *filter_result)) {
	assert(name != NULL);

	greshunkel_filter new_filter = {
		.filter_func = filter_func,
		.clean_up = clean_up,
		.name = {0}
	};
	strncpy(new_filter.name, name, sizeof(new_filter.name) - 1);

	vector_append(ctext->filter_functions, &new_filter, sizeof(struct greshunkel_filter));
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
testq %rsi, %rsi
je 0x1f42
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq $0x0, 0x18(%r14)
movq %rdx, 0x20(%r14)
movq %rcx, 0x28(%r14)
movl $0x1f, %edx
movq %r14, %rdi
callq 0x1050
movq 0x8(%rbx), %rdi
movl $0x30, %edx
movq %r14, %rsi
callq 0x483b
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x480a(%rip), %rdi      # 0x6753
leaq 0x42ee(%rip), %rsi      # 0x623e
leaq 0x43cd(%rip), %rcx      # 0x6324
movl $0x68, %edx
callq 0x1110