LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x94be
testl %eax, %eax
jle 0x8728
xorl %r12d, %r12d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
xorl %r13d, %r13d
movl %r12d, 0x4(%rsp)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x9507
movl 0x4(%rax), %r12d
movl %r12d, %r15d
subl 0x4(%rsp), %r15d
addl %r13d, %r15d
cmpl $0x20, %r15d
jge 0x873e
movl $0x80000000, %eax       # imm = 0x80000000
movl %r15d, %ecx
shrl %cl, %eax
notl %eax
andl %eax, %ebp
incl %r14d
incl %r15d
movq %rbx, %rdi
callq 0x94be
movl %r15d, %r13d
cmpl %eax, %r14d
jl 0x86dd
jmp 0x872d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37eb(%rip), %rdi      # 0xbf30
movl %r15d, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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
testl %esi, %esi
je 0x87a0
movl %esi, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
negl %ebx
movl %ebp, %eax
leal (%rax,%rax), %ebp
decl %ebx
testl %eax, %eax
js 0x8773
testl %ebp, %ebp
je 0x87a0
movq %r14, %rdi
movl %r15d, %esi
callq 0x9507
movl 0x4(%rax), %ecx
movl %ecx, %edx
addl %ebx, %edx
jne 0x87ab
notl %ebx
movl %ebp, 0x8(%rax)
incl %r15d
jmp 0x8771
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movzbl (%rax), %esi
negl %ebx
leaq 0x3798(%rip), %rdi      # 0xbf4f
movl %ebx, %edx
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x884f
movzbl 0x4(%rdi), %eax
movzbl 0x4(%rsi), %edx
cmpb %dl, %al
jne 0x8854
movl $0x7, %edx
xorl %r8d, %r8d
btl %edx, %ecx
jae 0x8841
movzbl 0x6(%rdi,%r8), %eax
movzbl 0x6(%rsi,%r8), %r9d
cmpb %r9b, %al
jne 0x8857
incq %r8
decl %edx
cmpq $0x8, %r8
jne 0x882b
xorl %eax, %eax
retq
subl %eax, %ecx
movl %ecx, %eax
retq
subl %edx, %eax
retq
subl %r9d, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x7, %edx
xorl %esi, %esi
btl %edx, %ecx
jae 0x889b
movzbl 0x6(%rdi,%rsi), %r8d
addl %r8d, %eax
imull $0x6f, %eax, %eax
xorl %r8d, %eax
incq %rsi
decl %edx
cmpq $0x8, %rsi
jne 0x8887
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_O3/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
movl $0x7, %esi
xorl %r8d, %r8d
btl %esi, %edx
jae 0x89a4
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
cmpq $0x8, %r8
jne 0x8978
retq
// File: /workspace/github_c_makefile_star2_O3/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      # 0x88c3
leaq -0x17e(%rip), %rdx      # 0x885b
movss 0x352f(%rip), %xmm0     # 0xbf10
movl $0x10, %ecx
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x9867
testl %r12d, %r12d
jle 0x8a19
movq $0x0, 0x18(%r14)
movl $0x3f800000, 0x24(%r14) # imm = 0x3F800000
movq %r15, %rdi
callq 0x9919
movq %r15, %rdi
movl %r12d, %esi
callq 0x9964
testl %ebp, %ebp
je 0x8a27
leaq -0xe6(%rip), %rax       # 0x893e
movq %rax, (%r15)
movq $0x0, (%r14)
movq %r15, %rdi
callq 0x9919
movl %ebx, 0x68(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq $0x0, 0x18(%rdi)
movl $0x3f800000, 0x24(%rdi) # imm = 0x3F800000
movq %r14, %rdi
callq 0x9919
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9964
// File: /workspace/github_c_makefile_star2_O3/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
movq %rax, 0xe(%rsp)
movb %sil, 0xc(%rsp)
movabsq $0x200000002, %rax      # imm = 0x200000002
movq %rax, (%rdx)
movq 0x8(%rdi), %rdi
callq 0x94be
testl %eax, %eax
jle 0x8b28
leaq 0x10(%r14), %r15
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movq 0x8(%r14), %rdi
movl %ebp, %esi
callq 0x9507
movq %rax, %r13
movb (%rax), %al
movb %al, 0xd(%rsp)
movl 0x8(%r13), %eax
movl %eax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9c8e
testq %rax, %rax
je 0x8b19
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
movq 0x8(%r14), %rdi
callq 0x94be
cmpl %eax, %ebp
jl 0x8ad4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl %edx, %ebp
movq %rdi, %rbx
movb %sil, 0xc(%rsp)
movq (%rdi), %rax
movq %rax, 0xe(%rsp)
movq 0x8(%rdi), %rdi
callq 0x94be
testl %eax, %eax
jle 0x8bfd
leaq 0x10(%rbx), %r14
movslq %ebp, %r12
movl $0x1, %r13d
subq %r12, %r13
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
movq 0x8(%rbx), %rdi
movl %ebp, %esi
callq 0x9507
movb (%rax), %cl
movb %cl, 0xd(%rsp)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9c8e
testq %rax, %rax
jne 0x8bb9
movw $0x0, 0x16(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9d24
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 0x8bee
shrb %cl
movb %cl, 0xe(%rax,%r13)
incl %ebp
movq 0x8(%rbx), %rdi
callq 0x94be
cmpl %eax, %ebp
jl 0x8b7f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %esi
movl %ebx, %edx
callq 0x948c
leaq 0x18(%r14), %rdi
leal (,%rbx,8), %edx
movl $0x200, %esi            # imm = 0x200
callq 0x948c
addq $0x30, %r14
shll $0xb, %ebx
leaq -0x3d8(%rip), %rsi      # 0x886c
leaq -0x3f0(%rip), %rdx      # 0x885b
movss 0x32bd(%rip), %xmm0     # 0xbf10
movl $0x10, %ecx
movq %r14, %rdi
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9867
// File: /workspace/github_c_makefile_star2_O3/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 0x94be
testl %eax, %eax
jle 0x9142
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8e73
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x94be
leal 0x20(,%rax,8), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x2e7a(%rip), %xmm0     # 0xbf28
mulsd %xmm1, %xmm0
callq 0x2210
cvttsd2si %xmm0, %ebp
movq %rbx, %rdi
callq 0x94be
leaq 0x2f65(%rip), %rdi      # 0xc02f
movl %eax, %esi
movsd 0x8(%rsp), %xmm0
movl %ebp, %edx
movb $0x1, %al
callq 0x20c0
movq %rbx, %rdi
callq 0x94be
testl %eax, %eax
jle 0x9118
leaq 0x2f74(%rip), %r14      # 0xc062
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9507
movzbl (%rax), %esi
movl 0x4(%rax), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x20c0
incl %ebp
movq %rbx, %rdi
callq 0x94be
cmpl %eax, %ebp
jl 0x90f0
movl $0xa, %edi
callq 0x2040
movq %rbx, %rdi
callq 0x86b8
leaq 0x2f3d(%rip), %rdi      # 0xc06e
movl %eax, %esi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x20c0
leaq 0x2f5b(%rip), %rdi      # 0xc0a4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O3/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 0x94ca
movl 0x10(%r14), %esi
leal 0x1(%rsi), %eax
movl %eax, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9536
movl 0x10(%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rax
movq 0x8(%rdi), %rsi
movq 0x8(%rax), %rdx
cmpq %rdx, %rsi
jne 0x964d
movq %rdi, %rbx
movq (%rax), %r14
movslq 0x10(%rax), %r15
movl 0x10(%rdi), %esi
addl %r15d, %esi
callq 0x94ca
movslq 0x10(%rbx), %rdi
movq 0x8(%rbx), %rdx
imulq %rdx, %rdi
addq (%rbx), %rdi
imulq %r15, %rdx
movq %r14, %rsi
callq 0x2140
movl 0x10(%rbx), %eax
addl %r15d, %eax
movl %eax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2ac5(%rip), %rdi      # 0xc119
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x96e3
cmpl %ebx, %edx
jl 0x96e3
movq %rdi, %r15
incl %edx
movl %edx, %esi
callq 0x94ca
movl 0x10(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
cmpl %ebx, %eax
jle 0x96cb
leal 0x1(%rbx), %esi
movq %r15, %rdi
callq 0x9507
movq %rax, %r12
movq %r15, %rdi
movl %ebx, %esi
callq 0x9507
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 0x9536
leaq 0x2a72(%rip), %rdi      # 0xc15c
movl %ebx, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x9758
cmpl %ebx, %edx
jle 0x9758
movq %rdi, %r14
decl %edx
movl %edx, 0x10(%rdi)
cmpl %ebx, %edx
jbe 0x9752
movq %r14, %rdi
movl %ebx, %esi
callq 0x9507
movq %rax, %r15
leal 0x1(%rbx), %esi
movq %r14, %rdi
callq 0x9507
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 0x2a2f(%rip), %rdi      # 0xc18e
movl %ebx, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x980c
cmpl %ebp, %ecx
jle 0x980c
testl %ebp, %ebp
js 0x980c
cmpl %r14d, %ecx
jle 0x980c
cmpl %ebp, %r14d
jne 0x97a5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
incl %ecx
movl %ecx, %esi
callq 0x94ca
movq %rbx, %rdi
movl %r14d, %esi
callq 0x9507
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9507
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 0x29ad(%rip), %rdi      # 0xc1c0
movl %r14d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x9a0b
movslq %ebp, %r13
leaq (,%r13,4), %r15
movq %r15, %rdi
callq 0x8520
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20d0
movslq 0x10(%rbx), %r12
movl %r13d, 0x10(%rbx)
testq %r12, %r12
jle 0x99fc
leaq 0x28(%rbx), %r15
movq 0x18(%rbx), %rax
movl -0x4(%rax,%r12,4), %r13d
testl %r13d, %r13d
je 0x99ee
leal -0x1(%r13), %esi
movq %r15, %rdi
callq 0x9507
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
testl %esi, %esi
jne 0x99c0
leaq -0x1(%r12), %rax
cmpq $0x2, %r12
movq %rax, %r12
jge 0x99b2
movq 0x18(%rbx), %rdi
callq 0x2030
movq %r14, 0x18(%rbx)
jmp 0x9a37
cmpl %ebp, 0x10(%rbx)
jg 0x9a34
movq 0x18(%rbx), %rdi
movslq %ebp, %r14
shlq $0x2, %r14
movq %r14, %rsi
callq 0x8540
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_O3/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 0x9a78
addl %esi, %esi
movq %rbx, %rdi
callq 0x9964
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 0x9ae0
leaq 0x40(%rbx), %r15
leaq 0x28(%rbx), %rdi
movq %rsp, %rsi
callq 0x957e
movq %r15, %rdi
movq %r14, %rsi
callq 0x957e
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 0x9507
leaq 0x2708(%rip), %rdi      # 0xc1ef
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movq %rdi, %r14
movq %rsi, 0x10(%rsp)
movq %rsi, %rdi
callq *(%r14)
movq 0x18(%r14), %rcx
xorl %r13d, %r13d
movl %eax, 0xc(%rsp)
xorl %edx, %edx
divl 0x10(%r14)
movslq %edx, %rax
movl (%rcx,%rax,4), %ebp
testl %ebp, %ebp
je 0x9d12
leaq 0x28(%r14), %r15
leaq 0x40(%r14), %r12
decl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x9507
movq %rax, %rbx
movq %r12, %rdi
movl %ebp, %esi
callq 0x9507
movq %rax, %r13
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x9d12
movl 0xc(%rsp), %ecx
cmpl %ecx, (%rbx)
jne 0x9d08
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq *%rax
testl %eax, %eax
jne 0x9d12
movl 0x4(%rbx), %ebp
testl %ebp, %ebp
jne 0x9ccd
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8e4b8(%rip), %rsi     # 0x952eb
leaq 0x8a242(%rip), %rdx     # 0x9107c
callq 0x865e
movq %rax, (%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x6e72
movq %rax, %r15
movq %rax, %rdi
callq 0xbe48
cmpl %ebp, %eax
jne 0x6e7f
leaq 0x8a219(%rip), %rdx     # 0x9107c
movq %rsp, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x86bf
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xac15a(%rip), %rcx     # 0xb2fe0
movq (%rcx), %rdi
leaq 0x8a1fb(%rip), %rsi     # 0x9108b
leaq 0x8a1e5(%rip), %rdx     # 0x9107c
movl %eax, %ecx
movq %r14, %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x4700
movq %r15, %rdi
callq 0xbb59
jmp 0x6e72
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test_bgzf.c
// Function: test_index_load_dump
static int test_index_load_dump(Files *f) {
    BGZF* bgz = NULL;
    FILE *fdest = NULL;
    unsigned char buf_src[BUFSZ], buf_dest[BUFSZ];
    ssize_t got_src, got_dest;

    bgz = try_bgzf_open(f->src_bgzf, "r", __func__);
    if (!bgz) return -1;

    if (try_bgzf_index_load(bgz, f->src_bgzf, idx_suffix, __func__) != 0) {
        goto fail;
    }

    if (try_bgzf_index_dump(bgz, f->tmp_bgzf, idx_suffix, __func__) != 0) {
        goto fail;
    }

    fdest = try_fopen(f->tmp_idx, "r");
    do {
        got_src  = try_fread(f->f_idx, buf_src,  BUFSZ, __func__, f->src_idx);
        if (got_src < 0) goto fail;
        got_dest = try_fread(fdest,    buf_dest, BUFSZ, __func__, f->tmp_idx);
        if (got_dest < 0) goto fail;
        if (compare_buffers(buf_src, buf_dest, got_src, got_dest,
                            f->src_idx, f->tmp_idx, __func__) != 0) goto fail;
    } while (got_src > 0 && got_dest > 0);
    if (try_fclose(&fdest, f->tmp_idx, __func__) != 0) goto fail;

    if (try_bgzf_close(&bgz, f->src_bgzf, __func__, 0) != 0) goto fail;

    return 0;

 fail:
    if (fdest) fclose(fdest);
    if (bgz) bgzf_close(bgz);
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10018, %rsp          # imm = 0x10018
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq 0x8df27(%rip), %rsi     # 0x952eb
leaq 0x89fd4(%rip), %rdx     # 0x9139f
callq 0x865e
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x74fb
movq %rax, %rbx
movq 0x8(%r14), %rsi
movq 0xac10c(%rip), %rdx     # 0xb34f8
leaq 0x89fac(%rip), %rcx     # 0x9139f
movq %rax, %rdi
callq 0x89b5
testl %eax, %eax
jne 0x74f3
movq 0x18(%r14), %rsi
movq 0xac0ea(%rip), %rdx     # 0xb34f8
leaq 0x89f8a(%rip), %r15     # 0x9139f
movq %rbx, %rdi
movq %r15, %rcx
callq 0x89eb
testl %eax, %eax
jne 0x74f3
movq 0x20(%r14), %rdi
leaq 0x8deb8(%rip), %rsi     # 0x952eb
callq 0x8635
movq %rax, %r12
movq 0x10(%r14), %rcx
movq 0x38(%r14), %rdi
leaq 0x8010(%rsp), %rsi
movq %r15, %rdx
callq 0x87a4
testq %rax, %rax
js 0x74e1
movq %rax, %rbp
movq 0x20(%r14), %rcx
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
movq %r15, %rdx
callq 0x87a4
testq %rax, %rax
js 0x74e1
movq %rax, %r13
movq 0x10(%r14), %r8
movq 0x20(%r14), %r9
movq %r15, (%rsp)
leaq 0x8010(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x87f7
testl %eax, %eax
jne 0x74e1
testq %rbp, %rbp
je 0x74ad
testq %r13, %r13
jne 0x743b
movq 0x20(%r14), %r15
movq %r12, %rdi
callq 0x44a0
testl %eax, %eax
jne 0x7514
movq 0x8(%r14), %rsi
leaq 0x89ed7(%rip), %rdx     # 0x9139f
leaq 0x8(%rsp), %rdi
xorl %ebx, %ebx
xorl %ecx, %ecx
callq 0x86bf
testl %eax, %eax
je 0x7500
movq 0x8(%rsp), %rbx
jmp 0x74ee
testq %r12, %r12
je 0x74ee
movq %r12, %rdi
callq 0x44a0
testq %rbx, %rbx
je 0x74fb
movq %rbx, %rdi
callq 0xbb59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x10018, %rsp          # imm = 0x10018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x4a3c
jmp 0x74ee
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x45a0
movq %rax, %r14
testq %rax, %rax
je 0x8654
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x4b95
jmp 0x8649
// File: /workspace/github_c_makefile_star2_O3/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 0x8cdc
movq %rax, %r14
testq %rax, %rax
je 0x868a
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xaa94f(%rip), %rax     # 0xb2fe0
movq (%rax), %r13
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x88a26(%rip), %rsi     # 0x910cd
movq %r13, %rdi
movq %r15, %rdx
movq %r12, %rcx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x4700
jmp 0x867d
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r14
movq %rsi, %rbx
movq (%rdi), %rax
movq $0x0, (%rdi)
movq %rax, %rdi
callq 0xbb59
testl %eax, %eax
je 0x86fc
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %r15d, %r15d
jne 0x8703
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4bd0
jmp 0x8703
xorl %ebp, %ebp
testl %r15d, %r15d
jne 0x8710
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xaa8c9(%rip), %rax     # 0xb2fe0
movq (%rax), %rdi
leaq 0x88a00(%rip), %rsi     # 0x91121
xorl %ebp, %ebp
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4700
jmp 0x8703
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r12
movslq 0x8(%rdi), %rcx
movslq 0x10(%rdi), %rax
subq %rax, %rcx
cmpq %rdx, %rcx
jle 0x8775
addq 0x28(%r12), %rax
movq %rsi, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x43b0
addl %r15d, 0x10(%r12)
addq %r15, 0x20(%r12)
jmp 0x8783
movq %r12, %rdi
movq %r15, %rdx
callq 0xa688
movq %rax, %r15
testq %r15, %r15
js 0x8797
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4c32
jmp 0x8788
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %esi
movl $0x8000, %edx           # imm = 0x8000
movq %rax, %rdi
movq %r15, %rcx
callq 0x4790
testq %rax, %rax
jne 0x87dd
movq %r15, %rdi
callq 0x4950
testl %eax, %eax
jne 0x87e3
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4c72
movq $-0x1, %rax
jmp 0x87dd
// File: /workspace/github_c_makefile_star2_O3/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 0x881f
callq 0x44c0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x8843
popq %rbx
popq %r14
popq %r15
retq
movq 0xaa7ba(%rip), %rax     # 0xb2fe0
movq (%rax), %rdi
cmovbq %r15, %rbx
leaq 0x8896f(%rip), %rsi     # 0x911a3
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4700
jmp 0x8864
movq 0xaa796(%rip), %rax     # 0xb2fe0
movq (%rax), %rdi
leaq 0x8895f(%rip), %rsi     # 0x911b3
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4700
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x8819
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xddab
movq %r14, %rdi
movl %eax, %esi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x4320
testl %eax, %eax
js 0x88a8
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
callq 0x9253
testq %rax, %rax
je 0x88b5
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4d0b
jmp 0x88c2
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x4cb2
xorl %eax, %eax
jmp 0x88a3
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
callq 0xe5d0
testq %rax, %rax
je 0x88f6
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x92f8
testq %rax, %rax
je 0x8903
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4dad
jmp 0x8911
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4d52
xorl %eax, %eax
jmp 0x88f0
// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
testb $0x40, 0x3(%rdi)
je 0x897c
movslq 0x10(%r12), %rdi
movl $0xff00, %eax           # imm = 0xFF00
subq %rdi, %rax
cmpq %rbx, %rax
jbe 0x897c
addq 0x28(%r12), %rdi
movq %rbx, %rdx
callq 0x43b0
addl %ebx, 0x10(%r12)
jmp 0x898f
movq %r12, %rdi
movq %rbx, %rdx
callq 0xb791
cmpq %rbx, %rax
jl 0x899e
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4e2f
movq $-0x1, %rbx
jmp 0x898f
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_useek
static int try_bgzf_useek(BGZF *fp, long uoffset, int where,
                          const char *name, const char *func) {
    if (bgzf_useek(fp, uoffset, where) < 0) {
        fprintf(stderr, "%s : Error from bgzf_useek(%s, %ld, %d) : %s\n",
                func, name, uoffset, where, strerror(errno));
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
xorl %ebp, %ebp
xorl %edx, %edx
callq 0xcc49
testl %eax, %eax
js 0x8a52
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xaa587(%rip), %rax     # 0xb2fe0
movq (%rax), %r12
callq 0x4050
movl (%rax), %edi
callq 0x4140
movq %rax, (%rsp)
leaq 0x889fa(%rip), %rsi     # 0x9146d
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x4700
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x8a43
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_getc
static int try_bgzf_getc(BGZF *fp, size_t pos, int expected,
                         const char *name, const char *func) {
    int c = bgzf_getc(fp);
    if (c != expected) {
        fprintf(stderr,
                "%s : Unexpected value (%d) from bgzf_getc on %s pos %zu; "
                "expected %d\n",
                func, c, name, pos, expected);
        return -1;
    }
    return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
callq 0xc275
cmpl %ebp, %eax
jne 0x8ab8
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xaa521(%rip), %rcx     # 0xb2fe0
movq (%rcx), %rdi
movl %ebp, (%rsp)
leaq 0x889cf(%rip), %rsi     # 0x9149b
movq %r15, %rdx
movl %eax, %ecx
movq %rbx, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x4700
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x8aab
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_tell
static int64_t try_bgzf_tell(BGZF *fp, const char *name, const char *func) {
    int64_t told = bgzf_tell(fp);
    if (told < 0) {
        fprintf(stderr, "%s : %s %s : %s\n",
                func, "Error telling in",
                name, strerror(errno));
        return -1;
    }

    return told;
}

// Assembly:
movq 0x18(%rdi), %rax
shlq $0x10, %rax
js 0x8af7
movzwl 0x10(%rdi), %ecx
orq %rcx, %rax
retq
pushq %rax
movq %rdx, %rdi
callq 0x4f44
movq $-0x1, %rax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test_bgzf.c
// Function: try_bgzf_tell_expect
static int64_t try_bgzf_tell_expect(BGZF *fp, int64_t expected, const char *name, const char *func) {
    int64_t told = try_bgzf_tell(fp, name, func);
    if (told != expected) {
        fprintf(stderr, "%s : Unexpected value (%" PRId64 ") from bgzf_tell on %s; "
                "expected %" PRId64 "\n",
                func, told, name, expected);
        return -1;
    }
    return told;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x8ae5
cmpq %rbx, %rax
jne 0x8b64
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0xaa475(%rip), %rcx     # 0xb2fe0
movq (%rcx), %rdi
leaq 0x889be(%rip), %rsi     # 0x91533
movq %r15, %rdx
movq %rax, %rcx
movq %r14, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x4700
movq $-0x1, %rbx
jmp 0x8b5b
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_int_atomic_swap.c
// Function: shmem_int_atomic_swap
int shmem_int_atomic_swap( int* ptr, int val, int pe)
{
	int* remote_ptr = (int*)shmem_ptr((void*)ptr, pe ); 
	long* x = (long*)shmem_ptr((void*)&__shmem.lock_atomic_int, pe);
	__set_spin_lock(x);
	int r = *remote_ptr;
	*remote_ptr = val;
	__clear_spin_lock(x);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edx, %esi
callq 0x1c48
movq %rax, %r14
leaq 0x31a4(%rip), %rdi      # 0x61f0
addq $0x10, %rdi
movl %ebx, %esi
callq 0x1c48
movq %rax, %rbx
movq %rax, %rdi
callq 0x331f
movl (%r14), %r15d
movl %ebp, (%r14)
movq %rbx, %rdi
callq 0x3310
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/_dict.c
// Function: SH_dict_pair__init
SH_dict_pair*
SH_dict_pair__init(SH_Key* key, SH_Item* value, int* err) {
	SH_dict_pair* obj;

	__cascade(err, (SH_dict_pair*)0);

	obj = (SH_dict_pair*)malloc(sizeof(SH_dict_pair));
	if ((SH_dict_pair*)0 == obj) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (SH_dict_pair*)0;
	}

	obj->key = key;
	obj->value = value;

	__clear(err);
	return obj;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x11f3
movq %rdx, %r15
cmpl $0x0, (%rdx)
jne 0x1212
movl $0x10, %edi
callq 0x1090
testq %rax, %rax
je 0x120b
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movl $0x0, (%r15)
jmp 0x1214
movl $0x10, %edi
callq 0x1090
testq %rax, %rax
je 0x1212
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
jmp 0x1214
movl $0x80000001, (%r15)     # imm = 0x80000001
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/_dict.c
// Function: SH_dict_pair__destroy
void
SH_dict_pair__destroy(SH_dict_pair* obj, sh_bool_t recursive, int* err) {
	__cascade(err,);
	if (recursive) {
		SH_Key__destroy(obj->key, err);
		SH_Item__destroy(obj->value, recursive, err);
	}
	free(obj);
	__clear(err);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
testq %rdx, %rdx
je 0x1230
cmpl $0x0, (%rbx)
jne 0x1263
testb %bpl, %bpl
je 0x1250
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1040
movq 0x8(%r14), %rdi
movzbl %bpl, %esi
movq %rbx, %rdx
callq 0x1060
movq %r14, %rdi
callq 0x1030
testq %rbx, %rbx
je 0x1263
movl $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/_dict.c
// Function: SH_dict_bucket__init
SH_dict_bucket*
SH_dict_bucket__init(int *err) {
	SH_dict_bucket* obj;

	__cascade(err, (SH_dict_bucket*)0);

	obj = (SH_dict_bucket*)calloc(sizeof(SH_dict_bucket), 1);
	if ((SH_dict_bucket*)0 == obj) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (SH_dict_bucket*)0;
	}

	__clear(err);
	return obj;
}

// Assembly:
testq %rdi, %rdi
je 0x127a
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x1289
xorl %eax, %eax
jmp 0x12a3
movl $0x30, %edi
movl $0x1, %esi
jmp 0x1080
movl $0x30, %edi
movl $0x1, %esi
callq 0x1080
testq %rax, %rax
je 0x12a5
movl $0x0, (%rbx)
popq %rbx
retq
movl $0x80000001, (%rbx)     # imm = 0x80000001
jmp 0x1276
// File: /workspace/github_c_makefile_star2_O3/phluid61[P]hsf/src/_dict.c
// Function: SH_dict_bucket__destroy
void
SH_dict_bucket__destroy(SH_dict_bucket* obj, sh_bool_t recursive, int* err) {
	__cascade(err,);
	if ((SH_dict_bucket*)0 != obj->next) {
		SH_dict_bucket__destroy(obj->next, recursive, err);
	}
	while (obj->num > (size_t)0) {
		obj->num --;
		SH_dict_pair__destroy(obj->pairs[obj->num], recursive, err);
	}
	free(obj);
	__clear(err);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x12c1
cmpl $0x0, (%rbx)
jne 0x130a
movq 0x28(%r14), %rdi
movzbl %sil, %ebp
testq %rdi, %rdi
je 0x12ef
movl %ebp, %esi
movq %rbx, %rdx
callq 0x10c0
jmp 0x12ef
leaq -0x1(%rax), %rcx
movq %rcx, (%r14)
movq (%r14,%rax,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1070
movq (%r14), %rax
testq %rax, %rax
jne 0x12da
movq %r14, %rdi
callq 0x1030
testq %rbx, %rbx
je 0x130a
movl $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq