LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_binary_get_relative_byte
unsigned char xlink_binary_get_relative_byte(xlink_binary *bin,
 xlink_segment *prog, int relative) {
  int prog_idx;
  int i;
  unsigned char byte;
  XLINK_ERROR(relative >= 0,
   ("Relative byte index should be negative, %i", relative));
  for (prog_idx = bin->nsegments; prog_idx-- > 0; ) {
    if (bin->segments[prog_idx] == prog) {
      break;
    }
  }
  XLINK_ERROR(prog_idx < 0, ("PROG segment index not found"));
  for (i = prog_idx; relative < 0 && i-- > 0; ) {
    relative += bin->segments[i + 1]->start - bin->segments[i]->start;
  }
  XLINK_ERROR(i < 0, ("Relative byte %i bytes before program start", relative));
  byte = 0;
  if (relative <= bin->segments[i]->length) {
    byte = bin->segments[i]->data[relative];
  }
  return byte;
}

// Assembly:
pushq %rax
testl %edx, %edx
jns 0x6b23
movslq 0x50(%rdi), %r8
movl %r8d, %eax
sarl $0x1f, %eax
andl %r8d, %eax
leal -0x1(%rax), %ecx
testq %r8, %r8
jle 0x6acc
leaq -0x1(%r8), %r9
movq 0x48(%rdi), %r10
cmpq %rsi, -0x8(%r10,%r8,8)
movq %r9, %r8
jne 0x6aae
leal 0x1(%r9), %eax
movl %r9d, %ecx
testl %eax, %eax
jle 0x6b2c
movslq %ecx, %rcx
movl %ecx, %eax
sarl $0x1f, %eax
andl %ecx, %eax
decl %eax
testq %rcx, %rcx
jle 0x6b00
leaq -0x1(%rcx), %rsi
movq 0x48(%rdi), %r8
movq (%r8,%rcx,8), %r9
addl 0x7c(%r9), %edx
movq -0x8(%r8,%rcx,8), %rcx
subl 0x7c(%rcx), %edx
movq %rsi, %rcx
js 0x6adc
movl %esi, %eax
testl %eax, %eax
js 0x6b3c
movq 0x48(%rdi), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
cmpl 0x1c(%rax), %edx
jle 0x6b17
xorl %eax, %eax
jmp 0x6b21
movq 0x38(%rax), %rax
movslq %edx, %rcx
movb (%rax,%rcx), %al
popq %rcx
retq
leaq 0x4396(%rip), %rdi      # 0xaec0
jmp 0x6b43
leaq 0x43b8(%rip), %rdi      # 0xaeeb
xorl %eax, %eax
callq 0x22ef
jmp 0x6b4c
leaq 0x43c5(%rip), %rdi      # 0xaf08
movl %edx, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_parity
int xlink_parity(unsigned char byte) {
  int bits;
  bits = 0;
  while (byte > 0) {
    bits += byte & 1;
    byte >>= 1;
  }
  return bits & 1;
}

// Assembly:
xorl %eax, %eax
testl %edi, %edi
je 0x6b6f
movzbl %dil, %ecx
addl %ecx, %eax
movl %ecx, %edi
shrb %dil
cmpb $0x1, %cl
ja 0x6b5c
andl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/ec.c
// Function: xlink_encoder_init
void xlink_encoder_init(xlink_encoder *enc, xlink_context *ctx) {
  enc->ctx = ctx;
  xlink_list_init(&enc->bytes, sizeof(unsigned char), 0);
  enc->bits = 0;
  enc->low = 0;
  enc->range = EC_BASE;
  enc->zero = 0;
  enc->ones = 0;
  /* Start by writing a 1 bit, this is necessary for decoder implementation */
  xlink_encoder_write_bit(enc, 1, 1, 1);
  /* Update the context with 1 bit */
  xlink_context_update_bit(enc->ctx, 0, 1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
addq $0x8, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x92e8
movaps 0x3e3c(%rip), %xmm0     # 0xbd50
movups %xmm0, 0x20(%rbx)
movl $0x0, 0x30(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x7f46
movq (%rbx), %rdi
xorl %esi, %esi
movl $0x1, %edx
popq %rbx
jmp 0x8aa8
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/ec.c
// Function: xlink_encoder_write_bit
static void xlink_encoder_write_bit(xlink_encoder *enc, xlink_word c0,
 xlink_word c1, int bit) {
  xlink_word s;
  XLINK_ERROR(c0 == 0 || c1 == 0 || (c0 > EC_MASK - c1),
   ("Error invalid counts, c0 = %i and c1 = %i", c0, c1));
  s = ((xlink_dword)enc->range)*c1/(c0 + c1);
  enc->range = bit ? s : enc->range - s;
  if (!bit) {
    /* Handle carry */
    if (s > EC_MASK - enc->low) {
      xlink_encoder_emit(enc, 1);
    }
    enc->low += s;
  }
  /* Normalize */
  while (enc->range < EC_BASE) {
    if (enc->low & EC_BASE) {
      enc->ones++;
    }
    else {
      xlink_encoder_emit(enc, 0);
    }
    enc->low <<= 1;
    enc->range <<= 1;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
negl %eax
cmpl %edx, %eax
jbe 0x7fc3
testl %edx, %edx
je 0x7fc3
movq %rdi, %rbx
movl 0x28(%rdi), %edi
movl %edx, %eax
imulq %rdi, %rax
addl %edx, %esi
xorl %edx, %edx
divq %rsi
movq %rax, %r14
subl %r14d, %edi
testl %ecx, %ecx
cmovnel %r14d, %edi
movl %edi, 0x28(%rbx)
jne 0x7f93
movl 0x24(%rbx), %eax
addl %r14d, %eax
jae 0x7f8f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x81c4
addl %r14d, 0x24(%rbx)
cmpl $0x0, 0x28(%rbx)
js 0x7fbb
cmpl $0x0, 0x24(%rbx)
js 0x7fab
movq %rbx, %rdi
xorl %esi, %esi
callq 0x81c4
jmp 0x7fae
incl 0x30(%rbx)
shll 0x24(%rbx)
movl 0x28(%rbx), %eax
addl %eax, %eax
movl %eax, 0x28(%rbx)
jns 0x7f99
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3e31(%rip), %rdi      # 0xbdfb
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/ec.c
// Function: xlink_encoder_write_bytes
void xlink_encoder_write_bytes(xlink_encoder *enc, xlink_list *bytes) {
  int i, j;
  for (j = 0; j < xlink_list_length(bytes); j++) {
    unsigned char byte;
    unsigned char partial;
    byte = *xlink_list_get_byte(bytes, j);
    partial = 1;
    /* Build partially seen byte from high bit to low bit to match decoder. */
    for (i = 8; i-- > 0; ) {
      unsigned int counts[2];
      int bit;
      xlink_context_get_counts(enc->ctx, partial, counts);
      bit = !!(byte & (1 << i));
      xlink_encoder_write_bit(enc, counts[0], counts[1], bit);
      xlink_context_update_bit(enc->ctx, partial, bit);
      partial <<= 1;
      partial |= bit;
    }
    XLINK_ERROR(partial != byte,
     ("Mismatch between partial %02x and byte %02x", partial, byte));
    for (i = 8; i-- > 1; ) {
      enc->ctx->buf[i] = enc->ctx->buf[i - 1];
    }
    enc->ctx->buf[0] = byte;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x931a
testl %eax, %eax
jle 0x80c6
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movl %ebp, 0x4(%rsp)
movl %ebp, %esi
callq 0x9366
movb (%rax), %al
movb %al, 0x3(%rsp)
movzbl %al, %r12d
movb $0x1, %r13b
movl $0x9, %ebp
movq (%r14), %rdi
movzbl %r13b, %ebx
movl %ebx, %esi
movq %r15, %rdx
callq 0x89ff
leal -0x2(%rbp), %eax
movzbl %al, %eax
xorl %r13d, %r13d
btl %eax, %r12d
setb %r13b
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movq %r14, %rdi
movl %r13d, %ecx
callq 0x7f46
movq (%r14), %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x8aa8
addb %bl, %bl
orb %bl, %r13b
decl %ebp
cmpl $0x1, %ebp
ja 0x8034
movb 0x3(%rsp), %sil
cmpb %sil, %r13b
jne 0x80d5
movl $0x9, %eax
movq 0x10(%rsp), %rbx
movl 0x4(%rsp), %ebp
movq (%r14), %rcx
movb -0x3(%rcx,%rax), %dl
movb %dl, -0x2(%rcx,%rax)
decq %rax
cmpq $0x2, %rax
ja 0x809a
movq (%r14), %rax
movb %sil, (%rax)
incl %ebp
movq %rbx, %rdi
callq 0x931a
cmpl %eax, %ebp
jl 0x8014
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl %r13b, %esi
leaq 0x3c90(%rip), %rdi      # 0xbd70
movl %r12d, %edx
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/ec.c
// Function: xlink_encoder_finalize
void xlink_encoder_finalize(xlink_encoder *enc, xlink_bitstream *bs) {
  xlink_word m;
  int s;
  int i;
  m = EC_BASE - 1;
  /* Count how many bits must be output to ensure that the symbols encoded thus
      far will decode correctly regardless of the bits that follow. */
  for (s = 1; ((enc->low + m) | m) - enc->low >= enc->range; s++, m >>= 1);
  XLINK_ERROR(s > 2,
   ("At most two bits need to be written to finalize range coder"));
  if (m > EC_MASK - enc->low) {
    /* Handle carry */
    xlink_encoder_emit(enc, 1);
  }
  for (i = 0; i < s; i++) {
    if ((enc->low + m) & (EC_BASE >> i)) {
      enc->ones++;
    }
    else {
      xlink_encoder_emit(enc, 0);
    }
  }
  /* Flush any pending bits */
  xlink_encoder_emit(enc, 0);
  /* Copy finalized bits to bitstream */
  bs->bits = enc->bits;
  bs->bytes.length = 0;
  xlink_list_append(&bs->bytes, &enc->bytes);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x24(%rdi), %eax
movl 0x28(%rdi), %ecx
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
leal (%rax,%r15), %edx
orl %r15d, %edx
subl %eax, %edx
movl $0x1, %r12d
cmpl %ecx, %edx
jb 0x813a
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
incl %r12d
shrl %r15d
leal (%rax,%r15), %edx
orl %r15d, %edx
subl %eax, %edx
cmpl %ecx, %edx
jae 0x8127
cmpl $0x3, %r12d
jae 0x81ac
addl %r15d, %eax
jae 0x8152
movq %r14, %rdi
movl $0x1, %esi
callq 0x81c4
xorl %ebp, %ebp
movl 0x24(%r14), %eax
addl %r15d, %eax
movl %ebp, %ecx
shll %cl, %eax
testl $0x80000000, %eax       # imm = 0x80000000
je 0x816c
incl 0x30(%r14)
jmp 0x8176
movq %r14, %rdi
xorl %esi, %esi
callq 0x81c4
incl %ebp
cmpl %ebp, %r12d
jne 0x8154
movq %r14, %rdi
xorl %esi, %esi
callq 0x81c4
movl 0x20(%r14), %eax
movl %eax, 0x18(%rbx)
movl $0x0, 0x10(%rbx)
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x945f
leaq 0x3be9(%rip), %rdi      # 0xbd9c
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/ec.c
// Function: xlink_encoder_emit
static void xlink_encoder_emit(xlink_encoder *enc, int bit) {
  XLINK_ERROR(bit == 1 && enc->zero == 0,
   ("Got a carry, but have not seen a zero to propogate it into yet"));
  if (bit == 0) {
    if (enc->zero) {
      xlink_encoder_store(enc, 0);
    }
    while (enc->ones > 0) {
      xlink_encoder_store(enc, 1);
      enc->ones--;
    }
    enc->zero = 1;
  }
  else {
    xlink_encoder_store(enc, 1);
    enc->zero = enc->ones > 0;
    while (enc->ones > 1) {
      xlink_encoder_store(enc, 0);
      enc->ones--;
    }
    enc->ones = 0;
  }
  enc->bytes.length = (enc->bits + 7)/8;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x827d
cmpl $0x1, %esi
jne 0x81ea
cmpl $0x0, 0x2c(%rbx)
je 0x8322
testl %esi, %esi
je 0x827d
leaq 0x8(%rbx), %r14
movl 0x20(%rbx), %esi
andl $-0x8, %esi
incl %esi
movq %r14, %rdi
callq 0x9326
movq 0x8(%rbx), %rax
movl 0x20(%rbx), %ecx
movl %ecx, %edx
sarl $0x3, %edx
andb $0x7, %cl
movl $0x1, %esi
shll %cl, %esi
movslq %edx, %rcx
orb %sil, (%rax,%rcx)
incl 0x20(%rbx)
movl 0x30(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
movl %ecx, 0x2c(%rbx)
cmpl $0x2, %eax
jl 0x8271
movl 0x20(%rbx), %esi
andl $-0x8, %esi
incl %esi
movq %r14, %rdi
callq 0x9326
movq 0x8(%rbx), %rax
movl 0x20(%rbx), %ecx
movl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rdx
andb $0x7, %cl
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rax,%rdx)
incl 0x20(%rbx)
movl 0x30(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x30(%rbx)
cmpl $0x2, %eax
jg 0x8230
movl $0x0, 0x30(%rbx)
jmp 0x8306
cmpl $0x0, 0x2c(%rbx)
je 0x82b7
leaq 0x8(%rbx), %rdi
movl 0x20(%rbx), %esi
andl $-0x8, %esi
incl %esi
callq 0x9326
movq 0x8(%rbx), %rax
movl 0x20(%rbx), %ecx
movl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rdx
andb $0x7, %cl
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rax,%rdx)
incl 0x20(%rbx)
cmpl $0x0, 0x30(%rbx)
jle 0x82ff
leaq 0x8(%rbx), %r14
movl 0x20(%rbx), %esi
andl $-0x8, %esi
incl %esi
movq %r14, %rdi
callq 0x9326
movq 0x8(%rbx), %rax
movl 0x20(%rbx), %ecx
movl %ecx, %edx
sarl $0x3, %edx
andb $0x7, %cl
movl $0x1, %esi
shll %cl, %esi
movslq %edx, %rcx
orb %sil, (%rax,%rcx)
incl 0x20(%rbx)
movl 0x30(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x30(%rbx)
cmpl $0x1, %eax
jg 0x82c1
movl $0x1, 0x2c(%rbx)
movl 0x20(%rbx), %eax
leal 0x7(%rax), %ecx
addl $0xe, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
movl %eax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3afc(%rip), %rdi      # 0xbe25
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/ec.c
// Function: xlink_decoder_init
void xlink_decoder_init(xlink_decoder *dec, xlink_context *ctx,
 xlink_bitstream *bs) {
  dec->ctx = ctx;
  dec->bytes = &bs->bytes;
  dec->bits = bs->bits;
  dec->pos = 1;
  dec->low = 0;
  dec->range = 1;
  dec->value = 0;
  /* Discard first bit */
  XLINK_ERROR(xlink_decoder_read_bit(dec, 1, 1) == 0,
   ("Expected first decoded bit to be 1"));
  /* Update the context with 1 bit */
  xlink_context_update_bit(dec->ctx, 0, 1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movl 0x18(%rdx), %eax
movl %eax, 0x10(%rdi)
movaps 0x3a0e(%rip), %xmm0     # 0xbd60
movups %xmm0, 0x14(%rdi)
movl $0x1, %esi
movl $0x1, %edx
callq 0x8391
testl %eax, %eax
je 0x8379
movq (%rbx), %rdi
xorl %esi, %esi
movl $0x1, %edx
popq %rbx
jmp 0x8aa8
leaq 0x3a58(%rip), %rdi      # 0xbdd8
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/ec.c
// Function: xlink_decoder_read_bit
static int xlink_decoder_read_bit(xlink_decoder *dec, xlink_word c0,
 xlink_word c1) {
  int bit;
  xlink_word s;
  XLINK_ERROR(c0 == 0 || c1 == 0 || (c0 > EC_MASK - c1),
   ("Error invalid counts, c0 = %i and c1 = %i", c0, c1));
  /* Fill value with bits until EC_BASE <= range < 2*EC_BASE */
  while (dec->range < EC_BASE) {
    dec->low <<= 1;
    dec->range <<= 1;
    dec->value <<= 1;
    dec->value |=
     dec->pos >= dec->bits ? 0 : XLINK_GET_BIT(dec->bytes->data, dec->pos);
    dec->pos++;
  }
  s = ((xlink_dword)dec->range)*c1/(c0 + c1);
  XLINK_ERROR(s == 0 || s >= dec->range, ("Invalid scale value s = %02x", s));
  bit = dec->value < s;
  if (!bit) {
    dec->low += s;
    dec->range -= s;
    dec->value -= s;
  }
  else {
    dec->range = s;
  }
  return bit;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %eax
negl %eax
cmpl %edx, %eax
jbe 0x844f
testl %edx, %edx
je 0x844f
movl 0x1c(%rdi), %ecx
testl %ecx, %ecx
js 0x8410
movl 0x10(%rdi), %eax
movl 0x14(%rdi), %r8d
movl 0x18(%rdi), %r9d
movl 0x20(%rdi), %r10d
addl %r9d, %r9d
movl %r9d, 0x18(%rdi)
addl %ecx, %ecx
movl %ecx, 0x1c(%rdi)
addl %r10d, %r10d
movl %r10d, 0x20(%rdi)
xorl %r11d, %r11d
cmpl %eax, %r8d
jge 0x83fe
movq 0x8(%rdi), %r11
movq (%r11), %r11
movl %r8d, %ebx
sarl $0x3, %ebx
movslq %ebx, %rbx
movzbl (%r11,%rbx), %ebx
movl %r8d, %ebp
andl $0x7, %ebp
xorl %r11d, %r11d
btl %ebp, %ebx
setb %r11b
orl %r11d, %r10d
movl %r10d, 0x20(%rdi)
incl %r8d
movl %r8d, 0x14(%rdi)
testl %ecx, %ecx
jns 0x83be
movl %ecx, %r8d
movl %edx, %eax
imulq %r8, %rax
addl %edx, %esi
xorl %edx, %edx
divq %rsi
testl %eax, %eax
je 0x845f
subl %eax, %ecx
jbe 0x845f
movl 0x20(%rdi), %edx
movl %edx, %esi
subl %eax, %esi
jae 0x8436
movl %eax, 0x1c(%rdi)
jmp 0x843f
addl %eax, 0x18(%rdi)
movl %ecx, 0x1c(%rdi)
movl %esi, 0x20(%rdi)
xorl %ecx, %ecx
cmpl %eax, %edx
setb %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x39a5(%rip), %rdi      # 0xbdfb
xorl %eax, %eax
callq 0x22ef
jmp 0x846f
leaq 0x39fe(%rip), %rdi      # 0xbe64
movl %eax, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/ec.c
// Function: xlink_decoder_read_byte
unsigned char xlink_decoder_read_byte(xlink_decoder *dec) {
  unsigned char byte;
  int i;
  byte = 1;
  for (i = 8; i-- > 0; ) {
    unsigned int counts[2];
    int bit;
    xlink_context_get_counts(dec->ctx, byte, counts);
    bit = xlink_decoder_read_bit(dec, counts[0], counts[1]);
    xlink_context_update_bit(dec->ctx, byte, bit);
    byte <<= 1;
    byte |= bit;
  }
  for (i = 8; i-- > 1; ) {
    dec->ctx->buf[i] = dec->ctx->buf[i - 1];
  }
  dec->ctx->buf[0] = byte;
  return byte;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb $0x1, %bpl
movl $0x9, %r12d
leaq 0x8(%rsp), %r14
movq (%rbx), %rdi
movzbl %bpl, %r15d
movl %r15d, %esi
movq %r14, %rdx
callq 0x89ff
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movq %rbx, %rdi
callq 0x8391
movl %eax, %ebp
movq (%rbx), %rdi
movl %r15d, %esi
movl %eax, %edx
callq 0x8aa8
addb %r15b, %r15b
orb %r15b, %bpl
decl %r12d
cmpl $0x1, %r12d
ja 0x8497
movl $0x9, %eax
movq (%rbx), %rcx
movb -0x3(%rcx,%rax), %dl
movb %dl, -0x2(%rcx,%rax)
decq %rax
cmpq $0x2, %rax
ja 0x84dc
movq (%rbx), %rax
movb %bpl, (%rax)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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
callq 0x2140
testq %rax, %rax
je 0x8524
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x20d0
movq %rbx, %rdi
callq 0x23b4
// File: /workspace/github_c_makefile_star2_O1/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 0x3982(%rip), %rsi      # 0xbed8
movq %rbx, %rdi
callq 0x21b0
testq %rax, %rax
je 0x85ce
movq %rax, %r15
movq %rbx, (%r14)
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2180
movq %r15, %rdi
callq 0x2120
movl %eax, 0x8(%r14)
movl %eax, %edi
callq 0x8508
movq %rax, 0x10(%r14)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2180
movq 0x10(%r14), %rdi
movl 0x8(%r14), %edx
movl $0x1, %esi
movq %r15, %rcx
callq 0x2080
movl 0x8(%r14), %ecx
cmpl %eax, %ecx
jne 0x85e1
movq %r15, %rdi
callq 0x2090
movl $0x0, 0xc(%r14)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3906(%rip), %rdi      # 0xbedb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
jmp 0x85f4
leaq 0x390a(%rip), %rdi      # 0xbef2
movq %rbx, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/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)
movl $0x0, 0x4(%rdi)
xorl %eax, %eax
xorl %ecx, %ecx
btl %eax, %esi
adcl $0x0, %ecx
incl %eax
cmpl $0x8, %eax
jne 0x8616
movl %ecx, 0x4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x931a
testl %eax, %eax
jle 0x8697
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 0x9366
movl 0x4(%rax), %r12d
movl %r12d, %r15d
subl 0x4(%rsp), %r15d
addl %r13d, %r15d
cmpl $0x20, %r15d
jge 0x86ad
movl $0x80000000, %eax       # imm = 0x80000000
movl %r15d, %ecx
shrl %cl, %eax
notl %eax
andl %eax, %ebp
incl %r14d
incl %r15d
movq %rbx, %rdi
callq 0x931a
movl %r15d, %r13d
cmpl %eax, %r14d
jl 0x864c
jmp 0x869c
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 0x388c(%rip), %rdi      # 0xbf40
movl %r15d, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/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 0x8711
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 0x86e2
testl %ebp, %ebp
je 0x8711
movq %r14, %rdi
movl %r15d, %esi
callq 0x9366
movl 0x4(%rax), %ecx
movl %ecx, %edx
addl %ebx, %edx
jne 0x871c
notl %ebx
incl %r15d
movl %ebp, 0x8(%rax)
testl %ebp, %ebp
jne 0x86e0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movzbl (%rax), %esi
negl %ebx
leaq 0x3837(%rip), %rdi      # 0xbf5f
movl %ebx, %edx
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/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 %r9d, %r9d
xorl %edx, %edx
xorl %ecx, %ecx
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
cmpl $0x8, %r9d
jne 0x8749
movl 0x4(%rdi), %eax
subl %edx, %ecx
subl 0x4(%rsi), %eax
cmovel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x87c0
movzbl 0x4(%rdi), %eax
movzbl 0x4(%rsi), %edx
cmpb %dl, %al
jne 0x87c5
movl $0x7, %edx
xorl %r8d, %r8d
btl %edx, %ecx
jae 0x87b2
movzbl 0x6(%rdi,%r8), %eax
movzbl 0x6(%rsi,%r8), %r9d
cmpb %r9b, %al
jne 0x87c8
incq %r8
decl %edx
cmpq $0x8, %r8
jne 0x879c
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_O1/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 0x880c
movzbl 0x6(%rdi,%rsi), %r8d
addl %r8d, %eax
imull $0x6f, %eax, %eax
xorl %r8d, %eax
incq %rsi
decl %edx
cmpq $0x8, %rsi
jne 0x87f8
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_O1/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
movl $0x7, %esi
xorl %r8d, %r8d
movl $0xff, %r9d
btl %esi, %edx
jae 0x88a3
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
cmpq $0x8, %r8
jne 0x8875
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8915
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 0x88e9
retq
// File: /workspace/github_c_makefile_star2_O1/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      # 0x8834
leaq -0x17e(%rip), %rdx      # 0x87cc
movss 0x35ce(%rip), %xmm0     # 0xbf20
movl $0x10, %ecx
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x96dd
testl %r12d, %r12d
jle 0x898a
movq $0x0, 0x18(%r14)
movl $0x3f800000, 0x24(%r14) # imm = 0x3F800000
movq %r15, %rdi
callq 0x978f
movq %r15, %rdi
movl %r12d, %esi
callq 0x97da
testl %ebp, %ebp
je 0x8998
leaq -0xe6(%rip), %rax       # 0x88af
movq %rax, (%r15)
movq $0x0, (%r14)
movq %r15, %rdi
callq 0x978f
movl %ebx, 0x68(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x978f
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x97da
// File: /workspace/github_c_makefile_star2_O1/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 0x931a
testl %eax, %eax
jle 0x8a99
leaq 0x10(%r14), %r15
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movq 0x8(%r14), %rdi
movl %ebp, %esi
callq 0x9366
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 0x9b12
testq %rax, %rax
je 0x8a8a
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 0x931a
cmpl %eax, %ebp
jl 0x8a45
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x931a
testl %eax, %eax
jle 0x8b70
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 0x9366
movb (%rax), %cl
movb %cl, 0xd(%rsp)
movl 0x8(%rax), %eax
movl %eax, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9b12
testq %rax, %rax
jne 0x8b2a
movw $0x0, 0x16(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9bbc
cmpl $0x0, 0x68(%rbx)
je 0x8b4b
movb 0xe(%rax,%r12), %cl
movl $0xff, %edx
cmpb $-0x2, %cl
jae 0x8b44
incb %cl
movzbl %cl, %edx
movb %dl, 0xe(%rax,%r12)
jmp 0x8b50
incb 0xe(%rax,%r12)
movb 0xe(%rax,%r13), %cl
cmpb $0x2, %cl
jb 0x8b61
shrb %cl
movb %cl, 0xe(%rax,%r13)
incl %ebp
movq 0x8(%rbx), %rdi
callq 0x931a
cmpl %eax, %ebp
jl 0x8af0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x92e8
leaq 0x18(%r14), %rdi
leal (,%rbx,8), %edx
movl $0x200, %esi            # imm = 0x200
callq 0x92e8
addq $0x30, %r14
shll $0xb, %ebx
leaq -0x3da(%rip), %rsi      # 0x87dd
leaq -0x3f2(%rip), %rdx      # 0x87cc
movss 0x335a(%rip), %xmm0     # 0xbf20
movl $0x10, %ecx
movq %r14, %rdi
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x96dd
// File: /workspace/github_c_makefile_star2_O1/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 0x931a
testl %eax, %eax
jle 0x90b5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8de6
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x931a
leal 0x20(,%rax,8), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x2f17(%rip), %xmm0     # 0xbf38
mulsd %xmm1, %xmm0
callq 0x2210
cvttsd2si %xmm0, %ebp
movq %rbx, %rdi
callq 0x931a
leaq 0x3002(%rip), %rdi      # 0xc03f
movl %eax, %esi
movsd 0x8(%rsp), %xmm0
movl %ebp, %edx
movb $0x1, %al
callq 0x20c0
movq %rbx, %rdi
callq 0x931a
testl %eax, %eax
jle 0x908b
leaq 0x3011(%rip), %r14      # 0xc072
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9366
movzbl (%rax), %esi
movl 0x4(%rax), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x20c0
incl %ebp
movq %rbx, %rdi
callq 0x931a
cmpl %eax, %ebp
jl 0x9063
movl $0xa, %edi
callq 0x2040
movq %rbx, %rdi
callq 0x8627
leaq 0x2fda(%rip), %rdi      # 0xc07e
movl %eax, %esi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x20c0
leaq 0x2ff8(%rip), %rdi      # 0xc0b4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O1/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)
movq $0x0, 0x10(%rdi)
movq %rsi, 0x8(%rdi)
movl %edx, 0x14(%rdi)
movslq %edx, %rdi
imulq %rsi, %rdi
callq 0x8508
movq %rax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9326
movl 0x10(%r14), %esi
leal 0x1(%rsi), %eax
movl %eax, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9396
movl 0x10(%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9326
movslq 0x10(%r15), %rdi
movq 0x8(%r15), %rdx
imulq %rdx, %rdi
addq (%r15), %rdi
movslq %ebx, %rbx
imulq %rbx, %rdx
movq %r14, %rsi
callq 0x2130
addl 0x10(%r15), %ebx
movl %ebx, 0x10(%r15)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x94b3
movq %rdi, %rbx
movq (%rax), %r14
movslq 0x10(%rax), %r15
movl 0x10(%rdi), %esi
addl %r15d, %esi
callq 0x9326
movslq 0x10(%rbx), %rdi
movq 0x8(%rbx), %rdx
imulq %rdx, %rdi
addq (%rbx), %rdi
imulq %r15, %rdx
movq %r14, %rsi
callq 0x2130
movl 0x10(%rbx), %eax
addl %r15d, %eax
movl %eax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2c6f(%rip), %rdi      # 0xc129
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/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
movl %esi, %ebx
movq %rdi, %r15
testl %esi, %esi
js 0x954b
movl 0x10(%r15), %esi
cmpl %ebx, %esi
jl 0x954b
movq %rdx, %r14
incl %esi
movq %r15, %rdi
callq 0x9326
movl 0x10(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%r15)
cmpl %ebx, %eax
jle 0x9533
leal 0x1(%rbx), %esi
movq %r15, %rdi
callq 0x9366
movq %rax, %r12
movq %r15, %rdi
movl %ebx, %esi
callq 0x9366
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 0x9396
movl 0x10(%r15), %edx
leaq 0x2c16(%rip), %rdi      # 0xc16c
movl %ebx, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/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
movq %rdi, %r14
testl %esi, %esi
js 0x95c6
movl 0x10(%r14), %eax
cmpl %ebx, %eax
jle 0x95c6
decl %eax
movl %eax, 0x10(%r14)
cmpl %ebx, %eax
jle 0x95c0
movq %r14, %rdi
movl %ebx, %esi
callq 0x9366
movq %rax, %r15
leal 0x1(%rbx), %esi
movq %r14, %rdi
callq 0x9366
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
movl 0x10(%r14), %edx
leaq 0x2bcd(%rip), %rdi      # 0xc19e
movl %ebx, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/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
movq %rdi, %rbx
testl %esi, %esi
js 0x967f
movl 0x10(%rbx), %esi
cmpl %ebp, %esi
jle 0x967f
testl %ebp, %ebp
js 0x967f
cmpl %r14d, %esi
jle 0x967f
cmpl %ebp, %r14d
jne 0x961a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
incl %esi
movq %rbx, %rdi
callq 0x9326
movq %rbx, %rdi
movl %r14d, %esi
callq 0x9366
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9366
movq %rax, %r15
movslq 0x10(%rbx), %r12
movq 0x8(%rbx), %rdx
imulq %rdx, %r12
addq (%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2130
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2130
movq 0x8(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2130
movl 0x10(%rbx), %ecx
leaq 0x2b47(%rip), %rdi      # 0xc1d0
movl %r14d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdi, %rbx
movq %rsi, (%rdi)
cmpl $0x5, %r8d
movl $0x4, %edi
cmovgel %r8d, %edi
movq %rdx, 0x8(%rbx)
movl %edi, 0x10(%rbx)
movss %xmm0, 0x14(%rbx)
shlq $0x2, %rdi
callq 0x8508
movq %rax, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
xorl %r12d, %r12d
movq %r12, 0x38(%rbx)
movq $0x8, 0x30(%rbx)
movl %ebp, 0x3c(%rbx)
movslq %ebp, %r15
leaq (,%r15,8), %rdi
callq 0x8508
movq %rax, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movq %r12, 0x50(%rbx)
movq %r14, 0x48(%rbx)
movl %r15d, 0x54(%rbx)
imulq %r14, %r15
movq %r15, %rdi
callq 0x8508
movq %rax, 0x40(%rbx)
movq 0x18(%rbx), %rdi
movslq 0x10(%rbx), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x20d0
movl %r12d, 0x50(%rbx)
movl %r12d, 0x38(%rbx)
movl %r12d, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9881
movslq %ebp, %r13
leaq (,%r13,4), %r15
movq %r15, %rdi
callq 0x8508
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 0x9872
leaq 0x28(%rbx), %r15
movq 0x18(%rbx), %rax
movl -0x4(%rax,%r12,4), %r13d
testl %r13d, %r13d
je 0x9864
leal -0x1(%r13), %esi
movq %r15, %rdi
callq 0x9366
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 0x9836
leaq -0x1(%r12), %rax
cmpq $0x2, %r12
movq %rax, %r12
jge 0x9828
movq 0x18(%rbx), %rdi
callq 0x2030
movq %r14, 0x18(%rbx)
jmp 0x98ad
cmpl %ebp, 0x10(%rbx)
jg 0x98aa
movq 0x18(%rbx), %rdi
movslq %ebp, %r14
shlq $0x2, %r14
movq %r14, %rsi
callq 0x852c
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