LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/internal.c
// Function: xlink_log
void xlink_log(const char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);
  fprintf(stderr, "Error: ");
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "\n");
  va_end(ap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x7577
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x8a5a(%rip), %r15      # 0xfff8
movq (%r15), %rcx
leaq 0x3899(%rip), %rdi      # 0xae41
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x2200
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21c0
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x20f0
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/internal.c
// Function: xlink_malloc
void *xlink_malloc(size_t size) {
  void *ptr;
  ptr = malloc(size);
  XLINK_ERROR(ptr == NULL, ("Insufficient memory for %i byte malloc", size));
  memset(ptr, 0, size);
  return ptr;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x2100
testq %rax, %rax
je 0x75ef
popq %rbx
retq
leaq 0x3853(%rip), %rdi      # 0xae49
movq %rbx, %rsi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/io.c
// Function: xlink_file_init
void xlink_file_init(xlink_file *file, const char *name) {
  FILE *fp;
  int size;
  fp = fopen(name, "rb");
  XLINK_ERROR(fp == NULL, ("Could not open file %s", name));
  file->name = name;
  fseek(fp, 0, SEEK_END);
  file->size = ftell(fp);
  file->buf = xlink_malloc(file->size);
  fseek(fp, 0, SEEK_SET);
  size = fread((unsigned char *)file->buf, 1, file->size, fp);
  XLINK_ERROR(size != file->size,
   ("Problem reading file %s, got %i of %i bytes", name, size, file->size));
  fclose(fp);
  file->pos = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3852(%rip), %rsi      # 0xae98
movq %rbx, %rdi
callq 0x21b0
testq %rax, %rax
je 0x76b7
movq %rax, %r15
movq %rbx, (%r14)
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2180
movq %r15, %rdi
callq 0x2130
movl %eax, 0x8(%r14)
movl %eax, %edi
callq 0x75d9
movq %rax, 0x10(%r14)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2180
movq 0x10(%r14), %rdi
movl 0x8(%r14), %edx
pushq $0x1
popq %rsi
movq %r15, %rcx
callq 0x2080
movl 0x8(%r14), %ecx
cmpl %eax, %ecx
jne 0x76ca
movq %r15, %rdi
callq 0x2090
andl $0x0, 0xc(%r14)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x37dd(%rip), %rdi      # 0xae9b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x7514
jmp 0x76dd
leaq 0x37e1(%rip), %rdi      # 0xaeb2
movq %rbx, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_model_init
void xlink_model_init(xlink_model *model, unsigned char mask) {
  int i;
  model->mask = mask;
  /* For now just compute the weight as the number of bits set in mask */
  model->weight = 0;
  for (i = 0; i < 8; i++) {
    model->weight += !!(mask & (1 << i));
  }
}

// Assembly:
movb %sil, (%rdi)
xorl %eax, %eax
xorl %ecx, %ecx
cmpl $0x8, %ecx
je 0x7706
btl %ecx, %esi
adcl $0x0, %eax
incl %ecx
jmp 0x76f7
movl %eax, 0x4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_model_compute_packed_weights
unsigned int xlink_model_compute_packed_weights(xlink_list *models) {
  unsigned int packed;
  int i, j;
  int last;
  packed = 0xffffffffu;
  i = 0;
  last = 0;
  for (j = 0; j < xlink_list_length(models); j++, i++) {
    xlink_model *model;
    model = xlink_list_get(models, j);
    i += model->weight - last;
    XLINK_ERROR(i > 31, ("Invalid list of models, i = %i", i));
    packed &= ~(1 << (31 - i));
    last = model->weight;
  }
  return packed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $-0x1
popq %rbx
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x82d7
cmpl %eax, %ebp
jge 0x775d
movq %r14, %rdi
movl %ebp, %esi
callq 0x831b
movl 0x4(%rax), %eax
movl %eax, %ecx
subl %r12d, %ecx
addl %r15d, %ecx
cmpl $0x20, %ecx
jge 0x7768
movl $0x80000000, %edx       # imm = 0x80000000
shrl %cl, %edx
notl %edx
andl %edx, %ebx
incl %ebp
incl %ecx
movl %ecx, %r15d
movl %eax, %r12d
jmp 0x7720
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3791(%rip), %rdi      # 0xaf00
movl %ecx, %esi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_model_set_state
void xlink_model_set_state(xlink_list *models, unsigned int state) {
  int weight;
  int i;
  weight = 0;
  for (i = 0; state != 0; i++) {
    int test;
    xlink_model *model;
    weight--;
    do {
      weight++;
      test = state >= 0x80000000u;
      state += state;
    }
    while (test);
    if (state == 0) break;
    model = xlink_list_get(models, i);
    XLINK_ERROR(model->weight != weight,
     ("Mismatch when decoding model %02x weight: got %i expected %i",
     model->mask, weight, model->weight));
    model->state = state;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
pushq $-0x1
popq %rbx
xorl %ebp, %ebp
testl %r15d, %r15d
je 0x77c8
negl %ebx
movl %r15d, %eax
leal (%rax,%rax), %r15d
decl %ebx
testl %eax, %eax
js 0x7799
testl %r15d, %r15d
je 0x77c8
movq %r14, %rdi
movl %ebp, %esi
callq 0x831b
movl 0x4(%rax), %ecx
movl %ecx, %edx
addl %ebx, %edx
jne 0x77d3
notl %ebx
movl %r15d, 0x8(%rax)
incl %ebp
jmp 0x7792
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movzbl (%rax), %esi
negl %ebx
leaq 0x3740(%rip), %rdi      # 0xaf1f
movl %ebx, %edx
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: model_comp
int model_comp(const void *a, const void *b) {
  const xlink_model *mod_a;
  const xlink_model *mod_b;
  int mask_a;
  int mask_b;
  int i;
  mod_a = (xlink_model *)a;
  mod_b = (xlink_model *)b;
  /* Compute the bit-reversal of the mask */
  mask_a = mask_b = 0;
  for (i = 0; i < 8; i++) {
    mask_a <<= 1;
    mask_b <<= 1;
    mask_a |= !!(mod_a->mask & (1 << i));
    mask_b |= !!(mod_b->mask & (1 << i));
  }
  /* Sort on weights ascending, then bit-reversed mask */
  if (mod_a->weight == mod_b->weight) {
    return mask_a - mask_b;
  }
  return mod_a->weight - mod_b->weight;
}

// Assembly:
movzbl (%rdi), %eax
movzbl (%rsi), %r8d
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r9d, %r9d
cmpl $0x8, %r9d
je 0x7827
xorl %r10d, %r10d
btl %r9d, %eax
setb %r10b
leal (%r10,%rcx,2), %ecx
xorl %r10d, %r10d
btl %r9d, %r8d
setb %r10b
leal (%r10,%rdx,2), %edx
incl %r9d
jmp 0x77fe
movl 0x4(%rdi), %eax
subl %edx, %ecx
subl 0x4(%rsi), %eax
cmovel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: match_comp
int match_comp(const void *a, const void *b) {
  const xlink_match *mat_a;
  const xlink_match *mat_b;
  mat_a = (xlink_match *)a;
  mat_b = (xlink_match *)b;
  int i;
  if (mat_a->mask == mat_b->mask) {
    if (mat_a->partial == mat_b->partial) {
      for (i = 0; i < 8; i++) {
        if (mat_a->mask & (1 << (7 - i))) {
          if (mat_a->buf[i] == mat_b->buf[i]) {
            continue;
          }
          return mat_a->buf[i] - mat_b->buf[i];
        }
      }
      return 0;
    }
    return mat_a->partial - mat_b->partial;
  }
  return mat_a->mask - mat_b->mask;
}

// Assembly:
movzbl 0x5(%rdi), %ecx
movzbl 0x5(%rsi), %eax
cmpb %al, %cl
jne 0x7876
movzbl 0x4(%rdi), %eax
movzbl 0x4(%rsi), %edx
cmpb %dl, %al
jne 0x787b
pushq $0x7
popq %rdx
xorl %eax, %eax
xorl %r8d, %r8d
cmpq $0x8, %r8
je 0x787a
btl %edx, %ecx
jae 0x786f
movzbl 0x6(%rdi,%r8), %r9d
movzbl 0x6(%rsi,%r8), %r10d
cmpb %r10b, %r9b
jne 0x787e
incq %r8
decl %edx
jmp 0x7853
subl %eax, %ecx
movl %ecx, %eax
retq
subl %edx, %eax
retq
subl %r10d, %r9d
movl %r9d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: match_hash_code
unsigned int match_hash_code(const void *m) {
  const xlink_match *mat;
  unsigned int hash;
  int i;
  mat = (xlink_match *)m;
  hash = 0x0;
  /* Combine the mask */
  hash += mat->mask;
  hash *= 0x6f;
  hash ^= mat->mask;
  /* Combine the partial */
  hash += mat->partial;
  hash *= 0x6f;
  hash ^= mat->partial;
  /* Combine the history */
  for (i = 0; i < 8; i++) {
    if (mat->mask & (1 << (7 - i))) {
      hash += mat->buf[i];
      hash *= 0x6f;
      hash ^= mat->buf[i];
    }
  }
  /* Extra hashing for good measure */
  hash ^= (hash >> 20) ^ (hash >> 12);
  return hash ^ (hash >> 7) ^ (hash >> 4);
}

// Assembly:
movzbl 0x5(%rdi), %ecx
imull $0x6f, %ecx, %eax
xorl %ecx, %eax
movzbl 0x4(%rdi), %edx
addl %edx, %eax
imull $0x6f, %eax, %eax
xorl %edx, %eax
pushq $0x7
popq %rdx
xorl %esi, %esi
cmpq $0x8, %rsi
je 0x78d0
btl %edx, %ecx
jae 0x78c9
movzbl 0x6(%rdi,%rsi), %r8d
addl %r8d, %eax
imull $0x6f, %eax, %eax
xorl %r8d, %eax
incq %rsi
decl %edx
jmp 0x78af
movl %eax, %ecx
shrl $0x14, %ecx
movl %eax, %edx
shrl $0xc, %edx
xorl %ecx, %edx
xorl %eax, %edx
movl %edx, %ecx
shrl $0x7, %ecx
movl %edx, %eax
shrl $0x4, %eax
xorl %ecx, %eax
xorl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: match_hash_code_simple
unsigned int match_hash_code_simple(const void *m) {
  const xlink_match *mat;
  unsigned int hash;
  unsigned char byte;
  int i;
  mat = (xlink_match *)m;
  /* Use current weight state to salt the hash */
  hash = mat->salt;
  /* Combine the mask */
  hash = (hash & 0xffffff00) | mat->mask;
  /* Combine the partial */
  byte = (hash & 0x000000ff);
  hash = (hash & 0xffffff00) | (byte ^ mat->partial);
  hash = ((int)hash)*0x6f;
  byte = (hash & 0x000000ff);
  hash = (hash & 0xffffff00) | ((byte + mat->partial) & 0x000000ff);
  hash--;
  /* Combine the history */
  for (i = 0; i < 8; i++) {
    if (mat->mask & (1 << (7 - i))) {
      byte = (hash & 0x000000ff);
      hash = (hash & 0xffffff00) | (byte ^ mat->buf[i]);
      hash = ((int)hash)*0x6f;
      byte = (hash & 0x000000ff);
      hash = (hash & 0xffffff00) | ((byte + mat->buf[i]) & 0x000000ff);
      hash--;
    }
  }
  return hash;
}

// Assembly:
movl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movl (%rdi), %eax
andl %ecx, %eax
movzbl 0x5(%rdi), %edx
movb 0x4(%rdi), %sil
movl %esi, %r8d
xorb %dl, %r8b
movzbl %r8b, %r8d
orl %eax, %r8d
imull $0x6f, %r8d, %eax
movl %eax, %r8d
andl %ecx, %r8d
addb %sil, %al
movzbl %al, %eax
addl %r8d, %eax
decl %eax
pushq $0x7
popq %rsi
xorl %r8d, %r8d
movl $0xff, %r9d
cmpq $0x8, %r8
je 0x7967
btl %esi, %edx
jae 0x7960
movl %eax, %r10d
andl %ecx, %r10d
andl %r9d, %eax
movzbl 0x6(%rdi,%r8), %r11d
xorl %r11d, %eax
orl %r10d, %eax
imull $0x6f, %eax, %eax
movl %eax, %r10d
andl %ecx, %r10d
addl %r11d, %eax
andl %r9d, %eax
addl %r10d, %eax
decl %eax
incq %r8
decl %esi
jmp 0x792c
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: match_hash_code_fast
unsigned int match_hash_code_fast(const void *m) {
  const xlink_match *mat;
  unsigned int hash;
  unsigned char byte;
  int i;
  mat = (xlink_match *)m;
  /* Use current weight state to salt the hash */
  hash = mat->salt;
  /* Combine the mask */
  hash = (hash & 0xffffff00) | mat->mask;
  /* Combine the partial */
  byte = (hash & 0x000000ff);
  hash = (hash & 0xffffff00) | (byte ^ mat->partial);
  hash = xlink_rotate_left(hash, 9);
  byte = (hash & 0x000000ff);
  hash = (hash & 0xffffff00) | ((byte + mat->partial) & 0x000000ff);
  hash--;
  /* Combine the history */
  for (i = 0; i < 8; i++) {
    if (mat->mask & (1 << (7 - i))) {
      byte = (hash & 0x000000ff);
      hash = (hash & 0xffffff00) | (byte ^ mat->buf[i]);
      hash = xlink_rotate_left(hash, 9);
      byte = (hash & 0x000000ff);
      hash = (hash & 0xffffff00) | ((byte + mat->buf[i]) & 0x000000ff);
      hash--;
    }
  }
  return hash;
}

// Assembly:
movl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movl (%rdi), %eax
andl %ecx, %eax
movzbl 0x5(%rdi), %edx
movb 0x4(%rdi), %sil
movl %esi, %r8d
xorb %dl, %r8b
movzbl %r8b, %r8d
orl %eax, %r8d
roll $0x9, %r8d
movl %r8d, %eax
andl %ecx, %eax
addb %sil, %r8b
movzbl %r8b, %esi
addl %esi, %eax
decl %eax
pushq $0x7
popq %rsi
xorl %r8d, %r8d
cmpq $0x8, %r8
je 0x79d9
btl %esi, %edx
jae 0x79d2
movzbl %al, %r9d
andl %ecx, %eax
movzbl 0x6(%rdi,%r8), %r10d
xorl %r10d, %r9d
orl %eax, %r9d
roll $0x9, %r9d
movl %r9d, %eax
andl %ecx, %eax
addb %r10b, %r9b
movzbl %r9b, %r9d
addl %r9d, %eax
decl %eax
incq %r8
decl %esi
jmp 0x79a0
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_context_init
void xlink_context_init(xlink_context *ctx, xlink_list *models, int capacity,
 int fast, int clamp) {
  ctx->models = models;
  xlink_set_init(&ctx->matches, match_hash_code_simple, match_equals,
   sizeof(xlink_match), 0, 0.75);
  if (capacity > 0) {
    xlink_context_set_fixed_capacity(ctx, capacity);
  }
  if (fast) {
    ctx->matches.hash_code = match_hash_code_fast;
  }
  xlink_context_reset(ctx);
  ctx->clamp = clamp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r12d
movq %rdi, %r14
movq %rsi, 0x8(%rdi)
leaq 0x10(%rdi), %r15
leaq -0x10f(%rip), %rsi      # 0x78ed
leaq -0x17e(%rip), %rdx      # 0x7885
pushq $0x10
popq %rcx
movss 0x34d2(%rip), %xmm0     # 0xaee0
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x8635
testl %r12d, %r12d
jle 0x7a29
movq %r14, %rdi
movl %r12d, %esi
callq 0x7a4c
testl %ebp, %ebp
je 0x7a37
leaq -0xcc(%rip), %rax       # 0x7968
movq %rax, (%r15)
movq %r14, %rdi
callq 0x7a7b
movl %ebx, 0x68(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_context_set_fixed_capacity
void xlink_context_set_fixed_capacity(xlink_context *ctx, int capacity) {
  ctx->matches.equals = NULL;
  ctx->matches.load = 1.f;
  xlink_set_reset(&ctx->matches);
  xlink_set_resize(&ctx->matches, capacity);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
leaq 0x10(%rdi), %r14
andq $0x0, 0x18(%rdi)
movl $0x3f800000, 0x24(%rdi) # imm = 0x3F800000
movq %r14, %rdi
callq 0x86a9
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x86f1
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_context_get_counts
void xlink_context_get_counts(xlink_context *ctx, unsigned char partial,
 unsigned int counts[2]) {
  xlink_match key;
  int i;
  memcpy(key.buf, ctx->buf, sizeof(ctx->buf));
  key.partial = partial;
  counts[0] = counts[1] = 2;
  for (i = 0; i < xlink_list_length(ctx->models); i++) {
    xlink_model *model;
    xlink_match *match;
    model = xlink_list_get(ctx->models, i);
    key.mask = model->mask;
    key.salt = model->state;
    match = xlink_set_get(&ctx->matches, &key);
    if (match != NULL) {
      counts[0] += ((unsigned int)match->counts[0]) << model->weight;
      counts[1] += ((unsigned int)match->counts[1]) << model->weight;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdi), %rax
leaq 0x8(%rsp), %r15
movq %rax, 0x6(%r15)
movb %sil, 0x4(%r15)
movabsq $0x200000002, %rax      # imm = 0x200000002
movq %rax, (%rdx)
leaq 0x10(%rdi), %r12
xorl %ebp, %ebp
movq 0x8(%r14), %rdi
callq 0x82d7
cmpl %eax, %ebp
jge 0x7b1e
movq 0x8(%r14), %rdi
movl %ebp, %esi
callq 0x831b
movq %rax, %r13
movb (%rax), %al
movb %al, 0xd(%rsp)
movl 0x8(%r13), %eax
movl %eax, 0x8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x89e8
testq %rax, %rax
je 0x7b1a
movzbl 0xe(%rax), %edx
movb 0x4(%r13), %cl
shll %cl, %edx
addl %edx, (%rbx)
movzbl 0xf(%rax), %eax
movb 0x4(%r13), %cl
shll %cl, %eax
addl %eax, 0x4(%rbx)
incl %ebp
jmp 0x7ac8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_context_update_bit
void xlink_context_update_bit(xlink_context *ctx, unsigned char partial,
 int bit) {
  xlink_match key;
  int i;
  key.partial = partial;
  memcpy(key.buf, ctx->buf, sizeof(ctx->buf));
  for (i = 0; i < xlink_list_length(ctx->models); i++) {
    xlink_model *model;
    xlink_match *match;
    model = xlink_list_get(ctx->models, i);
    key.mask = model->mask;
    key.salt = model->state;
    match = xlink_set_get(&ctx->matches, &key);
    if (match == NULL) {
      memset(key.counts, 0, sizeof(key.counts));
      match = xlink_set_put(&ctx->matches, &key);
    }
    if (ctx->clamp) {
      match->counts[bit] = XLINK_MIN(255, match->counts[bit] + 1);
    }
    else {
      match->counts[bit] = match->counts[bit] + 1;
    }
    if (match->counts[1 - bit] > 1) {
      match->counts[1 - bit] >>= 1;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movb %sil, 0x4(%r14)
movq (%rdi), %rax
movq %rax, 0x6(%r14)
leaq 0x10(%rdi), %r15
movslq %edx, %r12
pushq $0x1
popq %r13
subq %r12, %r13
xorl %ebp, %ebp
movq 0x8(%rbx), %rdi
callq 0x82d7
cmpl %eax, %ebp
jge 0x7bdd
movq 0x8(%rbx), %rdi
movl %ebp, %esi
callq 0x831b
movb (%rax), %cl
movb %cl, 0xd(%rsp)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x89e8
testq %rax, %rax
jne 0x7ba4
andw $0x0, 0x16(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x8a75
movb 0xe(%rax,%r12), %cl
leal 0x1(%rcx), %edx
cmpb $-0x2, %cl
movzbl %dl, %ecx
movl %ecx, %edx
movl $0xff, %esi
cmovael %esi, %edx
cmpl $0x0, 0x68(%rbx)
cmovel %ecx, %edx
movb %dl, 0xe(%rax,%r12)
movb 0xe(%rax,%r13), %cl
cmpb $0x2, %cl
jb 0x7bd9
shrb %cl
movb %cl, 0xe(%rax,%r13)
incl %ebp
jmp 0x7b5e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_modeler_init
void xlink_modeler_init(xlink_modeler *mod, int bytes) {
  xlink_list_init(&mod->bytes, sizeof(unsigned char), bytes);
  xlink_list_init(&mod->counts, sizeof(xlink_counts), 8*bytes);
  xlink_set_init(&mod->matches, match_hash_code, match_equals,
   sizeof(xlink_match), 256*8*bytes, 0.75);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x1
popq %rsi
movl %ebx, %edx
callq 0x82a8
leaq 0x18(%r14), %rdi
leal (,%rbx,8), %edx
movl $0x200, %esi            # imm = 0x200
callq 0x82a8
addq $0x30, %r14
shll $0xb, %ebx
leaq -0x38c(%rip), %rsi      # 0x7896
leaq -0x3a4(%rip), %rdx      # 0x7885
pushq $0x10
popq %rcx
movss 0x32ac(%rip), %xmm0     # 0xaee0
movq %r14, %rdi
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8635
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/paq.c
// Function: xlink_modeler_print
void xlink_modeler_print(xlink_modeler *mod, xlink_list *models) {
  if (xlink_list_length(models) > 0) {
    double entropy;
    int bytes;
    int i;
    entropy = xlink_modeler_get_entropy(mod, models);
    entropy -= 8*(4 + xlink_list_length(models));
    bytes = ceil(entropy/8);
    printf("Found context: %i model(s), %0.3lf bits, %i bytes\n",
     xlink_list_length(models), entropy, bytes);
    for (i = 0; i < xlink_list_length(models); i++) {
      xlink_model *model;
      model = xlink_list_get(models, i);
      printf("(%02x, %i) ", model->mask, model->weight);
    }
    printf("\n");
    printf("Packed weights = %08x\n",
     xlink_model_compute_packed_weights(models));
  }
  else {
    printf("No context found.\n");
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x82d7
testl %eax, %eax
jle 0x80cb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7e39
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x82d7
leal 0x20(,%rax,8), %eax
cvtsi2sd %eax, %xmm0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x2eb5(%rip), %xmm0     # 0xaef8
mulsd %xmm1, %xmm0
callq 0x2210
cvttsd2si %xmm0, %ebp
movq %rbx, %rdi
callq 0x82d7
leaq 0x2fa0(%rip), %rdi      # 0xafff
movl %eax, %esi
movsd 0x8(%rsp), %xmm0
movl %ebp, %edx
movb $0x1, %al
callq 0x20c0
leaq 0x2fbb(%rip), %r14      # 0xb032
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x82d7
cmpl %eax, %ebp
jge 0x80a3
movq %rbx, %rdi
movl %ebp, %esi
callq 0x831b
movzbl (%rax), %esi
movl 0x4(%rax), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x20c0
incl %ebp
jmp 0x8079
pushq $0xa
popq %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x770a
leaq 0x2f84(%rip), %rdi      # 0xb03e
movl %eax, %esi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x20c0
leaq 0x2fa2(%rip), %rdi      # 0xb074
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_list_init
void xlink_list_init(xlink_list *list, size_t size, int capacity) {
  memset(list, 0, sizeof(xlink_list));
  list->size = size;
  list->capacity = capacity;
  list->data = xlink_malloc(list->size*list->capacity);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, 0x8(%rdi)
movl %edx, 0x14(%rdi)
movslq %edx, %rdi
imulq %rsi, %rdi
callq 0x75d9
movq %rax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_list_add
int xlink_list_add(xlink_list *list, const void *element) {
  xlink_list_expand_capacity(list, list->length + 1);
  list->length++;
  xlink_list_set(list, list->length - 1, element);
  return list->length;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %esi
incl %esi
callq 0x82e0
movl 0x10(%r14), %esi
leal 0x1(%rsi), %eax
movl %eax, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8348
movl 0x10(%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_list_add_all
int xlink_list_add_all(xlink_list *list, const void *elements, int length) {
  xlink_list_expand_capacity(list, list->length + length);
  memcpy(&list->data[list->length*list->size], elements, length*list->size);
  list->length += length;
  return list->length;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl 0x10(%rdi), %esi
addl %edx, %esi
callq 0x82e0
movslq 0x10(%r15), %rdi
movq 0x8(%r15), %rdx
imulq %rdx, %rdi
addq (%r15), %rdi
movslq %ebx, %rbx
imulq %rbx, %rdx
movq %r14, %rsi
callq 0x2140
addl 0x10(%r15), %ebx
movl %ebx, 0x10(%r15)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_list_append
int xlink_list_append(xlink_list *list, const xlink_list *elements) {
  XLINK_ERROR(list->size != elements->size,
   ("Cannot append elements with different size list = %i elements = %i",
   list->size, elements->size));
  return xlink_list_add_all(list, elements->data, elements->length);
}

// Assembly:
movq %rsi, %rax
movq 0x8(%rdi), %rsi
movq 0x8(%rax), %rdx
cmpq %rdx, %rsi
jne 0x8424
movq (%rax), %rsi
movl 0x10(%rax), %edx
jmp 0x83c4
pushq %rax
leaq 0x2cbd(%rip), %rdi      # 0xb0e9
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_list_insert
void xlink_list_insert(xlink_list *list, int index, const void *element) {
  XLINK_ERROR(index < 0 || index > list->length,
   ("Cannot insert element at position %i, length = %i", index, list->length));
  xlink_list_expand_capacity(list, list->length + 1);
  list->length++;
  if (list->length - 1 > index) {
    memmove(xlink_list_get(list, index + 1), xlink_list_get(list, index),
     list->size*(list->length - 1 - index));
  }
  xlink_list_set(list, index, element);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movl 0x10(%rdi), %edx
testl %esi, %esi
js 0x84b9
cmpl %ebx, %edx
jl 0x84b9
movq %rdi, %r15
incl %edx
movl %edx, %esi
callq 0x82e0
movl 0x10(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
cmpl %ebx, %eax
jle 0x84a1
leal 0x1(%rbx), %esi
movq %r15, %rdi
callq 0x831b
movq %rax, %r12
movq %r15, %rdi
movl %ebx, %esi
callq 0x831b
movl %ebx, %ecx
notl %ecx
addl 0x10(%r15), %ecx
movslq %ecx, %rdx
imulq 0x8(%r15), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x21a0
movq %r15, %rdi
movl %ebx, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8348
leaq 0x2c6c(%rip), %rdi      # 0xb12c
movl %ebx, %esi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_list_remove
void xlink_list_remove(xlink_list *list, int index) {
  XLINK_ERROR(index < 0 || index >= list->length,
   ("Cannot remove element at position %i, length = %i", index, list->length));
  list->length--;
  if (list->length > index) {
    memmove(xlink_list_get(list, index), xlink_list_get(list, index + 1),
     list->size*(list->length - index));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movl 0x10(%rdi), %edx
testl %esi, %esi
js 0x852c
cmpl %ebx, %edx
jle 0x852c
movq %rdi, %r14
decl %edx
movl %edx, 0x10(%rdi)
cmpl %ebx, %edx
jbe 0x8526
movq %r14, %rdi
movl %ebx, %esi
callq 0x831b
movq %rax, %r15
leal 0x1(%rbx), %esi
movq %r14, %rdi
callq 0x831b
movslq 0x10(%r14), %rdx
movslq %ebx, %rcx
subq %rcx, %rdx
imulq 0x8(%r14), %rdx
movq %r15, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x21a0
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2c2b(%rip), %rdi      # 0xb15e
movl %ebx, %esi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_list_swap
void xlink_list_swap(xlink_list *list, int i, int j) {
  XLINK_ERROR(i < 0 || i >= list->length || j < 0 || j >= list->length,
   ("Cannot swap elements at %i and %i, length = %i", i, j, list->length));
  if (i != j) {
    void *a, *b, *c;
    xlink_list_expand_capacity(list, list->length + 1);
    a = xlink_list_get(list, i);
    b = xlink_list_get(list, j);
    c = &list->data[list->length*list->size];
    memcpy(c, a, list->size);
    memcpy(a, b, list->size);
    memcpy(b, c, list->size);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movl 0x10(%rdi), %ecx
testl %esi, %esi
js 0x85de
cmpl %ebp, %ecx
jle 0x85de
testl %ebp, %ebp
js 0x85de
cmpl %r14d, %ecx
jle 0x85de
cmpl %ebp, %r14d
jne 0x8577
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
incl %ecx
movl %ecx, %esi
callq 0x82e0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x831b
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x831b
movq %rax, %r15
movslq 0x10(%rbx), %r12
movq 0x8(%rbx), %rdx
imulq %rdx, %r12
addq (%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2140
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2140
movq 0x8(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2140
leaq 0x2bab(%rip), %rdi      # 0xb190
movl %r14d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_set_init
void xlink_set_init(xlink_set *set, xlink_hash_code_func hash_code,
 xlink_equals_func equals, size_t value_size, int capacity, float load) {
  set->hash_code = hash_code;
  set->equals = equals;
  set->capacity = XLINK_MAX(4, capacity);
  set->load = load;
  set->table = xlink_malloc(set->capacity*sizeof(int));
  xlink_list_init(&set->entries, sizeof(xlink_entry), capacity);
  xlink_list_init(&set->values, value_size, capacity);
  xlink_set_reset(set);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdi, %rbx
movq %rsi, (%rdi)
cmpl $0x5, %r8d
pushq $0x4
popq %rdi
cmovgel %r8d, %edi
movq %rdx, 0x8(%rbx)
movl %edi, 0x10(%rbx)
movss %xmm0, 0x14(%rbx)
shlq $0x2, %rdi
callq 0x75d9
movq %rax, 0x18(%rbx)
leaq 0x28(%rbx), %rdi
pushq $0x8
popq %rsi
movl %ebp, %edx
callq 0x82a8
leaq 0x40(%rbx), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x82a8
movq 0x18(%rbx), %rdi
movslq 0x10(%rbx), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x20d0
andl $0x0, 0x50(%rbx)
andl $0x0, 0x38(%rbx)
andl $0x0, 0x20(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_set_resize
void xlink_set_resize(xlink_set *set, int capacity) {
  if (set->size == 0) {
    if (capacity < set->capacity) {
      set->capacity = capacity;
    }
    else {
      set->table = xlink_realloc(set->table, capacity*sizeof(int));
      memset(set->table, 0, capacity*sizeof(int));
      set->capacity = capacity;
    }
  }
  else {
    int *table;
    int i;
    table = xlink_malloc(capacity*sizeof(int));
    memset(table, 0, capacity*sizeof(int));
    i = set->capacity;
    set->capacity = capacity;
    while (i-- > 0) {
      int entry_index;
      entry_index = set->table[i];
      while (entry_index != 0) {
        xlink_entry *entry;
        int down;
        int index;
        entry = xlink_list_get(&set->entries, entry_index - 1);
        down = entry->down;
        index = xlink_set_index(set, entry->hash);
        entry->down = table[index];
        table[index] = entry_index;
        entry_index = down;
      }
    }
    free(set->table);
    set->table = table;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x0, 0x20(%rdi)
je 0x8782
movslq %ebp, %r13
leaq (,%r13,4), %r15
movq %r15, %rdi
callq 0x75d9
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20d0
movl 0x10(%rbx), %r12d
movl %r13d, 0x10(%rbx)
leaq 0x28(%rbx), %r15
movq 0x18(%rbx), %rdi
testl %r12d, %r12d
jle 0x8777
decq %r12
movl (%rdi,%r12,4), %r13d
testl %r13d, %r13d
je 0x8736
leal -0x1(%r13), %esi
movq %r15, %rdi
callq 0x831b
movq %rax, %rcx
movl (%rax), %eax
movl 0x4(%rcx), %esi
xorl %edx, %edx
divl 0x10(%rbx)
movslq %edx, %rax
movl (%r14,%rax,4), %edx
movl %edx, 0x4(%rcx)
movl %r13d, (%r14,%rax,4)
movl %esi, %r13d
jmp 0x8746
callq 0x2030
movq %r14, 0x18(%rbx)
jmp 0x87ae
cmpl %ebp, 0x10(%rbx)
jg 0x87ab
movq 0x18(%rbx), %rdi
movslq %ebp, %r14
shlq $0x2, %r14
movq %r14, %rsi
callq 0x7608
movq %rax, 0x18(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20d0
movl %ebp, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_set_add
void *xlink_set_add(xlink_set *set, const void *value) {
  xlink_entry entry;
  int index;
  if (set->size + 1 > set->capacity*set->load) {
    xlink_set_resize(set, set->capacity << 1);
  }
  entry.hash = set->hash_code(value);
  index = xlink_set_index(set, entry.hash);
  entry.down = set->table[index];
  XLINK_ERROR(
   xlink_list_length(&set->entries) != xlink_list_length(&set->values),
   ("Invalid xlink_set state, entries length = %i but values length = %i\n",
   xlink_list_length(&set->entries), xlink_list_length(&set->values)));
  xlink_list_add(&set->entries, &entry);
  xlink_list_add(&set->values, value);
  set->table[index] = xlink_list_length(&set->entries);
  set->size++;
  return xlink_list_get(&set->values, set->table[index] - 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x20(%rdi), %eax
incl %eax
cvtsi2ss %eax, %xmm0
movl 0x10(%rdi), %esi
cvtsi2ss %esi, %xmm1
mulss 0x14(%rdi), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x87ef
addl %esi, %esi
movq %rbx, %rdi
callq 0x86f1
movq %r14, %rdi
callq *(%rbx)
movl %eax, (%rsp)
xorl %edx, %edx
divl 0x10(%rbx)
movq 0x18(%rbx), %rax
movslq %edx, %r12
movl (%rax,%r12,4), %eax
movl %eax, 0x4(%rsp)
movl 0x38(%rbx), %esi
movl 0x50(%rbx), %edx
cmpl %edx, %esi
jne 0x8857
leaq 0x40(%rbx), %r15
leaq 0x28(%rbx), %rdi
movq %rsp, %rsi
callq 0x838e
movq %r15, %rdi
movq %r14, %rsi
callq 0x838e
movl 0x38(%rbx), %eax
movq 0x18(%rbx), %rcx
movl %eax, (%rcx,%r12,4)
incl 0x20(%rbx)
movl (%rcx,%r12,4), %esi
decl %esi
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x831b
leaq 0x2961(%rip), %rdi      # 0xb1bf
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/util.c
// Function: xlink_set_get
void *xlink_set_get(xlink_set *set, void *key) {
  unsigned int hash;
  int index;
  hash = set->hash_code(key);
  index = set->table[xlink_set_index(set, hash)];
  while (index != 0) {
    xlink_entry *entry;
    void *value;
    entry = xlink_list_get(&set->entries, index - 1);
    value = xlink_list_get(&set->values, index - 1);
    if (set->equals == NULL ||
     (entry->hash == hash && set->equals(key, value))) {
      return value;
    }
    index = entry->down;
  }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq %rsi, (%rsp)
movq %rsi, %rdi
callq *(%r14)
movl %eax, %ebp
xorl %edx, %edx
divl 0x10(%r14)
movslq %edx, %r13
shlq $0x2, %r13
addq 0x18(%r14), %r13
leaq 0x28(%r14), %r15
leaq 0x40(%r14), %r12
movl (%r13), %ebx
testl %ebx, %ebx
je 0x8a61
decl %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x831b
movq %rax, %r13
movq %r12, %rdi
movl %ebx, %esi
callq 0x831b
movq %rax, %rbx
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x8a63
cmpl %ebp, (%r13)
jne 0x8a5b
movq (%rsp), %rdi
movq %rbx, %rsi
callq *%rax
testl %eax, %eax
jne 0x8a63
addq $0x4, %r13
jmp 0x8a1b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: test_check_EOF
static int test_check_EOF(char *name, int expected) {
    BGZF *bgz = try_bgzf_open(name, "r", __func__);
    int eof;
    if (!bgz) return -1;
    eof = bgzf_check_EOF(bgz);
    if (eof != expected) {
        fprintf(stderr, "%s : Unexpected result %d from bgzf_check_EOF on %s; "
                "expected %d\n",
                __func__, eof, name, expected);
        bgzf_close(bgz);
        return -1;
    }

    return try_bgzf_close(&bgz, name, __func__, 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
leaq 0x71cce(%rip), %rsi     # 0x78296
leaq 0x6da91(%rip), %rdx     # 0x74060
callq 0x7d08
movq %rax, (%rsp)
pushq $-0x1
popq %rbx
testq %rax, %rax
je 0x6605
movq %rax, %r15
movq %rax, %rdi
callq 0xaf5d
cmpl %ebp, %eax
jne 0x6612
leaq 0x6da6a(%rip), %rdx     # 0x74060
movq %rsp, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x7d69
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x949c7(%rip), %rcx     # 0x9afe0
movq (%rcx), %rdi
leaq 0x6da4c(%rip), %rsi     # 0x7406f
leaq 0x6da36(%rip), %rdx     # 0x74060
movl %eax, %ecx
movq %r14, %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x4700
movq %r15, %rdi
callq 0xad16
jmp 0x6605
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_fopen
static FILE * try_fopen(const char *name, const char *mode) {
    FILE *f = fopen(name, mode);
    if (!f) {
        fprintf(stderr, "Couldn't open %s : %s\n", name, strerror(errno));
        return NULL;
    }
    return f;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x45a0
movq %rax, %rbx
testq %rax, %rax
je 0x7cd9
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x93300(%rip), %rax     # 0x9afe0
movq (%rax), %r15
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c353(%rip), %rsi     # 0x74049
movq %r15, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4700
jmp 0x7cd0
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_open
static BGZF * try_bgzf_open(const char *name, const char *mode,
                            const char *func) {
    BGZF * bgz = bgzf_open(name, mode);
    if (!bgz) {
        fprintf(stderr, "%s : Couldn't bgzf_open %s with mode %s : %s\n",
                func, name, mode, strerror(errno));
        return NULL;
    }
    return bgz;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
callq 0x8616
movq %rax, %r14
testq %rax, %rax
je 0x7d34
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x932a5(%rip), %rax     # 0x9afe0
movq (%rax), %r13
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c360(%rip), %rsi     # 0x740b1
movq %r13, %rdi
movq %r15, %rdx
movq %r12, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x4700
jmp 0x7d27
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_close
static int try_bgzf_close(BGZF **bgz, const char *name, const char *func, int expected_fail) {
    BGZF *to_close = *bgz;
    *bgz = NULL;
    if (bgzf_close(to_close) != 0) {
        if (!expected_fail)
            fprintf(stderr, "%s : bgzf_close failed on %s%s%s\n",
                    func, name,
                    errno ? " : " : "",
                    errno ? strerror(errno) : "");
        return -1;
    } else if (expected_fail) {
        fprintf(stderr, "%s : bgzf_close worked on %s, but expected failure\n",
                func, name);
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movq %rdx, %r14
movq %rsi, %rbx
movq (%rdi), %rax
andq $0x0, (%rdi)
movq %rax, %rdi
callq 0xad16
testl %eax, %eax
je 0x7de0
pushq $-0x1
popq %rbp
testl %r15d, %r15d
jne 0x7de7
movq 0x93244(%rip), %rax     # 0x9afe0
movq (%rax), %r15
callq 0x4050
movl (%rax), %edi
leaq 0x6ddb9(%rip), %r9      # 0x75b66
leaq 0x6c34d(%rip), %r12     # 0x74101
testl %edi, %edi
cmoveq %r9, %r12
je 0x7dc4
callq 0x4140
movq %rax, %r9
leaq 0x6c314(%rip), %rsi     # 0x740df
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x4700
jmp 0x7de7
xorl %ebp, %ebp
testl %r15d, %r15d
jne 0x7df2
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x931e7(%rip), %rax     # 0x9afe0
movq (%rax), %rdi
leaq 0x6c302(%rip), %rsi     # 0x74105
xorl %ebp, %ebp
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4700
jmp 0x7de7
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_read
static ssize_t try_bgzf_read(BGZF *fp, void *data, size_t length,
                             const char *name, const char *func) {
    ssize_t got = bgzf_read_small(fp, data, length);
    if (got < 0) {
        fprintf(stderr, "%s : Error from bgzf_read %s : %s\n",
                func, name, strerror(errno));
    }
    return got;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movslq 0x8(%rdi), %rcx
movslq 0x10(%rdi), %rax
subq %rax, %rcx
cmpq %rdx, %rcx
jle 0x7e57
addq 0x28(%r12), %rax
movq %rsi, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x43b0
addl %ebx, 0x10(%r12)
addq %rbx, 0x20(%r12)
jmp 0x7e65
movq %r12, %rdi
movq %rbx, %rdx
callq 0x9c15
movq %rax, %rbx
testq %rbx, %rbx
js 0x7e79
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x93160(%rip), %rax     # 0x9afe0
movq (%rax), %r12
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c2ad(%rip), %rsi     # 0x74143
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x4700
jmp 0x7e6a
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_fread
static ssize_t try_fread(FILE *in, void *buf, size_t len,
                         const char *func, const char *fname) {
    size_t got = fread(buf, 1, len, in);
    if (got == 0 && ferror(in)) {
        fprintf(stderr, "%s : Error reading from %s : %s\n",
                func, fname, strerror(errno));
        return -1;
    }
    return got;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %rax
movq %rdi, %r15
pushq $0x1
popq %rsi
movl $0x8000, %edx           # imm = 0x8000
movq %rax, %rdi
movq %r15, %rcx
callq 0x4790
testq %rax, %rax
jne 0x7ee2
movq %r15, %rdi
callq 0x4950
testl %eax, %eax
jne 0x7ee8
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x930f1(%rip), %rax     # 0x9afe0
movq (%rax), %r15
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c261(%rip), %rsi     # 0x74166
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x4700
pushq $-0x1
popq %rax
jmp 0x7ee2
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: compare_buffers
static int compare_buffers(const unsigned char *b1, const unsigned char *b2,
                           size_t l1, size_t l2,
                           const char *name1, const char *name2,
                           const char *func) {
    if (l1 != l2) {
        fprintf(stderr, "%s : EOF on %s\n", func, l1 < l2 ? name1 : name2);
        return -1;
    }
    if (memcmp(b1, b2, l1) != 0) {
        fprintf(stderr, "%s : difference between %s and %s\n",
                func, name1, name2);
        return -1;
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r9, %rbx
movq %r8, %r15
movq 0x20(%rsp), %r14
cmpq %rcx, %rdx
jne 0x7f45
callq 0x44c0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x7f69
popq %rbx
popq %r14
popq %r15
retq
movq 0x93094(%rip), %rax     # 0x9afe0
movq (%rax), %rdi
cmovbq %r15, %rbx
leaq 0x6c22d(%rip), %rsi     # 0x74187
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4700
jmp 0x7f8a
movq 0x93070(%rip), %rax     # 0x9afe0
movq (%rax), %rdi
leaq 0x6c21d(%rip), %rsi     # 0x74197
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4700
pushq $-0x1
popq %rax
jmp 0x7f3f
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_dopen
static BGZF * try_bgzf_dopen(const char *name, const char *mode,
                             const char *func) {
    BGZF *bgz = NULL;
    int fd = open(name, hfile_oflags(mode), 0666);
    if (fd < 0) {
        fprintf(stderr, "%s : Failed to open %s with mode %s : %s\n",
                func, name, mode, strerror(errno));
        return NULL;
    }

    bgz = bgzf_dopen(fd, mode);
    if (!bgz) {
        fprintf(stderr, "%s : bgzf_dopen failed on %s mode %s : %s\n",
                func, name, mode, strerror(errno));
        close(fd);
        return NULL;
    }

    return bgz;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xcab1
movq %r14, %rdi
movl %eax, %esi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x4320
testl %eax, %eax
js 0x7fda
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
callq 0x8aa4
movq %rax, %r15
testq %rax, %rax
je 0x8016
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x92fff(%rip), %rax     # 0x9afe0
movq (%rax), %r12
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c244(%rip), %rsi     # 0x7423b
leaq 0x6c1db(%rip), %rdx     # 0x741d9
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x4700
jmp 0x7fce
movq 0x92fc3(%rip), %rax     # 0x9afe0
movq (%rax), %r12
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c232(%rip), %rsi     # 0x74265
leaq 0x6c19f(%rip), %rdx     # 0x741d9
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x4700
movl %ebp, %edi
callq 0x49b0
jmp 0x7fce
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_hopen
static BGZF * try_bgzf_hopen(const char *name, const char *mode,
                          const char *func) {
    hFILE *hfp = hopen(name, mode);
    BGZF *bgz = NULL;

    if (!hfp) {
        fprintf(stderr, "%s : hopen failed on %s mode %s : %s\n",
                func, name, mode, strerror(errno));
        return NULL;
    }

    bgz = bgzf_hopen(hfp, mode);
    if (!bgz) {
        fprintf(stderr, "%s : bgzf_hopen failed on %s mode %s : %s\n",
                func, name, mode, strerror(errno));
        hclose_abruptly(hfp);
        return NULL;
    }

    return bgz;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
callq 0xd21b
testq %rax, %rax
je 0x809a
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8b43
movq %rax, %r12
testq %rax, %rax
je 0x80d6
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x92f3f(%rip), %rax     # 0x9afe0
movq (%rax), %r15
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c1d9(%rip), %rsi     # 0x74290
leaq 0x6c11b(%rip), %rdx     # 0x741d9
xorl %r12d, %r12d
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x4700
jmp 0x808d
movq 0x92f03(%rip), %rax     # 0x9afe0
movq (%rax), %r13
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c1c3(%rip), %rsi     # 0x742b6
leaq 0x6c0df(%rip), %rdx     # 0x741d9
xorl %r12d, %r12d
movq %r13, %rdi
movq %r14, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x4700
movq %r15, %rdi
callq 0xc9cc
jmp 0x808d
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_mt
static int try_bgzf_mt(BGZF *bgz, int nthreads, const char *func) {
    if (bgzf_mt(bgz, nthreads, 64) != 0) {
        fprintf(stderr, "%s : Error from bgzf_mt : %s\n",
                func, strerror(errno));
        return -1;
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
pushq $0x40
popq %rdx
callq 0xa62b
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x813c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x92e9d(%rip), %rax     # 0x9afe0
movq (%rax), %r14
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c188(%rip), %rsi     # 0x742e1
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4700
pushq $-0x1
popq %rax
jmp 0x8134
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_write
static ssize_t try_bgzf_write(BGZF *fp, const void *data, size_t length,
                              const char *name, const char *func) {
    ssize_t put = bgzf_write_small(fp, data, length);
    if (put < (ssize_t) length) {
        fprintf(stderr, "%s : %s %s : %s\n",
                func, put < 0 ? "Error writing to" : "Short write on",
                name, strerror(errno));
        return -1;
    }

    return put;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r12
testb $0x40, 0x3(%rdi)
je 0x81ae
movslq 0x10(%r12), %rdi
movl $0xff00, %eax           # imm = 0xFF00
subq %rdi, %rax
cmpq %r15, %rax
jbe 0x81ae
addq 0x28(%r12), %rdi
movq %r15, %rdx
callq 0x43b0
addl %r15d, 0x10(%r12)
jmp 0x81c1
movq %r12, %rdi
movq %r15, %rdx
callq 0xaae4
cmpq %r15, %rax
movq %rax, %r15
jl 0x81d0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x92e09(%rip), %rcx     # 0x9afe0
movq (%rcx), %r15
testq %rax, %rax
leaq 0x6c12c(%rip), %rax     # 0x74310
leaq 0x6c136(%rip), %r12     # 0x74321
cmovsq %rax, %r12
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x6c0fd(%rip), %rsi     # 0x742ff
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x4700
pushq $-0x1
popq %r15
jmp 0x81c1