LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_create_default
obint * obint_create_default(uint64_t num_digits){

  static const char classname[] = "obint";
  obint *new_instance = malloc(sizeof(obint));
  assert(new_instance != NULL);

  /* initialize base class data */
  ob_init_base((obj *)new_instance, &obint_destroy, &obint_hash,
               &obint_compare, &obint_display, classname);

  new_instance->sign = 1; /* positive by default */

  new_instance->digits = malloc(sizeof(int8_t)*num_digits);
  assert(new_instance->digits != NULL);
  memset(new_instance->digits, 0, num_digits);

  new_instance->num_digits = num_digits;

  return new_instance;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %edi
callq 0x1150
testq %rax, %rax
je 0x25af
movq %rax, %r14
leaq 0x1279(%rip), %rsi      # 0x37da
leaq 0x12d3(%rip), %rdx      # 0x383b
leaq 0x13bd(%rip), %rcx      # 0x392c
leaq 0x14b7(%rip), %r8       # 0x3a2d
leaq 0x43a8(%rip), %r9       # 0x6925
movq %rax, %rdi
callq 0x50dc
movb $0x1, 0x8(%r14)
movl $0x1, %edi
movq %rbx, %rsi
callq 0x10f0
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x25ce
movq %rbx, 0x18(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x41aa(%rip), %rdi      # 0x6760
leaq 0x3e4f(%rip), %rsi      # 0x640c
leaq 0x41b1(%rip), %rcx      # 0x6775
movl $0x167, %edx            # imm = 0x167
callq 0x10a0
leaq 0x41c6(%rip), %rdi      # 0x679b
leaq 0x3e30(%rip), %rsi      # 0x640c
leaq 0x4192(%rip), %rcx      # 0x6775
movl $0x170, %edx            # imm = 0x170
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_value
int64_t obint_value(const obint *a){

  uint64_t i, most_sig;
  int64_t val;

  assert(a != NULL);

  most_sig = obint_most_sig(a);
  val = 0;
  for(i=most_sig; i<= most_sig; i--){
    val *= 10;
    val += a->digits[i];
  }

  return val*a->sign;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2634
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rax
leaq -0x1(%rax), %rdx
cmpq $0x1, %rax
je 0x260f
cmpb $0x0, -0x1(%rcx,%rax)
movq %rdx, %rax
je 0x25fb
xorl %eax, %eax
movq %rdx, %rsi
leaq (%rax,%rax,4), %rax
movsbq (%rcx,%rsi), %r8
leaq (%r8,%rax,2), %rax
decq %rsi
cmpq %rdx, %rsi
jbe 0x2614
movsbq 0x8(%rdi), %rcx
imulq %rcx, %rax
popq %rcx
retq
leaq 0x3dc7(%rip), %rdi      # 0x6402
leaq 0x3dca(%rip), %rsi      # 0x640c
leaq 0x3dd7(%rip), %rcx      # 0x6420
movl $0x34, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_most_sig
uint64_t obint_most_sig(const obint *a){

  uint64_t i;

  i = a->num_digits - 1;
  while(!a->digits[i] && i>0) i--;
  return i;
}

// Assembly:
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rdx
leaq -0x1(%rdx), %rax
cmpq $0x1, %rdx
je 0x266f
cmpb $0x0, -0x1(%rcx,%rdx)
movq %rax, %rdx
je 0x265b
retq
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_from_string
obint * obint_from_string(const obstring *numstr){

  int8_t offset, sign;

  int32_t num;
  uint32_t strlen, i;
  uint64_t digits;
  obint *instance;

  assert(numstr != NULL);

  strlen = obstring_length(numstr);
  if(obstring_char_at_index(numstr, 0) == '-'){
    sign = -1;
    digits = strlen - 1;
    offset = 1;
  }
  else{
    sign = 1;
    digits = strlen;
    offset = 0;
  }
  assert(strlen > 0);

  instance = obint_create_default(digits);
  instance->sign = sign;
  for(i=0 ; i<digits; i++){
    num = obstring_char_at_index(numstr, i+offset) - '0';
    assert(num >= 0 && num <= 9);
    instance->digits[digits-i-1] = num;
  }

  /* zero is defined to be positive */
  if(obint_is_zero(instance)) instance->sign = 1;

  return instance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x273b
movq %rdi, %rbx
callq 0x3df9
movl %eax, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3e22
movl %eax, %ebp
xorl %eax, %eax
cmpb $0x2d, %bpl
sete %cl
testl %r14d, %r14d
je 0x275a
movb %cl, %al
subl %eax, %r14d
cmpb $0x2d, %bpl
sete %r12b
negb %r12b
orb $0x1, %r12b
movq %r14, %rdi
callq 0x2541
movq %rax, %r15
movb %r12b, 0x8(%rax)
testq %r14, %r14
je 0x26ff
xorl %r12d, %r12d
cmpb $0x2d, %bpl
sete %r12b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3e22
addb $-0x30, %al
cmpb $0xa, %al
jae 0x271c
movq 0x10(%r15), %rcx
movb %al, -0x1(%rcx,%r14)
incq %r12
decq %r14
jne 0x26dd
movq %r15, %rdi
callq 0x2779
testb %al, %al
je 0x2710
movb $0x1, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d65(%rip), %rdi      # 0x6488
leaq 0x3ce2(%rip), %rsi      # 0x640c
leaq 0x3d21(%rip), %rcx      # 0x6452
movl $0x5d, %edx
callq 0x10a0
leaq 0x3d01(%rip), %rdi      # 0x6443
leaq 0x3cc3(%rip), %rsi      # 0x640c
leaq 0x3d02(%rip), %rcx      # 0x6452
movl $0x4a, %edx
callq 0x10a0
leaq 0x3d1c(%rip), %rdi      # 0x647d
leaq 0x3ca4(%rip), %rsi      # 0x640c
leaq 0x3ce3(%rip), %rcx      # 0x6452
movl $0x57, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_is_zero
uint8_t obint_is_zero(const obint *a){

  uint64_t most_sig;

  assert(a != NULL);

  most_sig = obint_most_sig(a);
  return most_sig == 0 && a->digits[0] == 0;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x27ac
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rcx
je 0x279b
cmpb $0x0, -0x1(%rax,%rcx)
movq %rdx, %rcx
je 0x2787
testq %rdx, %rdx
je 0x27a4
xorl %eax, %eax
jmp 0x27aa
cmpb $0x0, (%rax)
sete %al
popq %rcx
retq
leaq 0x3c4f(%rip), %rdi      # 0x6402
leaq 0x3c52(%rip), %rsi      # 0x640c
leaq 0x3d26(%rip), %rcx      # 0x64e7
movl $0x96, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_to_string
obstring * obint_to_string(const obint *a){

  uint8_t offset = 0;
  uint64_t most_sig, i;
  char *str;
  obstring *result;

  assert(a != NULL);

  if(a->sign == -1) offset = 1;
  most_sig = obint_most_sig(a);
  str = malloc(sizeof(char)*(most_sig+2+offset));

  /* generate cstring from int */
  str[0] = '-'; /* non-negatives will overwrite value in following loop */
  for(i=most_sig; i<=most_sig; i--) str[most_sig-i+offset] = a->digits[i] + '0';
  str[most_sig+1+offset] = '\0';

  result = obstring_new(str);
  free(str);

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2867
movb 0x8(%rdi), %al
movq 0x18(%rdi), %rcx
movq 0x10(%rdi), %r14
incq %rcx
leaq -0x1(%rcx), %r15
cmpq $0x2, %rcx
je 0x27ff
cmpb $0x0, -0x2(%r14,%rcx)
movq %r15, %rcx
je 0x27ea
xorl %r12d, %r12d
cmpb $-0x1, %al
sete %r12b
leaq (%r12,%r15), %rdi
incq %rdi
callq 0x1150
movq %rax, %rbx
movb $0x2d, (%rax)
addq %r12, %rax
leaq -0x1(%r15), %rcx
movq %rcx, %rdx
movb (%r14,%rdx), %sil
addb $0x30, %sil
movb %sil, (%rax)
decq %rdx
incq %rax
cmpq %rcx, %rdx
jbe 0x2824
movq %rbx, %rax
addq %r12, %rax
movb $0x0, (%r15,%rax)
movq %rbx, %rdi
callq 0x3be4
movq %rax, %r14
movq %rbx, %rdi
callq 0x1030
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3b94(%rip), %rdi      # 0x6402
leaq 0x3b97(%rip), %rsi      # 0x640c
leaq 0x3c21(%rip), %rcx      # 0x649d
movl $0x6f, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_copy
obint * obint_copy(const obint *a){

  uint64_t i, most_sig;
  obint *copy;

  assert(a != NULL);

  most_sig = obint_most_sig(a);

  copy = obint_create_default(most_sig+1);
  for(i=0; i<= most_sig; i++) copy->digits[i] = a->digits[i];
  copy->sign = a->sign;

  return copy;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x28e4
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
leaq -0x1(%rcx), %r14
cmpq $0x1, %rcx
je 0x28ae
cmpb $0x0, -0x1(%rax,%rcx)
movq %r14, %rcx
je 0x289a
leaq 0x1(%r14), %rdi
callq 0x2541
movq $-0x1, %rcx
movq 0x10(%rbx), %rdx
movb 0x1(%rdx,%rcx), %dl
movq 0x10(%rax), %rsi
movb %dl, 0x1(%rsi,%rcx)
incq %rcx
cmpq %r14, %rcx
jb 0x28be
movb 0x8(%rbx), %cl
movb %cl, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3b17(%rip), %rdi      # 0x6402
leaq 0x3b1a(%rip), %rsi      # 0x640c
leaq 0x3bcd(%rip), %rcx      # 0x64c6
movl $0x86, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_add
obint * obint_add(const obint *a, const obint *b){

  int8_t cmp_result;
  obint *result;

  assert(a != NULL);
  assert(b != NULL);

  /* a and b are  of same sign */
  if((obint_is_negative(a) && obint_is_negative(b)) ||
     (!obint_is_negative(a) && !obint_is_negative(b))){
    result = obint_add_unsigned(a,b);
    result->sign = a->sign;
    return result;
  }

  /* a and b are of opposite sign */
  cmp_result = obint_compare_magnitudes(a,b);
  if(cmp_result == OB_LESS_THAN){
    result = obint_subtract_unsigned(b,a);
    result->sign = b->sign;
    return result;
  }
  else if(cmp_result == OB_GREATER_THAN){
    result = obint_subtract_unsigned(a,b);
    result->sign = a->sign;
    return result;
  }

  /* a and b are equal and opposite, result is 0 */
  return obint_new(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x29b8
movq %rsi, %r14
testq %rsi, %rsi
je 0x29d7
movq %rdi, %rbx
cmpb $-0x1, 0x8(%rdi)
sete %al
cmpb $-0x1, 0x8(%r14)
sete %cl
xorb %al, %cl
je 0x2982
movq %r14, %rsi
callq 0x2b97
cmpb $0x1, %al
je 0x298c
movzbl %al, %eax
cmpl $0xff, %eax
jne 0x29a5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2bf8
movb 0x8(%r14), %cl
jmp 0x299a
movq %r14, %rsi
callq 0x29f6
jmp 0x2997
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2bf8
movb 0x8(%rbx), %cl
movb %cl, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x1, %edi
callq 0x2541
movq 0x10(%rax), %rcx
movb $0x0, (%rcx)
jmp 0x299d
leaq 0x3a43(%rip), %rdi      # 0x6402
leaq 0x3a46(%rip), %rsi      # 0x640c
leaq 0x3b68(%rip), %rcx      # 0x6535
movl $0xa8, %edx
callq 0x10a0
leaq 0x3b86(%rip), %rdi      # 0x6564
leaq 0x3a27(%rip), %rsi      # 0x640c
leaq 0x3b49(%rip), %rcx      # 0x6535
movl $0xa9, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_compare_magnitudes
int8_t obint_compare_magnitudes(const obint *a, const obint *b){

  uint64_t i,j;

  i = obint_most_sig(a);
  j = obint_most_sig(b);

  if(i < j) return OB_LESS_THAN;
  if(i > j) return OB_GREATER_THAN;

  /* number of digits is equal, resort to digit by digit comparision */
  for( ; i<a->num_digits; i--){
    if(a->digits[i] < b->digits[i]) return OB_LESS_THAN;
    if(a->digits[i] > b->digits[i]) return OB_GREATER_THAN;
  }

  return OB_EQUAL_TO;
}

// Assembly:
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rdx
movq %rdx, %rax
leaq -0x1(%rax), %rdi
cmpq $0x1, %rax
je 0x2bb6
cmpb $0x0, -0x1(%rcx,%rax)
movq %rdi, %rax
je 0x2ba2
movq 0x10(%rsi), %r8
movq 0x18(%rsi), %rax
leaq -0x1(%rax), %rsi
cmpq $0x1, %rax
je 0x2bd3
cmpb $0x0, -0x1(%r8,%rax)
movq %rsi, %rax
je 0x2bbe
movb $-0x1, %al
cmpq %rsi, %rdi
jb 0x2bde
jbe 0x2bdf
movb $0x1, %al
retq
cmpq %rdx, %rdi
jae 0x2bf5
movb (%r8,%rdi), %sil
cmpb %sil, (%rcx,%rdi)
jl 0x2bde
jg 0x2bdc
decq %rdi
jmp 0x2bdf
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_subtract_unsigned
obint * obint_subtract_unsigned(const obint *a, const obint *b){

  uint64_t i, a_most_sig, b_most_sig;
  obint *result;

  result = obint_copy(a);

  a_most_sig = obint_most_sig(a);
  b_most_sig = obint_most_sig(b);

  for(i=0; i<=b_most_sig; i++){
    /* perform borrow operation if needed */
    if(result->digits[i] < b->digits[i]){
      result->digits[i+1]--;
      result->digits[i] += 10;
    }

    result->digits[i] -= b->digits[i];
  }

  /* propagate any final borrow */
  while(i < a_most_sig && result->digits[i] < 0){
    result->digits[i+1]--;
    result->digits[i] += 10;
    i++;
  }

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2886
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rsi
leaq -0x1(%rsi), %rcx
cmpq $0x1, %rsi
je 0x2c23
cmpb $0x0, -0x1(%rdx,%rsi)
movq %rcx, %rsi
je 0x2c0f
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdi
leaq -0x1(%rdi), %rdx
cmpq $0x1, %rdi
je 0x2c3f
cmpb $0x0, -0x1(%rsi,%rdi)
movq %rdx, %rdi
je 0x2c2b
xorl %esi, %esi
movq 0x10(%rax), %rdi
movb (%rdi,%rsi), %r8b
movq 0x10(%rbx), %r9
movb (%r9,%rsi), %r9b
cmpb %r9b, %r8b
jge 0x2c72
decb 0x1(%rdi,%rsi)
movq 0x10(%rax), %rdi
addb $0xa, (%rdi,%rsi)
movq 0x10(%rbx), %rdi
movb (%rdi,%rsi), %r9b
movq 0x10(%rax), %rdi
movb (%rdi,%rsi), %r8b
subb %r9b, %r8b
movb %r8b, (%rdi,%rsi)
leaq 0x1(%rsi), %rdi
cmpq %rdx, %rsi
movq %rdi, %rsi
jb 0x2c41
cmpq %rcx, %rdi
jae 0x2cac
movq 0x10(%rax), %rdx
cmpb $0x0, (%rdx,%rdi)
jns 0x2cac
decb 0x1(%rdx,%rdi)
movq 0x10(%rax), %rdx
addb $0xa, (%rdx,%rdi)
leaq 0x1(%rdi), %rdx
movq %rdx, %rdi
cmpq %rcx, %rdx
jb 0x2c8a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_add_primitive
obint * obint_add_primitive(const obint *a, int64_t b){

  obint *wrapper, *result;

  assert(a != NULL);

  wrapper = obint_new(b);
  result = obint_add(a, wrapper);
  ob_release((obj *)wrapper);

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2cec
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x24a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2930
movq %rax, %rbx
movq %r14, %rdi
callq 0x528a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x370f(%rip), %rdi      # 0x6402
leaq 0x3712(%rip), %rsi      # 0x640c
leaq 0x386d(%rip), %rcx      # 0x656e
movl $0xc9, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_subtract
obint * obint_subtract(const obint *a, const obint *b){

  int8_t cmp_result;
  obint *result;

  assert(a != NULL);
  assert(b != NULL);

  /* a and b are  of opposite sign */
  if((!obint_is_negative(a) && obint_is_negative(b)) ||
     (obint_is_negative(a) && !obint_is_negative(b))){
    result = obint_add_unsigned(a,b);
    result->sign = a->sign;
    return result;
  }

  /* a and b are of same sign */
  cmp_result = obint_compare_magnitudes(a,b);
  if(cmp_result == OB_LESS_THAN){
    result = obint_subtract_unsigned(b,a);
    result->sign = b->sign * -1;
    return result;
  }
  else if(cmp_result == OB_GREATER_THAN){
    result = obint_subtract_unsigned(a,b);
    result->sign = a->sign;
    return result;
  }

  /* a and b are equal and same, result is 0 */
  return obint_new(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2d9c
movq %rsi, %r14
testq %rsi, %rsi
je 0x2dbb
movq %rdi, %rbx
cmpb $-0x1, 0x8(%rdi)
sete %al
cmpb $-0x1, 0x8(%r14)
sete %cl
cmpb %cl, %al
je 0x2d44
movq %r14, %rsi
callq 0x29f6
jmp 0x2d7b
movq %r14, %rsi
callq 0x2b97
cmpb $0x1, %al
je 0x2d70
movzbl %al, %eax
cmpl $0xff, %eax
jne 0x2d89
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2bf8
xorl %ecx, %ecx
subb 0x8(%r14), %cl
movb %cl, 0x8(%rax)
jmp 0x2d81
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2bf8
movb 0x8(%rbx), %cl
movb %cl, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x1, %edi
callq 0x2541
movq 0x10(%rax), %rcx
movb $0x0, (%rcx)
jmp 0x2d81
leaq 0x365f(%rip), %rdi      # 0x6402
leaq 0x3662(%rip), %rsi      # 0x640c
leaq 0x37f0(%rip), %rcx      # 0x65a1
movl $0xd8, %edx
callq 0x10a0
leaq 0x37a2(%rip), %rdi      # 0x6564
leaq 0x3643(%rip), %rsi      # 0x640c
leaq 0x37d1(%rip), %rcx      # 0x65a1
movl $0xd9, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_subtract_primitive
obint * obint_subtract_primitive(const obint *a, int64_t b){

  obint *wrapper, *result;

  assert(a != NULL);

  wrapper = obint_new(b);
  result = obint_subtract(a, wrapper);
  ob_release((obj *)wrapper);

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2e12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x24a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2d0b
movq %rax, %rbx
movq %r14, %rdi
callq 0x528a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x35e9(%rip), %rdi      # 0x6402
leaq 0x35ec(%rip), %rsi      # 0x640c
leaq 0x37ae(%rip), %rcx      # 0x65d5
movl $0xf9, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_multiply
obint * obint_multiply(const obint *a, const obint *b){

  obint *result;

  assert(a != NULL);
  assert(b != NULL);

  result = obint_multiply_unsigned(a,b);
  result->sign = a->sign * b->sign;

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2e65
movq %rsi, %r14
testq %rsi, %rsi
je 0x2e84
movq %rdi, %rbx
movq %r14, %rsi
callq 0x2ea3
movq %rax, %rcx
movb 0x8(%r14), %al
mulb 0x8(%rbx)
movb %al, 0x8(%rcx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3596(%rip), %rdi      # 0x6402
leaq 0x3599(%rip), %rsi      # 0x640c
leaq 0x3793(%rip), %rcx      # 0x660d
movl $0x107, %edx            # imm = 0x107
callq 0x10a0
leaq 0x36d9(%rip), %rdi      # 0x6564
leaq 0x357a(%rip), %rsi      # 0x640c
leaq 0x3774(%rip), %rcx      # 0x660d
movl $0x108, %edx            # imm = 0x108
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_multiply_primitive
obint * obint_multiply_primitive(const obint *a, int64_t b){

  obint *wrapper, *result;

  assert(a != NULL);

  wrapper = obint_new(b);
  result = obint_multiply(a, wrapper);
  ob_release((obj *)wrapper);

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x31a4
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x24a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2e31
movq %rax, %rbx
movq %r14, %rdi
callq 0x528a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3257(%rip), %rdi      # 0x6402
leaq 0x325a(%rip), %rsi      # 0x640c
leaq 0x3488(%rip), %rcx      # 0x6641
movl $0x115, %edx            # imm = 0x115
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_divide
obint * obint_divide(const obint *a, const obint *b){

  obint *result, *seed;

  assert(a != NULL);
  assert(b != NULL);
  assert(obint_is_zero(b) == 0);

  seed = obint_new(0);
  result = obint_reduce(a, b, seed, 1);
  result->sign = a->sign * b->sign;
  ob_release((obj *)seed);

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x325a
movq %rsi, %r14
testq %rsi, %rsi
je 0x3279
movq %rdi, %rbx
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rcx
je 0x31ff
cmpb $0x0, -0x1(%rax,%rcx)
movq %rdx, %rcx
je 0x31eb
testq %rdx, %rdx
jne 0x320d
cmpb $0x0, (%rax)
je 0x3298
movl $0x1, %edi
callq 0x2541
movq %rax, %r15
movq 0x10(%rax), %rax
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x32b7
movq %rax, %r12
movb 0x8(%r14), %al
mulb 0x8(%rbx)
movb %al, 0x8(%r12)
movq %r15, %rdi
callq 0x528a
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x31a1(%rip), %rdi      # 0x6402
leaq 0x31a4(%rip), %rsi      # 0x640c
leaq 0x340a(%rip), %rcx      # 0x6679
movl $0x123, %edx            # imm = 0x123
callq 0x10a0
leaq 0x32e4(%rip), %rdi      # 0x6564
leaq 0x3185(%rip), %rsi      # 0x640c
leaq 0x33eb(%rip), %rcx      # 0x6679
movl $0x124, %edx            # imm = 0x124
callq 0x10a0
leaq 0x340c(%rip), %rdi      # 0x66ab
leaq 0x3166(%rip), %rsi      # 0x640c
leaq 0x33cc(%rip), %rcx      # 0x6679
movl $0x125, %edx            # imm = 0x125
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_divide_primitive
obint * obint_divide_primitive(const obint *a, int64_t b){

  obint *wrapper, *result;

  assert(a != NULL);
  assert(b != 0);

  wrapper = obint_new(b);
  result = obint_divide(a, wrapper);
  ob_release((obj *)wrapper);

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3646
testq %rsi, %rsi
je 0x3665
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x24a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x31c3
movq %rax, %rbx
movq %r14, %rdi
callq 0x528a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2db5(%rip), %rdi      # 0x6402
leaq 0x2db8(%rip), %rsi      # 0x640c
leaq 0x3066(%rip), %rcx      # 0x66c1
movl $0x134, %edx            # imm = 0x134
callq 0x10a0
leaq 0x308b(%rip), %rdi      # 0x66f7
leaq 0x2d99(%rip), %rsi      # 0x640c
leaq 0x3047(%rip), %rcx      # 0x66c1
movl $0x135, %edx            # imm = 0x135
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_mod
obint * obint_mod(const obint *a, const obint *b){

  obint *result, *seed;

  assert(a != NULL);
  assert(b != NULL);
  assert(obint_is_zero(b) == 0);

  seed = obint_new(0);
  result = obint_reduce(a, b, seed, 0);
  result->sign = a->sign;
  ob_release((obj *)seed);

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x3702
movq %rsi, %r14
testq %rsi, %rsi
je 0x3721
movq %rdi, %rbx
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rcx
je 0x36b9
cmpb $0x0, -0x1(%rax,%rcx)
movq %rdx, %rcx
je 0x36a5
testq %rdx, %rdx
jne 0x36c3
cmpb $0x0, (%rax)
je 0x3740
movl $0x1, %edi
callq 0x2541
movq %rax, %r15
movq 0x10(%rax), %rax
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x32b7
movq %rax, %r14
movb 0x8(%rbx), %al
movb %al, 0x8(%r14)
movq %r15, %rdi
callq 0x528a
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2cf9(%rip), %rdi      # 0x6402
leaq 0x2cfc(%rip), %rsi      # 0x640c
leaq 0x2fe7(%rip), %rcx      # 0x66fe
movl $0x143, %edx            # imm = 0x143
callq 0x10a0
leaq 0x2e3c(%rip), %rdi      # 0x6564
leaq 0x2cdd(%rip), %rsi      # 0x640c
leaq 0x2fc8(%rip), %rcx      # 0x66fe
movl $0x144, %edx            # imm = 0x144
callq 0x10a0
leaq 0x2f64(%rip), %rdi      # 0x66ab
leaq 0x2cbe(%rip), %rsi      # 0x640c
leaq 0x2fa9(%rip), %rcx      # 0x66fe
movl $0x145, %edx            # imm = 0x145
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_mod_primitive
obint * obint_mod_primitive(const obint *a, int64_t b){

  obint *wrapper, *result;

  assert(a != NULL);
  assert(b != 0);

  wrapper = obint_new(b);
  result = obint_mod(a, wrapper);
  ob_release((obj *)wrapper);

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x379c
testq %rsi, %rsi
je 0x37bb
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x24a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3684
movq %rax, %rbx
movq %r14, %rdi
callq 0x528a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2c5f(%rip), %rdi      # 0x6402
leaq 0x2c62(%rip), %rsi      # 0x640c
leaq 0x2f7c(%rip), %rcx      # 0x672d
movl $0x154, %edx            # imm = 0x154
callq 0x10a0
leaq 0x2f35(%rip), %rdi      # 0x66f7
leaq 0x2c43(%rip), %rsi      # 0x640c
leaq 0x2f5d(%rip), %rcx      # 0x672d
movl $0x155, %edx            # imm = 0x155
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_destroy
void obint_destroy(obj *to_dealloc){

  /* cast generic obj to obint */
  obint *instance = (obint *)to_dealloc;

  assert(to_dealloc);
  assert(ob_has_class(to_dealloc, "obint"));

  free(instance->digits);

  return;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x37fd
movq %rdi, %rbx
leaq 0x313b(%rip), %rsi      # 0x6925
callq 0x5304
testb %al, %al
je 0x381c
movq 0x10(%rbx), %rdi
popq %rbx
jmp 0x1030
leaq 0x30b6(%rip), %rdi      # 0x68ba
leaq 0x2c01(%rip), %rsi      # 0x640c
leaq 0x30b3(%rip), %rcx      # 0x68c5
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x10a0
leaq 0x30bc(%rip), %rdi      # 0x68df
leaq 0x2be2(%rip), %rsi      # 0x640c
leaq 0x3094(%rip), %rcx      # 0x68c5
movl $0x1e6, %edx            # imm = 0x1E6
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_hash
ob_hash_t obint_hash(const obj *to_hash){

  static int8_t init = 0;
  static ob_hash_t seed = 0;

  uint64_t i;
  ob_hash_t value;
  obint *instance = (obint *)to_hash;

  assert(to_hash);
  assert(ob_has_class(to_hash, "obint"));

  if(init == 0){
    srand(time(NULL));
    seed = rand();
    init = 1;
  }

  value = seed;

  i = obint_most_sig(instance);

  /* A version of Jenkin's one at a time hash function */
  for( ; i<instance->num_digits; i--){
    value += instance->digits[i];
    value += value << 10;
    value ^= value >> 6;
  }

  value += value << 3;
  value ^= value >> 11;
  value *= value << 15;
  return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x38ee
movq %rdi, %rbx
leaq 0x30d6(%rip), %rsi      # 0x6925
callq 0x5304
testb %al, %al
je 0x390d
cmpb $0x1, 0x688d(%rip)      # 0xa0f0
jne 0x386e
movq 0x688c(%rip), %rax      # 0xa0f8
jmp 0x3891
xorl %edi, %edi
callq 0x1140
movl %eax, %edi
callq 0x10e0
callq 0x1190
cltq
movq %rax, 0x686e(%rip)      # 0xa0f8
movb $0x1, 0x685f(%rip)      # 0xa0f0
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rdx
movq %rdx, %rdi
leaq -0x1(%rdi), %rsi
cmpq $0x1, %rdi
je 0x38d1
cmpb $0x0, -0x1(%rcx,%rdi)
movq %rsi, %rdi
je 0x389c
jmp 0x38d1
movsbq (%rcx,%rsi), %rdi
addq %rax, %rdi
movq %rdi, %r8
shlq $0xa, %r8
addq %rdi, %r8
movq %r8, %rax
shrq $0x6, %rax
xorq %r8, %rax
decq %rsi
cmpq %rdx, %rsi
jb 0x38b2
leaq (%rax,%rax,8), %rcx
movq %rcx, %rax
shrq $0xb, %rax
xorq %rcx, %rax
imulq %rax, %rax
shlq $0xf, %rax
popq %rbx
retq
leaq 0x2ec3(%rip), %rdi      # 0x67b8
leaq 0x2b10(%rip), %rsi      # 0x640c
leaq 0x2ebd(%rip), %rcx      # 0x67c0
movl $0x182, %edx            # imm = 0x182
callq 0x10a0
leaq 0x2ece(%rip), %rdi      # 0x67e2
leaq 0x2af1(%rip), %rsi      # 0x640c
leaq 0x2e9e(%rip), %rcx      # 0x67c0
movl $0x183, %edx            # imm = 0x183
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_compare
int8_t obint_compare(const obj *a, const obj *b){

  int8_t magnitude_comp;
  const obint *comp_a = (obint *)a;
  const obint *comp_b = (obint *)b;

  assert(a);
  assert(b);
  assert(ob_has_class(a, "obint"));
  assert(ob_has_class(b, "obint"));

  /* if signs are equal magnitude comparision is required */
  if(comp_a->sign == comp_b->sign){

    magnitude_comp = obint_compare_magnitudes(comp_a, comp_b);

    /* reverse magnitude comparision if both are negative */
    if(comp_a->sign == -1){
      if(magnitude_comp == OB_LESS_THAN) magnitude_comp = OB_GREATER_THAN;
      else if(magnitude_comp == OB_GREATER_THAN) magnitude_comp = OB_LESS_THAN;
    }

    return magnitude_comp;
  }

  if(comp_a->sign == -1) return OB_LESS_THAN;
  return OB_GREATER_THAN;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x39b1
movq %rsi, %rbx
testq %rsi, %rsi
je 0x39d0
movq %rdi, %r14
leaq 0x2fda(%rip), %rsi      # 0x6925
callq 0x5304
testb %al, %al
je 0x39ef
leaq 0x2fc6(%rip), %rsi      # 0x6925
movq %rbx, %rdi
callq 0x5304
testb %al, %al
je 0x3a0e
movb 0x8(%r14), %bpl
cmpb 0x8(%rbx), %bpl
jne 0x399d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b97
cmpb $-0x1, %bpl
jne 0x39a8
cmpb $-0x1, %al
je 0x39ad
cmpb $0x1, %al
movzbl %al, %ecx
movl $0xff, %eax
cmovnel %ecx, %eax
jmp 0x39a8
cmpb $-0x1, %bpl
sete %al
negb %al
orb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
jmp 0x39a8
leaq 0x2e49(%rip), %rdi      # 0x6801
leaq 0x2a4d(%rip), %rsi      # 0x640c
leaq 0x2e3d(%rip), %rcx      # 0x6803
movl $0x1a3, %edx            # imm = 0x1A3
callq 0x10a0
leaq 0x2737(%rip), %rdi      # 0x610e
leaq 0x2a2e(%rip), %rsi      # 0x640c
leaq 0x2e1e(%rip), %rcx      # 0x6803
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x10a0
leaq 0x2e3c(%rip), %rdi      # 0x6832
leaq 0x2a0f(%rip), %rsi      # 0x640c
leaq 0x2dff(%rip), %rcx      # 0x6803
movl $0x1a5, %edx            # imm = 0x1A5
callq 0x10a0
leaq 0x2e36(%rip), %rdi      # 0x684b
leaq 0x29f0(%rip), %rsi      # 0x640c
leaq 0x2de0(%rip), %rcx      # 0x6803
movl $0x1a6, %edx            # imm = 0x1A6
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_display
void obint_display(const obj *to_print){

  obstring *str;
  const obint *instance = (obint *)to_print;

  assert(to_print);
  assert(ob_has_class(to_print, "obint"));

  str = obint_to_string(instance);
  fprintf(stderr, "Value:\n  %s\n", obstring_cstring(str));

  ob_release((obj *)str);

  return;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x3a50
movq %rdi, %rbx
leaq 0x2ee8(%rip), %rsi      # 0x6925
callq 0x5304
testb %al, %al
je 0x3a6f
movq %rbx, %rdi
callq 0x11b0
popq %rbx
retq
leaq 0x2e0d(%rip), %rdi      # 0x6864
leaq 0x29ae(%rip), %rsi      # 0x640c
leaq 0x2e08(%rip), %rcx      # 0x686d
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x10a0
leaq 0x2e17(%rip), %rdi      # 0x688d
leaq 0x298f(%rip), %rsi      # 0x640c
leaq 0x2de9(%rip), %rcx      # 0x686d
movl $0x1d5, %edx            # imm = 0x1D5
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_magnitude
int64_t obint_magnitude(const obint *a){

  uint64_t i, most_sig;
  int64_t val;

  most_sig = obint_most_sig(a);
  val = 0;

  for(i=most_sig ; i <= most_sig; i--){
    val *= 10;
    val += a->digits[i];
  }

  return val;
}

// Assembly:
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rax
leaq -0x1(%rax), %rdx
cmpq $0x1, %rax
je 0x3aaa
cmpb $0x0, -0x1(%rcx,%rax)
movq %rdx, %rax
je 0x3a96
xorl %eax, %eax
movq %rdx, %rsi
leaq (%rax,%rax,4), %rax
movsbq (%rcx,%rsi), %rdi
leaq (%rdi,%rax,2), %rax
decq %rsi
cmpq %rdx, %rsi
jbe 0x3aaf
retq
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_split
void obint_split(const obint *a, uint64_t i, obint **b1, obint **b0){

  if(a->num_digits <= i){
    *b1 = obint_create_default(1);
    *b0 = obint_create_default(a->num_digits);
    memcpy((*b0)->digits, a->digits, a->num_digits);
  }
  else{
    *b1 = obint_create_default(a->num_digits - i);
    memcpy((*b1)->digits, (a->digits + i), a->num_digits-i);
    *b0 = obint_create_default(i);
    memcpy((*b0)->digits, (a->digits), i);
  }

  return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
subq %rsi, %rdi
jbe 0x3b1a
movq %rsi, %r15
callq 0x2541
movq %rax, (%r12)
movq 0x10(%rax), %rdi
movq 0x10(%rbx), %rsi
addq %r15, %rsi
movq 0x18(%rbx), %rdx
subq %r15, %rdx
callq 0x1120
movq %r15, %rdi
callq 0x2541
movq %rax, (%r14)
movq 0x10(%rax), %rdi
movq 0x10(%rbx), %rsi
movq %r15, %rdx
jmp 0x3b40
movl $0x1, %edi
callq 0x2541
movq %rax, (%r12)
movq 0x18(%rbx), %rdi
callq 0x2541
movq %rax, (%r14)
movq 0x10(%rax), %rdi
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1120
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obint.c
// Function: obint_shift
void obint_shift(obint *a, uint64_t m){

  int8_t *digits;

  /* if shifting by zero do nothing */
  if(m == 0) return;

  digits = malloc(sizeof(int8_t)*(a->num_digits + m));
  assert(digits);

  memset(digits, 0, m);
  memcpy(digits+m, a->digits, a->num_digits);

  free(a->digits);
  a->digits = digits;
  a->num_digits += m;

  return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x3bab
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %r12
leaq (%r12,%rsi), %rdi
callq 0x1150
testq %rax, %rax
je 0x3bb5
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x10b0
movq %r15, %rdi
addq %rbx, %rdi
movq 0x10(%r14), %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x1120
movq %r13, %rdi
callq 0x1030
movq %r15, 0x10(%r14)
addq %rbx, 0x18(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2564(%rip), %rdi      # 0x6120
leaq 0x2849(%rip), %rsi      # 0x640c
leaq 0x2d37(%rip), %rcx      # 0x6901
movl $0x2fa, %edx            # imm = 0x2FA
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_new
obstring *obstring_new(const char *str){

  obstring *instance;

  assert(str);

  instance = obstring_create_default();

  instance->length = strlen(str);
  instance->str = realloc(instance->str, (instance->length+1)*sizeof(char));
  assert(instance->str);

  strcpy(instance->str, str);

  return instance;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3c2f
movq %rdi, %rbx
callq 0x3c6d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1090
movl %eax, 0x10(%r14)
movq 0x8(%r14), %rdi
leal 0x1(%rax), %esi
callq 0x1170
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x3c4e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2e29(%rip), %rdi      # 0x6a5f
leaq 0x2cee(%rip), %rsi      # 0x692b
leaq 0x2cfe(%rip), %rcx      # 0x6942
movl $0x13, %edx
callq 0x10a0
leaq 0x2f92(%rip), %rdi      # 0x6be7
leaq 0x2ccf(%rip), %rsi      # 0x692b
leaq 0x2cdf(%rip), %rcx      # 0x6942
movl $0x19, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_create_default
obstring * obstring_create_default(void){

  static const char classname[] = "obstring";
  obstring *new_instance = malloc(sizeof(obstring));
  assert(new_instance != NULL);

  /* initialize base class data */
  ob_init_base((obj *)new_instance, &obstring_destroy, &obstring_hash,
               &obstring_compare, &obstring_display, classname);

  new_instance->str = malloc(sizeof(char));
  assert(new_instance->str);
  new_instance->str[0] = '\0';
  new_instance->length = 0;

  return new_instance;
}

// Assembly:
pushq %rbx
movl $0x18, %edi
callq 0x1150
testq %rax, %rax
je 0x3ccd
movq %rax, %rbx
leaq 0x5fe(%rip), %rsi       # 0x4285
leaq 0x65f(%rip), %rdx       # 0x42ed
leaq 0x737(%rip), %rcx       # 0x43cc
leaq 0x840(%rip), %r8        # 0x44dc
leaq 0x30a4(%rip), %r9       # 0x6d47
movq %rax, %rdi
callq 0x50dc
movl $0x1, %edi
callq 0x1150
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3cec
movb $0x0, (%rax)
movl $0x0, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
retq
leaq 0x2a8c(%rip), %rdi      # 0x6760
leaq 0x2c50(%rip), %rsi      # 0x692b
leaq 0x2ed9(%rip), %rcx      # 0x6bbb
movl $0xd4, %edx
callq 0x10a0
leaq 0x2ef0(%rip), %rdi      # 0x6be3
leaq 0x2c31(%rip), %rsi      # 0x692b
leaq 0x2eba(%rip), %rcx      # 0x6bbb
movl $0xdb, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_copy_substring
obstring * obstring_copy_substring(const obstring *s, int64_t start, uint32_t length){

  obstring *instance;

  assert(s);

  instance = obstring_create_default();

  /* account for negative indexing */
  if(start < 0) start += s->length;

  /* if negative indexing beyond start of string then modify range */
  if(start < 0){
    length += start; /* shrink length to not copy out of range space */
    start = 0;
  }

  /* if indexing beyond end of string then shrink lenght to not copy out of
   * range space */
  if(start+length > s->length) length = s->length - start;

  /* if specified range contains no characters return an "empty" string */
  if(start > s->length || start+length < 0 || s->length == 0 || length <= 0)
    return instance;

  instance->length = length;
  instance->str = realloc(instance->str, (length+1)*sizeof(char));
  assert(instance->str);

  strncpy(instance->str, s->str+start, length);
  instance->str[length] = '\0';

  return instance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3dbb
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3c6d
movl 0x10(%rbx), %ecx
movq %r14, %rdx
sarq $0x3f, %rdx
andl %ecx, %edx
addq %r14, %rdx
xorl %esi, %esi
testq %rdx, %rdx
movl $0x0, %r15d
cmovgq %rdx, %r15
movq %rax, %r14
cmovsq %rdx, %rsi
addl %ebp, %esi
leaq (%rsi,%r15), %rax
movl %ecx, %r13d
subl %r15d, %r13d
cmpq %rcx, %rax
cmovbel %esi, %r13d
cmpq %rcx, %rdx
jg 0x3da9
testl %ecx, %ecx
je 0x3da9
testl %r13d, %r13d
je 0x3da9
movl %r13d, 0x10(%r14)
movq 0x8(%r14), %rdi
leal 0x1(%r13), %esi
callq 0x1170
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x3dda
movq %rax, %r12
movl %r13d, %r13d
addq 0x8(%rbx), %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1040
movb $0x0, (%r12,%r13)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2363(%rip), %rdi      # 0x6125
leaq 0x2b62(%rip), %rsi      # 0x692b
leaq 0x2b97(%rip), %rcx      # 0x6967
movl $0x25, %edx
callq 0x10a0
leaq 0x2e06(%rip), %rdi      # 0x6be7
leaq 0x2b43(%rip), %rsi      # 0x692b
leaq 0x2b78(%rip), %rcx      # 0x6967
movl $0x3c, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_char_at_index
char obstring_char_at_index(const obstring *s, int64_t i){

  assert(s);

  if(i < 0) i += s->length; /* account for negative indexing */
  if(i >= s->length || i < 0) return '\0';
  return s->str[i];
}

// Assembly:
testq %rdi, %rdi
je 0x3e46
movl 0x10(%rdi), %ecx
movq %rsi, %rax
sarq $0x3f, %rax
andl %ecx, %eax
addq %rsi, %rax
cmpq %rcx, %rax
jae 0x3e43
movq 0x8(%rdi), %rcx
movb (%rcx,%rax), %al
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x22d7(%rip), %rdi      # 0x6125
leaq 0x2ad6(%rip), %rsi      # 0x692b
leaq 0x2b7d(%rip), %rcx      # 0x69d9
movl $0x4d, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_concat
obstring * obstring_concat(const obstring *s1, const obstring *s2){

  obstring *concatted;

  assert(s1);
  assert(s2);

  concatted = obstring_create_default();
  concatted->length = s1->length + s2->length;

  if(concatted->length == 0) return concatted;

  concatted->str = realloc(concatted->str, (concatted->length+1)*sizeof(char));
  assert(concatted->str);

  if(s1->length > 0) strcpy(concatted->str, s1->str);
  if(s2->length > 0) strcpy(concatted->str+s1->length, s2->str);

  return concatted;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x3ee5
movq %rsi, %rbx
testq %rsi, %rsi
je 0x3f04
movq %rdi, %r15
callq 0x3c6d
movq %rax, %r14
movl 0x10(%rbx), %esi
addl 0x10(%r15), %esi
movl %esi, 0x10(%rax)
je 0x3ed8
movq 0x8(%r14), %rdi
incl %esi
callq 0x1170
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x3f23
movq %rax, %r12
movl 0x10(%r15), %r13d
testq %r13, %r13
je 0x3ec3
movq 0x8(%r15), %rsi
movq %r12, %rdi
callq 0x1060
cmpl $0x0, 0x10(%rbx)
je 0x3ed8
addq %r13, %r12
movq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x1060
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2b24(%rip), %rdi      # 0x6a10
leaq 0x2a38(%rip), %rsi      # 0x692b
leaq 0x2b19(%rip), %rcx      # 0x6a13
movl $0x59, %edx
callq 0x10a0
leaq 0x2b46(%rip), %rdi      # 0x6a51
leaq 0x2a19(%rip), %rsi      # 0x692b
leaq 0x2afa(%rip), %rcx      # 0x6a13
movl $0x5a, %edx
callq 0x10a0
leaq 0x2b2a(%rip), %rdi      # 0x6a54
leaq 0x29fa(%rip), %rsi      # 0x692b
leaq 0x2adb(%rip), %rcx      # 0x6a13
movl $0x62, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_split
obvector * obstring_split(const obstring *s, const char *delim){

  obvector *tokens;
  obstring *copy, *substring;
  char *marker;
  uint32_t i, delim_len, substrs;


  assert(s);
  assert(delim);

  tokens = obvector_new(1);
  copy = obstring_copy_substring(s, 0, s->length);
  delim_len = strlen(delim);
  marker = copy->str;

  /* overwrite all instance of delimeter with NUL character(s) */
  while(marker <= copy->str+(copy->length - delim_len)){
    if(strncmp(marker, delim, delim_len) == 0)
      for(i=0; i<delim_len; i++) *(marker++) = '\0';
    else
      marker++;
  }

  marker = copy->str;

  /* copy all found substrings into new obstrings for Vector */
  substrs=0;
  while(marker < copy->str+copy->length){
    substring = obstring_new(marker);
    marker += substring->length;
    obvector_store_at_index(tokens, (obj *)substring, substrs++);
    ob_release((obj *)substring); /* only tokens vector needs a reference */
    while(*marker == '\0' && marker < copy->str + copy->length) marker++;
  }

  ob_release((obj *)copy);
  return tokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x4098
movq %rsi, %r12
testq %rsi, %rsi
je 0x40b7
movq %rdi, %rbx
movl $0x1, %edi
callq 0x4540
movq %rax, 0x8(%rsp)
movl 0x10(%rbx), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3d0b
movq %rax, %r14
movq %r12, %rdi
callq 0x1090
movq %rax, %r13
movq 0x8(%r14), %r15
movl %r13d, %ebp
decl %eax
incq %rax
movq %rax, 0x10(%rsp)
movq %r15, %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1050
testl %eax, %eax
je 0x3fe7
incq %rbx
jmp 0x4002
testl %r13d, %r13d
je 0x4002
movq %rbx, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x10b0
addq 0x10(%rsp), %rbx
movq 0x8(%r14), %r15
movl 0x10(%r14), %eax
movl %eax, %ecx
subl %r13d, %ecx
addq %r15, %rcx
cmpq %rcx, %rbx
jbe 0x3fd0
testl %eax, %eax
je 0x407c
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x3be4
movq %rax, %rbx
movl 0x10(%rax), %r13d
leaq (%r15,%r13), %r12
movl %ebp, %edx
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x46c9
movq %rbx, %rdi
callq 0x528a
cmpb $0x0, (%r15,%r13)
movq 0x8(%r14), %rax
movl 0x10(%r14), %ecx
je 0x4061
movq %r12, %r15
incl %ebp
addq %rcx, %rax
cmpq %rax, %r15
jb 0x4019
jmp 0x407c
leaq (%rax,%rcx), %rdx
cmpq %rdx, %r12
jae 0x4052
leaq 0x1(%r12), %r15
cmpb $0x0, 0x1(%r12)
movq %r15, %r12
je 0x4065
jmp 0x4055
movq %r14, %rdi
callq 0x528a
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2086(%rip), %rdi      # 0x6125
leaq 0x2885(%rip), %rsi      # 0x692b
leaq 0x29e5(%rip), %rcx      # 0x6a92
movl $0x79, %edx
callq 0x10a0
leaq 0x2a0d(%rip), %rdi      # 0x6acb
leaq 0x2866(%rip), %rsi      # 0x692b
leaq 0x29c6(%rip), %rcx      # 0x6a92
movl $0x7a, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_find_substring
uint8_t obstring_find_substring(const obstring *s, const char *substring){

  uint32_t sublen;
  char *marker;

  assert(s);
  assert(substring);

  sublen = strlen(substring);

  for(marker = s->str; marker <= s->str +(s->length - sublen); marker++)
    if(strncmp(marker, substring, sublen) == 0) return 1;

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4135
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4154
movq %rdi, %r12
movq %rbx, %rdi
callq 0x1090
movq 0x8(%r12), %r14
movl %eax, %r15d
movl 0x10(%r12), %r12d
subl %eax, %r12d
addq %r14, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1050
testl %eax, %eax
je 0x4127
incq %r14
cmpq %r12, %r14
jbe 0x4109
xorl %eax, %eax
jmp 0x4129
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1fe9(%rip), %rdi      # 0x6125
leaq 0x27e8(%rip), %rsi      # 0x692b
leaq 0x2987(%rip), %rcx      # 0x6ad1
movl $0x9f, %edx
callq 0x10a0
leaq 0x29b6(%rip), %rdi      # 0x6b11
leaq 0x27c9(%rip), %rsi      # 0x692b
leaq 0x2968(%rip), %rcx      # 0x6ad1
movl $0xa0, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_match_regex
obstring * obstring_match_regex(const obstring *s, const char *regex){

  regex_t comp_regex;
  regmatch_t match;
  int errcode;
  char errbuf[REGEX_ERROR_BUFFER_SIZE];

  assert(s);
  assert(regex);

  /* compile regex */
  if((errcode = regcomp(&comp_regex, regex, REG_EXTENDED))){
    regerror(errcode, &comp_regex, errbuf, REGEX_ERROR_BUFFER_SIZE);
    fprintf(stderr, "obstring::obstring_match_regex recieved improper regex\n"
                    "Regex supplied: %s\nError string:%s\n", regex, errbuf);

    regfree(&comp_regex);
    return obstring_new("");
  }

  /* match regex, returning empty string if no match was found */
  if(regexec(&comp_regex, s->str, 1, &match, 0)){
    regfree(&comp_regex);
    return obstring_new("");
  }

  regfree(&comp_regex);

  /* return a new string containing the matching range */
  return obstring_copy_substring(s, match.rm_so, match.rm_eo - match.rm_so);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
testq %rdi, %rdi
je 0x4247
movq %rsi, %r14
testq %rsi, %rsi
je 0x4266
movq %rdi, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x10c0
testl %eax, %eax
jne 0x4205
movq 0x8(%rbx), %rsi
movq %rsp, %r14
leaq 0x40(%rsp), %rcx
movl $0x1, %edx
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x1160
movl %eax, %ebp
movq %r14, %rdi
callq 0x1080
testl %ebp, %ebp
je 0x41e4
leaq 0x3031(%rip), %rdi      # 0x720e
callq 0x3be4
jmp 0x41f7
movslq 0x40(%rsp), %rsi
movl 0x44(%rsp), %edx
subl %esi, %edx
movq %rbx, %rdi
callq 0x3d0b
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rbx
leaq 0x40(%rsp), %r15
movl $0x100, %ecx            # imm = 0x100
movl %eax, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1130
movq 0x5dd2(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x2930(%rip), %rsi      # 0x6b60
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1110
movq %rbx, %rdi
callq 0x1080
jmp 0x41d6
leaq 0x1ed7(%rip), %rdi      # 0x6125
leaq 0x26d6(%rip), %rsi      # 0x692b
leaq 0x28bf(%rip), %rcx      # 0x6b1b
movl $0xb2, %edx
callq 0x10a0
leaq 0x28ed(%rip), %rdi      # 0x6b5a
leaq 0x26b7(%rip), %rsi      # 0x692b
leaq 0x28a0(%rip), %rcx      # 0x6b1b
movl $0xb3, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_destroy
void obstring_destroy(obj *to_dealloc){

  /* cast generic obj to obstring */
  obstring *instance = (obstring *)to_dealloc;

  assert(to_dealloc);
  assert(ob_has_class(to_dealloc, "obstring"));

  if(instance->str) free(instance->str);

  return;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x42af
movq %rdi, %rbx
leaq 0x2ab2(%rip), %rsi      # 0x6d47
callq 0x5304
testb %al, %al
je 0x42ce
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x42ad
popq %rbx
jmp 0x1030
popq %rbx
retq
leaq 0x2604(%rip), %rdi      # 0x68ba
leaq 0x266e(%rip), %rsi      # 0x692b
leaq 0x2a41(%rip), %rcx      # 0x6d05
movl $0x12a, %edx            # imm = 0x12A
callq 0x10a0
leaq 0x2a4d(%rip), %rdi      # 0x6d22
leaq 0x264f(%rip), %rsi      # 0x692b
leaq 0x2a22(%rip), %rcx      # 0x6d05
movl $0x12b, %edx            # imm = 0x12B
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_hash
ob_hash_t obstring_hash(const obj *to_hash){

  static int8_t init = 0;
  static ob_hash_t seed;

  obstring *instance = (obstring *)to_hash;
  ob_hash_t value;
  char *pos;

  assert(to_hash);
  assert(ob_has_class(to_hash, "obstring"));

  if(init == 0){
    srand(time(NULL));
    seed = rand();
    init = 1;
  }

  value = seed;

  /* A version of Jenkin's one at a time hash function */
  pos = instance->str;
  while(*pos != '\0'){
    value += *(pos++);
    value += value << 10;
    value ^= value >> 6;
  }

  value += value << 3;
  value ^= value >> 11;
  value += value << 15;
  return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x438e
movq %rdi, %rbx
leaq 0x2a46(%rip), %rsi      # 0x6d47
callq 0x5304
testb %al, %al
je 0x43ad
cmpb $0x1, 0x5deb(%rip)      # 0xa100
jne 0x4320
movq 0x5dea(%rip), %rax      # 0xa108
jmp 0x4343
xorl %edi, %edi
callq 0x1140
movl %eax, %edi
callq 0x10e0
callq 0x1190
cltq
movq %rax, 0x5dcc(%rip)      # 0xa108
movb $0x1, 0x5dbd(%rip)      # 0xa100
movq 0x8(%rbx), %rcx
movb (%rcx), %dl
testb %dl, %dl
je 0x4374
incq %rcx
movsbq %dl, %rdx
addq %rax, %rdx
movq %rdx, %rsi
shlq $0xa, %rsi
addq %rdx, %rsi
movq %rsi, %rax
shrq $0x6, %rax
xorq %rsi, %rax
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x4350
leaq (%rax,%rax,8), %rax
movq %rax, %rcx
shrq $0xb, %rcx
xorq %rax, %rcx
movq %rcx, %rax
shlq $0xf, %rax
addq %rcx, %rax
popq %rbx
retq
leaq 0x2423(%rip), %rdi      # 0x67b8
leaq 0x258f(%rip), %rsi      # 0x692b
leaq 0x2852(%rip), %rcx      # 0x6bf5
movl $0xec, %edx
callq 0x10a0
leaq 0x2866(%rip), %rdi      # 0x6c1a
leaq 0x2570(%rip), %rsi      # 0x692b
leaq 0x2833(%rip), %rcx      # 0x6bf5
movl $0xed, %edx
callq 0x10a0