LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x2dbc
movq %rsi, %r14
testq %rsi, %rsi
je 0x2ddb
movq %rdi, %rbx
movb 0x8(%rdi), %al
cmpb $-0x1, %al
je 0x2d4d
cmpb $-0x1, 0x8(%r14)
je 0x2d54
cmpb $-0x1, %al
jne 0x2d61
cmpb $-0x1, 0x8(%r14)
je 0x2d61
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a00
jmp 0x2d9b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2bb5
cmpb $0x1, %al
je 0x2d90
movzbl %al, %eax
cmpl $0xff, %eax
jne 0x2da9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2c16
xorl %ecx, %ecx
subb 0x8(%r14), %cl
movb %cl, 0x8(%rax)
jmp 0x2da1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c16
movb 0x8(%rbx), %cl
movb %cl, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x1, %edi
callq 0x2531
movq 0x10(%rax), %rcx
movb $0x0, (%rcx)
jmp 0x2da1
leaq 0x363f(%rip), %rdi      # 0x6402
leaq 0x3642(%rip), %rsi      # 0x640c
leaq 0x37d0(%rip), %rcx      # 0x65a1
movl $0xd8, %edx
callq 0x10a0
leaq 0x3782(%rip), %rdi      # 0x6564
leaq 0x3623(%rip), %rsi      # 0x640c
leaq 0x37b1(%rip), %rcx      # 0x65a1
movl $0xd9, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x2e32
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2490
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2d1f
movq %rax, %rbx
movq %r14, %rdi
callq 0x51fa
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x35c9(%rip), %rdi      # 0x6402
leaq 0x35cc(%rip), %rsi      # 0x640c
leaq 0x378e(%rip), %rcx      # 0x65d5
movl $0xf9, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x2e85
movq %rsi, %r14
testq %rsi, %rsi
je 0x2ea4
movq %rdi, %rbx
movq %r14, %rsi
callq 0x2ec3
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 0x3576(%rip), %rdi      # 0x6402
leaq 0x3579(%rip), %rsi      # 0x640c
leaq 0x3773(%rip), %rcx      # 0x660d
movl $0x107, %edx            # imm = 0x107
callq 0x10a0
leaq 0x36b9(%rip), %rdi      # 0x6564
leaq 0x355a(%rip), %rsi      # 0x640c
leaq 0x3754(%rip), %rcx      # 0x660d
movl $0x108, %edx            # imm = 0x108
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x31c4
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2490
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2e51
movq %rax, %rbx
movq %r14, %rdi
callq 0x51fa
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3237(%rip), %rdi      # 0x6402
leaq 0x323a(%rip), %rsi      # 0x640c
leaq 0x3468(%rip), %rcx      # 0x6641
movl $0x115, %edx            # imm = 0x115
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x327a
movq %rsi, %r14
testq %rsi, %rsi
je 0x3299
movq %rdi, %rbx
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rcx
je 0x321f
cmpb $0x0, -0x1(%rax,%rcx)
movq %rdx, %rcx
je 0x320b
testq %rdx, %rdx
jne 0x322d
cmpb $0x0, (%rax)
je 0x32b8
movl $0x1, %edi
callq 0x2531
movq %rax, %r15
movq 0x10(%rax), %rax
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x32d7
movq %rax, %r12
movb 0x8(%r14), %al
mulb 0x8(%rbx)
movb %al, 0x8(%r12)
movq %r15, %rdi
callq 0x51fa
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3181(%rip), %rdi      # 0x6402
leaq 0x3184(%rip), %rsi      # 0x640c
leaq 0x33ea(%rip), %rcx      # 0x6679
movl $0x123, %edx            # imm = 0x123
callq 0x10a0
leaq 0x32c4(%rip), %rdi      # 0x6564
leaq 0x3165(%rip), %rsi      # 0x640c
leaq 0x33cb(%rip), %rcx      # 0x6679
movl $0x124, %edx            # imm = 0x124
callq 0x10a0
leaq 0x33ec(%rip), %rdi      # 0x66ab
leaq 0x3146(%rip), %rsi      # 0x640c
leaq 0x33ac(%rip), %rcx      # 0x6679
movl $0x125, %edx            # imm = 0x125
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x3666
testq %rsi, %rsi
je 0x3685
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2490
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x31e3
movq %rax, %rbx
movq %r14, %rdi
callq 0x51fa
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2d95(%rip), %rdi      # 0x6402
leaq 0x2d98(%rip), %rsi      # 0x640c
leaq 0x3046(%rip), %rcx      # 0x66c1
movl $0x134, %edx            # imm = 0x134
callq 0x10a0
leaq 0x306b(%rip), %rdi      # 0x66f7
leaq 0x2d79(%rip), %rsi      # 0x640c
leaq 0x3027(%rip), %rcx      # 0x66c1
movl $0x135, %edx            # imm = 0x135
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x3722
movq %rsi, %r14
testq %rsi, %rsi
je 0x3741
movq %rdi, %rbx
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x1, %rcx
je 0x36d9
cmpb $0x0, -0x1(%rax,%rcx)
movq %rdx, %rcx
je 0x36c5
testq %rdx, %rdx
jne 0x36e3
cmpb $0x0, (%rax)
je 0x3760
movl $0x1, %edi
callq 0x2531
movq %rax, %r15
movq 0x10(%rax), %rax
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x32d7
movq %rax, %r14
movb 0x8(%rbx), %al
movb %al, 0x8(%r14)
movq %r15, %rdi
callq 0x51fa
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2cd9(%rip), %rdi      # 0x6402
leaq 0x2cdc(%rip), %rsi      # 0x640c
leaq 0x2fc7(%rip), %rcx      # 0x66fe
movl $0x143, %edx            # imm = 0x143
callq 0x10a0
leaq 0x2e1c(%rip), %rdi      # 0x6564
leaq 0x2cbd(%rip), %rsi      # 0x640c
leaq 0x2fa8(%rip), %rcx      # 0x66fe
movl $0x144, %edx            # imm = 0x144
callq 0x10a0
leaq 0x2f44(%rip), %rdi      # 0x66ab
leaq 0x2c9e(%rip), %rsi      # 0x640c
leaq 0x2f89(%rip), %rcx      # 0x66fe
movl $0x145, %edx            # imm = 0x145
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x37bc
testq %rsi, %rsi
je 0x37db
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2490
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x36a4
movq %rax, %rbx
movq %r14, %rdi
callq 0x51fa
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2c3f(%rip), %rdi      # 0x6402
leaq 0x2c42(%rip), %rsi      # 0x640c
leaq 0x2f5c(%rip), %rcx      # 0x672d
movl $0x154, %edx            # imm = 0x154
callq 0x10a0
leaq 0x2f15(%rip), %rdi      # 0x66f7
leaq 0x2c23(%rip), %rsi      # 0x640c
leaq 0x2f3d(%rip), %rcx      # 0x672d
movl $0x155, %edx            # imm = 0x155
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x381d
movq %rdi, %rbx
leaq 0x311b(%rip), %rsi      # 0x6925
callq 0x5274
testb %al, %al
je 0x383c
movq 0x10(%rbx), %rdi
popq %rbx
jmp 0x1030
leaq 0x3096(%rip), %rdi      # 0x68ba
leaq 0x2be1(%rip), %rsi      # 0x640c
leaq 0x3093(%rip), %rcx      # 0x68c5
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x10a0
leaq 0x309c(%rip), %rdi      # 0x68df
leaq 0x2bc2(%rip), %rsi      # 0x640c
leaq 0x3074(%rip), %rcx      # 0x68c5
movl $0x1e6, %edx            # imm = 0x1E6
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x390c
movq %rdi, %rbx
leaq 0x30b6(%rip), %rsi      # 0x6925
callq 0x5274
testb %al, %al
je 0x392b
cmpb $0x0, 0x6865(%rip)      # 0xa0e8
jne 0x38a8
xorl %edi, %edi
callq 0x1130
movl %eax, %edi
callq 0x10e0
callq 0x1180
cltq
movq %rax, 0x684f(%rip)      # 0xa0f0
movb $0x1, 0x6840(%rip)      # 0xa0e8
movq 0x6841(%rip), %rax      # 0xa0f0
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rdx
movq %rdx, %rdi
leaq -0x1(%rdi), %rsi
cmpq $0x1, %rdi
je 0x38ef
cmpb $0x0, -0x1(%rcx,%rdi)
movq %rsi, %rdi
je 0x38ba
jmp 0x38ef
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 0x38d0
leaq (%rax,%rax,8), %rcx
movq %rcx, %rax
shrq $0xb, %rax
xorq %rcx, %rax
imulq %rax, %rax
shlq $0xf, %rax
popq %rbx
retq
leaq 0x2ea5(%rip), %rdi      # 0x67b8
leaq 0x2af2(%rip), %rsi      # 0x640c
leaq 0x2e9f(%rip), %rcx      # 0x67c0
movl $0x182, %edx            # imm = 0x182
callq 0x10a0
leaq 0x2eb0(%rip), %rdi      # 0x67e2
leaq 0x2ad3(%rip), %rsi      # 0x640c
leaq 0x2e80(%rip), %rcx      # 0x67c0
movl $0x183, %edx            # imm = 0x183
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x39cf
movq %rsi, %rbx
testq %rsi, %rsi
je 0x39ee
movq %rdi, %r14
leaq 0x2fbc(%rip), %rsi      # 0x6925
callq 0x5274
testb %al, %al
je 0x3a0d
leaq 0x2fa8(%rip), %rsi      # 0x6925
movq %rbx, %rdi
callq 0x5274
testb %al, %al
je 0x3a2c
movb 0x8(%r14), %bpl
cmpb 0x8(%rbx), %bpl
jne 0x39bb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2bb5
cmpb $-0x1, %bpl
jne 0x39c6
cmpb $-0x1, %al
je 0x39cb
cmpb $0x1, %al
movzbl %al, %ecx
movl $0xff, %eax
cmovnel %ecx, %eax
jmp 0x39c6
cmpb $-0x1, %bpl
sete %al
negb %al
orb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
jmp 0x39c6
leaq 0x2e2b(%rip), %rdi      # 0x6801
leaq 0x2a2f(%rip), %rsi      # 0x640c
leaq 0x2e1f(%rip), %rcx      # 0x6803
movl $0x1a3, %edx            # imm = 0x1A3
callq 0x10a0
leaq 0x2719(%rip), %rdi      # 0x610e
leaq 0x2a10(%rip), %rsi      # 0x640c
leaq 0x2e00(%rip), %rcx      # 0x6803
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x10a0
leaq 0x2e1e(%rip), %rdi      # 0x6832
leaq 0x29f1(%rip), %rsi      # 0x640c
leaq 0x2de1(%rip), %rcx      # 0x6803
movl $0x1a5, %edx            # imm = 0x1A5
callq 0x10a0
leaq 0x2e18(%rip), %rdi      # 0x684b
leaq 0x29d2(%rip), %rsi      # 0x640c
leaq 0x2dc2(%rip), %rcx      # 0x6803
movl $0x1a6, %edx            # imm = 0x1A6
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x3a6e
movq %rdi, %rbx
leaq 0x2eca(%rip), %rsi      # 0x6925
callq 0x5274
testb %al, %al
je 0x3a8d
movq %rbx, %rdi
callq 0x11a0
popq %rbx
retq
leaq 0x2def(%rip), %rdi      # 0x6864
leaq 0x2990(%rip), %rsi      # 0x640c
leaq 0x2dea(%rip), %rcx      # 0x686d
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x10a0
leaq 0x2df9(%rip), %rdi      # 0x688d
leaq 0x2971(%rip), %rsi      # 0x640c
leaq 0x2dcb(%rip), %rcx      # 0x686d
movl $0x1d5, %edx            # imm = 0x1D5
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x3ac8
cmpb $0x0, -0x1(%rcx,%rax)
movq %rdx, %rax
je 0x3ab4
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 0x3acd
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3b38
movq %rsi, %r15
callq 0x2531
movq %rax, (%r12)
movq 0x10(%rax), %rdi
movq 0x10(%rbx), %rsi
addq %r15, %rsi
movq 0x18(%rbx), %rdx
subq %r15, %rdx
callq 0x1110
movq %r15, %rdi
callq 0x2531
movq %rax, (%r14)
movq 0x10(%rax), %rdi
movq 0x10(%rbx), %rsi
movq %r15, %rdx
jmp 0x3b5e
movl $0x1, %edi
callq 0x2531
movq %rax, (%r12)
movq 0x18(%rbx), %rdi
callq 0x2531
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 0x1110
// File: /workspace/github_c_makefile_star2_O1/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 0x3bc9
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %r12
leaq (%r12,%rsi), %rdi
callq 0x1140
testq %rax, %rax
je 0x3bd3
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 0x1110
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 0x2546(%rip), %rdi      # 0x6120
leaq 0x282b(%rip), %rsi      # 0x640c
leaq 0x2d19(%rip), %rcx      # 0x6901
movl $0x2fa, %edx            # imm = 0x2FA
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x3c4f
movq %rdi, %rbx
callq 0x3c8d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1090
movl %eax, 0x10(%r14)
movq 0x8(%r14), %rdi
leal 0x1(%rax), %esi
callq 0x1160
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x3c6e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2e09(%rip), %rdi      # 0x6a5f
leaq 0x2cce(%rip), %rsi      # 0x692b
leaq 0x2cde(%rip), %rcx      # 0x6942
movl $0x13, %edx
callq 0x10a0
leaq 0x2f72(%rip), %rdi      # 0x6be7
leaq 0x2caf(%rip), %rsi      # 0x692b
leaq 0x2cbf(%rip), %rcx      # 0x6942
movl $0x19, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x1140
testq %rax, %rax
je 0x3ced
movq %rax, %rbx
leaq 0x601(%rip), %rsi       # 0x42a8
leaq 0x662(%rip), %rdx       # 0x4310
leaq 0x738(%rip), %rcx       # 0x43ed
leaq 0x842(%rip), %r8        # 0x44fe
leaq 0x3084(%rip), %r9       # 0x6d47
movq %rax, %rdi
callq 0x5064
movl $0x1, %edi
callq 0x1140
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3d0c
movb $0x0, (%rax)
movl $0x0, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
retq
leaq 0x2a6c(%rip), %rdi      # 0x6760
leaq 0x2c30(%rip), %rsi      # 0x692b
leaq 0x2eb9(%rip), %rcx      # 0x6bbb
movl $0xd4, %edx
callq 0x10a0
leaq 0x2ed0(%rip), %rdi      # 0x6be3
leaq 0x2c11(%rip), %rsi      # 0x692b
leaq 0x2e9a(%rip), %rcx      # 0x6bbb
movl $0xdb, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x3ddd
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r14
callq 0x3c8d
movq %rax, %rbx
testq %r12, %r12
jns 0x3d5b
movl 0x10(%r14), %eax
addq %rax, %r12
xorl %ecx, %ecx
testq %r12, %r12
movl $0x0, %r15d
cmovgq %r12, %r15
cmovsq %r12, %rcx
addl %ebp, %ecx
leaq (%rcx,%r15), %rdx
movl 0x10(%r14), %eax
movl %eax, %r13d
subl %r15d, %r13d
cmpq %rax, %rdx
cmovbel %ecx, %r13d
cmpq %rax, %r12
jg 0x3dcb
testl %eax, %eax
je 0x3dcb
testl %r13d, %r13d
je 0x3dcb
movl %r13d, 0x10(%rbx)
movq 0x8(%rbx), %rdi
leal 0x1(%r13), %esi
callq 0x1160
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3dfc
movl %r13d, %r12d
addq 0x8(%r14), %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1040
movq 0x8(%rbx), %rax
movb $0x0, (%rax,%r12)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2341(%rip), %rdi      # 0x6125
leaq 0x2b40(%rip), %rsi      # 0x692b
leaq 0x2b75(%rip), %rcx      # 0x6967
movl $0x25, %edx
callq 0x10a0
leaq 0x2de4(%rip), %rdi      # 0x6be7
leaq 0x2b21(%rip), %rsi      # 0x692b
leaq 0x2b56(%rip), %rcx      # 0x6967
movl $0x3c, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x3e67
testq %rsi, %rsi
jns 0x3e54
movl 0x10(%rdi), %eax
addq %rax, %rsi
movl 0x10(%rdi), %eax
cmpq %rax, %rsi
jae 0x3e64
movq 0x8(%rdi), %rax
movb (%rax,%rsi), %al
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x22b6(%rip), %rdi      # 0x6125
leaq 0x2ab5(%rip), %rsi      # 0x692b
leaq 0x2b5c(%rip), %rcx      # 0x69d9
movl $0x4d, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3f05
movq %rsi, %rbx
testq %rsi, %rsi
je 0x3f24
movq %rdi, %r15
callq 0x3c8d
movq %rax, %r14
movl 0x10(%rbx), %esi
addl 0x10(%r15), %esi
movl %esi, 0x10(%rax)
je 0x3ef6
movq 0x8(%r14), %rdi
incl %esi
callq 0x1160
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x3f43
movl 0x10(%r15), %r12d
testq %r12, %r12
je 0x3ee0
movq 0x8(%r15), %rsi
movq %rax, %rdi
callq 0x1060
cmpl $0x0, 0x10(%rbx)
je 0x3ef6
addq 0x8(%r14), %r12
movq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x1060
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2b04(%rip), %rdi      # 0x6a10
leaq 0x2a18(%rip), %rsi      # 0x692b
leaq 0x2af9(%rip), %rcx      # 0x6a13
movl $0x59, %edx
callq 0x10a0
leaq 0x2b26(%rip), %rdi      # 0x6a51
leaq 0x29f9(%rip), %rsi      # 0x692b
leaq 0x2ada(%rip), %rcx      # 0x6a13
movl $0x5a, %edx
callq 0x10a0
leaq 0x2b0a(%rip), %rdi      # 0x6a54
leaq 0x29da(%rip), %rsi      # 0x692b
leaq 0x2abb(%rip), %rcx      # 0x6a13
movl $0x62, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x40bb
movq %rsi, %r15
testq %rsi, %rsi
je 0x40da
movq %rdi, %rbx
movl $0x1, %edi
callq 0x4560
movq %rax, 0x8(%rsp)
movl 0x10(%rbx), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3d2b
movq %rax, %r14
movq %r15, %rdi
callq 0x1090
movq %rax, %r13
movq 0x8(%r14), %rbp
movl %r13d, %ebx
decl %eax
incq %rax
movq %rax, 0x10(%rsp)
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1050
testl %eax, %eax
je 0x4004
incq %rbp
jmp 0x401b
testl %r13d, %r13d
je 0x401b
movq %rbp, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x10b0
addq 0x10(%rsp), %rbp
movq 0x8(%r14), %r12
movl 0x10(%r14), %eax
subl %r13d, %eax
addq %r12, %rax
cmpq %rax, %rbp
jbe 0x3fed
movl 0x10(%r14), %eax
addq 0x8(%r14), %rax
cmpq %rax, %r12
jae 0x409f
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x3c04
movq %rax, %rbx
movl 0x10(%rax), %r13d
leaq (%r12,%r13), %r15
movl %ebp, %edx
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x46e9
movq %rbx, %rdi
callq 0x51fa
cmpb $0x0, (%r12,%r13)
je 0x4082
movq %r15, %r12
incl %ebp
movl 0x10(%r14), %eax
addq 0x8(%r14), %rax
cmpq %rax, %r12
jb 0x403d
jmp 0x409f
movl 0x10(%r14), %eax
addq 0x8(%r14), %rax
cmpq %rax, %r15
jae 0x406e
leaq 0x1(%r15), %r12
cmpb $0x0, 0x1(%r15)
movq %r12, %r15
je 0x408a
jmp 0x4071
movq %r14, %rdi
callq 0x51fa
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2063(%rip), %rdi      # 0x6125
leaq 0x2862(%rip), %rsi      # 0x692b
leaq 0x29c2(%rip), %rcx      # 0x6a92
movl $0x79, %edx
callq 0x10a0
leaq 0x29ea(%rip), %rdi      # 0x6acb
leaq 0x2843(%rip), %rsi      # 0x692b
leaq 0x29a3(%rip), %rcx      # 0x6a92
movl $0x7a, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x4158
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4177
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 0x414a
incq %r14
cmpq %r12, %r14
jbe 0x412c
xorl %eax, %eax
jmp 0x414c
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1fc6(%rip), %rdi      # 0x6125
leaq 0x27c5(%rip), %rsi      # 0x692b
leaq 0x2964(%rip), %rcx      # 0x6ad1
movl $0x9f, %edx
callq 0x10a0
leaq 0x2993(%rip), %rdi      # 0x6b11
leaq 0x27a6(%rip), %rsi      # 0x692b
leaq 0x2945(%rip), %rcx      # 0x6ad1
movl $0xa0, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x426a
movq %rsi, %r14
testq %rsi, %rsi
je 0x4289
movq %rdi, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x10c0
testl %eax, %eax
jne 0x4228
movq 0x8(%rbx), %rsi
movq %rsp, %r14
leaq 0x40(%rsp), %rcx
movl $0x1, %edx
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x1150
movl %eax, %ebp
movq %r14, %rdi
callq 0x1080
testl %ebp, %ebp
je 0x4207
leaq 0x2fee(%rip), %rdi      # 0x71ee
callq 0x3c04
jmp 0x421a
movslq 0x40(%rsp), %rsi
movl 0x44(%rsp), %edx
subl %esi, %edx
movq %rbx, %rdi
callq 0x3d2b
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 0x1120
movq 0x5daf(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x290d(%rip), %rsi      # 0x6b60
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1100
movq %rbx, %rdi
callq 0x1080
jmp 0x41f9
leaq 0x1eb4(%rip), %rdi      # 0x6125
leaq 0x26b3(%rip), %rsi      # 0x692b
leaq 0x289c(%rip), %rcx      # 0x6b1b
movl $0xb2, %edx
callq 0x10a0
leaq 0x28ca(%rip), %rdi      # 0x6b5a
leaq 0x2694(%rip), %rsi      # 0x692b
leaq 0x287d(%rip), %rcx      # 0x6b1b
movl $0xb3, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x42d2
movq %rdi, %rbx
leaq 0x2a8f(%rip), %rsi      # 0x6d47
callq 0x5274
testb %al, %al
je 0x42f1
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x42d0
popq %rbx
jmp 0x1030
popq %rbx
retq
leaq 0x25e1(%rip), %rdi      # 0x68ba
leaq 0x264b(%rip), %rsi      # 0x692b
leaq 0x2a1e(%rip), %rcx      # 0x6d05
movl $0x12a, %edx            # imm = 0x12A
callq 0x10a0
leaq 0x2a2a(%rip), %rdi      # 0x6d22
leaq 0x262c(%rip), %rsi      # 0x692b
leaq 0x29ff(%rip), %rcx      # 0x6d05
movl $0x12b, %edx            # imm = 0x12B
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x43af
movq %rdi, %rbx
leaq 0x2a23(%rip), %rsi      # 0x6d47
callq 0x5274
testb %al, %al
je 0x43ce
cmpb $0x0, 0x5dc0(%rip)      # 0xa0f8
jne 0x435d
xorl %edi, %edi
callq 0x1130
movl %eax, %edi
callq 0x10e0
callq 0x1180
cltq
movq %rax, 0x5daa(%rip)      # 0xa100
movb $0x1, 0x5d9b(%rip)      # 0xa0f8
movq 0x5d9c(%rip), %rax      # 0xa100
movq 0x8(%rbx), %rcx
movb (%rcx), %dl
testb %dl, %dl
je 0x4395
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 0x4371
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 0x2402(%rip), %rdi      # 0x67b8
leaq 0x256e(%rip), %rsi      # 0x692b
leaq 0x2831(%rip), %rcx      # 0x6bf5
movl $0xec, %edx
callq 0x10a0
leaq 0x2845(%rip), %rdi      # 0x6c1a
leaq 0x254f(%rip), %rsi      # 0x692b
leaq 0x2812(%rip), %rcx      # 0x6bf5
movl $0xed, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/theck01[P]offbrand_lib/src/classes/obstring.c
// Function: obstring_compare
int8_t obstring_compare(const obj *a, const obj *b){

  uint32_t i;
  const obstring *comp_a = (obstring *)a;
  const obstring *comp_b = (obstring *)b;

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

  /* compare string contents where both have characters */
  for(i=0; i<comp_a->length && i<comp_b->length; i++){
    if(comp_a->str[i] < comp_b->str[i]) return OB_LESS_THAN;
    else if(comp_b->str[i] < comp_a->str[i]) return OB_GREATER_THAN;
  }

  /* if characters matched check lengths for final equality */
  if(comp_a->length < comp_b->length) return OB_LESS_THAN;
  else if(comp_b->length < comp_a->length) return OB_GREATER_THAN;
  return OB_EQUAL_TO;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4482
movq %rsi, %rbx
testq %rsi, %rsi
je 0x44a1
movq %rdi, %r14
leaq 0x2937(%rip), %rsi      # 0x6d47
callq 0x5274
testb %al, %al
je 0x44c0
leaq 0x2923(%rip), %rsi      # 0x6d47
movq %rbx, %rdi
callq 0x5274
testb %al, %al
je 0x44df
movl 0x10(%r14), %ecx
testq %rcx, %rcx
je 0x4464
movl 0x10(%rbx), %eax
xorl %edx, %edx
cmpl %edx, %eax
je 0x4464
movq 0x8(%r14), %rsi
movb (%rsi,%rdx), %sil
movq 0x8(%rbx), %rdi
movb (%rdi,%rdx), %dil
cmpb %dil, %sil
jl 0x4474
jg 0x4478
incq %rdx
cmpl %edx, %ecx
jne 0x4442
movl 0x10(%rbx), %edx
movb $-0x1, %al
cmpl %edx, %ecx
jb 0x447a
cmpl %ecx, %edx
setb %al
jmp 0x447a
movb $-0x1, %al
jmp 0x447a
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2378(%rip), %rdi      # 0x6801
leaq 0x249b(%rip), %rsi      # 0x692b
leaq 0x27a5(%rip), %rcx      # 0x6c3c
movl $0x10c, %edx            # imm = 0x10C
callq 0x10a0
leaq 0x1c66(%rip), %rdi      # 0x610e
leaq 0x247c(%rip), %rsi      # 0x692b
leaq 0x2786(%rip), %rcx      # 0x6c3c
movl $0x10d, %edx            # imm = 0x10D
callq 0x10a0
leaq 0x27a7(%rip), %rdi      # 0x6c6e
leaq 0x245d(%rip), %rsi      # 0x692b
leaq 0x2767(%rip), %rcx      # 0x6c3c
movl $0x10e, %edx            # imm = 0x10E
callq 0x10a0
leaq 0x27a4(%rip), %rdi      # 0x6c8a
leaq 0x243e(%rip), %rsi      # 0x692b
leaq 0x2748(%rip), %rcx      # 0x6c3c
movl $0x10f, %edx            # imm = 0x10F
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/TimeToogo[P]ff-proxy/src/crypto.c
// Function: ff_derived_key_alloc
struct ff_derived_key *ff_derived_key_alloc(uint16_t length)
{
    struct ff_derived_key *key = malloc(sizeof(struct ff_derived_key));
    key->key = calloc(1, length);
    key->length = length;

    return key;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movl $0x10, %edi
callq 0x23c0
movq %rax, %r14
movl %ebx, %esi
movl $0x1, %edi
callq 0x21f0
movq %rax, (%r14)
movw %bx, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/TimeToogo[P]ff-proxy/src/crypto.c
// Function: ff_derived_key_free
void ff_derived_key_free(struct ff_derived_key *key)
{
    if (key == NULL)
    {
        return;
    }

    if (key->key != NULL)
    {
        FREE(key->key);
    }

    FREE(key);
}

// Assembly:
testq %rdi, %rdi
je 0x3162
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3154
callq 0x2340
movq $0x0, (%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2340
retq
// File: /workspace/github_c_makefile_star2_O1/TimeToogo[P]ff-proxy/src/crypto.c
// Function: ff_derive_key_pbkdf2
bool ff_derive_key_pbkdf2(
    struct ff_encryption_config *config,
    uint8_t *salt,
    uint16_t salt_length,
    struct ff_derived_key *out_key)

{
    int res = PKCS5_PBKDF2_HMAC(
        (char *)config->key,
        strlen((char *)config->key),
        salt, salt_length,
        config->pbkdf2_iterations,
        EVP_sha256(),
        out_key->length,
        out_key->key);

    bool success = res == 1;

    if (!success)
    {
        ff_log(FF_ERROR, ERR_error_string(ERR_get_error(), NULL));
        ff_log(FF_ERROR, "Failed to derive key using PBKDF2 algorithm");
    }

    return success;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, -0x2c(%rbp)
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %r13
movq %r13, %rdi
callq 0x2130
movq %rax, %r14
movl 0x8(%r12), %r12d
callq 0x2470
movzwl 0x8(%rbx), %r10d
movq %r13, %rdi
movl %r14d, %esi
movq %r15, %rdx
movl -0x2c(%rbp), %ecx
movl %r12d, %r8d
movq %rax, %r9
pushq (%rbx)
pushq %r10
callq 0x2460
addq $0x10, %rsp
movl %eax, %ebx
cmpl $0x1, %eax
je 0x31f1
callq 0x23b0
movq %rax, %rdi
xorl %esi, %esi
callq 0x20b0
movl $0x4, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x4100
leaq 0x34f7(%rip), %rsi      # 0x66dc
movl $0x4, %edi
xorl %eax, %eax
callq 0x4100
cmpl $0x1, %ebx
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/TimeToogo[P]ff-proxy/src/hash_table.c
// Function: ff_hash_table_init
struct ff_hash_table *ff_hash_table_init(uint8_t prefix_bit_length)
{
    assert(prefix_bit_length > 0);

    struct ff_hash_table *hash_table = malloc(sizeof(struct ff_hash_table));

    hash_table->length = 0;
    *(uint8_t *)&hash_table->prefix_bit_length = prefix_bit_length;
    *(uint8_t *)&hash_table->bucket_levels = (int)ceil(hash_table->prefix_bit_length / FF_BUCKET_POOL_BITS);

    hash_table->buckets = ff_hash_table_init_bucket();
    hash_table->linked_list = NULL;
    hash_table->linked_list_last = NULL;

    return hash_table;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testl %edi, %edi
je 0x3278
movl %edi, %ebx
movl $0x20, %edi
callq 0x23c0
movq %rax, %r14
movl $0x0, 0x4(%rax)
movb %bl, (%rax)
shrb $0x3, %bl
movb %bl, 0x1(%rax)
movl $0x1, %edi
movl $0x800, %esi            # imm = 0x800
callq 0x21f0
movq %rax, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3489(%rip), %rdi      # 0x6708
leaq 0x3498(%rip), %rsi      # 0x671e
leaq 0x34a2(%rip), %rcx      # 0x672f
movl $0x14, %edx
callq 0x21e0
// File: /workspace/github_c_makefile_star2_O1/TimeToogo[P]ff-proxy/src/hash_table.c
// Function: ff_hash_table_get_or_create_bucket
union ff_hash_table_bucket *ff_hash_table_get_or_create_bucket(
    struct ff_hash_table *hash_table,
    uint64_t item_id,
    bool should_create,
    union ff_hash_table_bucket **buckets_list)
{
    union ff_hash_table_bucket *buckets = hash_table->buckets;
    uint8_t hash;

    for (uint8_t level = 0; level < hash_table->bucket_levels - 1; level++)
    {
        hash = FF_HASH_GET_FOR_LEVEL(item_id, level);

        if (buckets[hash].buckets == NULL)
        {
            if (!should_create)
            {
                return NULL;
            }

            // Init new layer
            buckets[hash].buckets = ff_hash_table_init_bucket();
        }

        buckets = buckets[hash].buckets;

        if (buckets_list != NULL)
        {
            buckets_list[level] = buckets;
        }
    }

    hash = FF_HASH_GET_FOR_LEVEL(item_id, hash_table->bucket_levels - 1);
    buckets = &buckets[hash];

    return buckets;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, -0x2c(%rbp)
movq 0x8(%rdi), %r12
movzbl 0x1(%rdi), %eax
cmpl $0x2, %eax
jb 0x3355
movq %rcx, %r8
movl $0x38, %r13d
movb $0x1, %bl
xorl %r15d, %r15d
movq %rsi, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, %rax
movl %r13d, %ecx
shlq %cl, %rax
shrq %cl, %rax
movl %r15d, %ecx
shrq %cl, %rax
movzbl %al, %r14d
movl %r14d, %eax
cmpq $0x0, (%r12,%rax,8)
jne 0x332f
cmpb $0x0, -0x2c(%rbp)
je 0x3380
movl $0x1, %edi
movl $0x800, %esi            # imm = 0x800
callq 0x21f0
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %rsi
movq %rax, (%r12,%r14,8)
movq (%r12,%r14,8), %r12
testq %r8, %r8
je 0x333c
movq %r12, (%r8,%r15)
movzbl %bl, %ecx
movzbl 0x1(%rdi), %eax
leal -0x1(%rax), %edx
addq $0x8, %r15
addl $-0x8, %r13d
leal 0x1(%rcx), %ebx
cmpl %ecx, %edx
jg 0x32ea
shll $0x3, %eax
movl %eax, %ecx
negb %cl
shlq %cl, %rsi
shrq %cl, %rsi
addb $-0x8, %al
movl %eax, %ecx
shrq %cl, %rsi
movzbl %sil, %eax
leaq (%r12,%rax,8), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x3371
// File: /workspace/github_c_makefile_star2_O1/TimeToogo[P]ff-proxy/src/hash_table.c
// Function: ff_hash_table_get_item
void *ff_hash_table_get_item(struct ff_hash_table *hash_table, uint64_t item_id)
{
    pthread_mutex_lock(&ff_hash_table_data_mutex);

    union ff_hash_table_bucket *buckets = ff_hash_table_get_or_create_bucket(hash_table, item_id, false, NULL);
    void *ret = NULL;

    if (buckets == NULL || buckets->nodes == NULL)
    {
        ret = NULL;
        goto cleanup;
    }

    struct ff_hash_table_node *node = buckets->nodes;

    do
    {
        if (node->item_id == item_id && node->value != NULL)
        {
            ret = node->value;
            goto cleanup;
        }
    } while ((node = node->next) != NULL);

cleanup:
    pthread_mutex_unlock(&ff_hash_table_data_mutex);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x6f4d(%rip), %rdi      # 0xa2e8
callq 0x2400
xorl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x32ab
testq %rax, %rax
je 0x33d6
movq (%rax), %rax
testq %rax, %rax
je 0x33d3
cmpq %rbx, (%rax)
jne 0x33cd
movq 0x8(%rax), %r14
testq %r14, %r14
jne 0x33d6
movq 0x10(%rax), %rax
jmp 0x33ba
xorl %r14d, %r14d
leaq 0x6f0b(%rip), %rdi      # 0xa2e8
callq 0x2230
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/TimeToogo[P]ff-proxy/src/hash_table.c
// Function: ff_hash_table_put_item
void ff_hash_table_put_item(struct ff_hash_table *hash_table, uint64_t item_id, void *item)
{
    pthread_mutex_lock(&ff_hash_table_data_mutex);

    union ff_hash_table_bucket *buckets = ff_hash_table_get_or_create_bucket(hash_table, item_id, true, NULL);

    // Find last node or matching in chain
    struct ff_hash_table_node *node = buckets->nodes;
    struct ff_hash_table_node *last_node = node;

    while (node != NULL)
    {
        // Item already exists, update in hash table
        if (node->item_id == item_id)
        {
            node->value = item;
            goto cleanup;
        }

        last_node = node;
        node = node->next;
    }

    // Store new item in hash table
    struct ff_hash_table_node *new_node = calloc(1, sizeof(struct ff_hash_table_node));
    new_node->item_id = item_id;
    new_node->value = item;

    if (last_node == NULL)
    {
        buckets->nodes = new_node;
    }
    else
    {
        last_node->next = new_node;
    }

    // Store new item in global linked list
    if (hash_table->linked_list == NULL)
    {
        hash_table->linked_list = new_node;
        hash_table->linked_list_last = new_node;
    }
    else
    {
        new_node->prev_in_list = hash_table->linked_list_last;
        hash_table->linked_list_last->next_in_list = new_node;
        hash_table->linked_list_last = new_node;
    }

    hash_table->length++;

cleanup:
    pthread_mutex_unlock(&ff_hash_table_data_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6eda(%rip), %rdi      # 0xa2e8
callq 0x2400
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x32ab
movq %rax, %r12
movq (%rax), %rax
testq %rax, %rax
je 0x3443
movq %rax, %r13
cmpq %r15, (%rax)
je 0x347f
movq 0x10(%r13), %rax
testq %rax, %rax
jne 0x3430
jmp 0x3446
movq %rax, %r13
movl $0x1, %edi
movl $0x28, %esi
callq 0x21f0
movq %r15, (%rax)
leaq 0x10(%r13), %rcx
testq %r13, %r13
cmoveq %r12, %rcx
movq %r14, 0x8(%rax)
movq %rax, (%rcx)
cmpq $0x0, 0x10(%rbx)
je 0x3485
movq 0x18(%rbx), %rcx
movq %rcx, 0x18(%rax)
movq %rax, 0x20(%rcx)
jmp 0x3489
movq %r14, 0x8(%r13)
jmp 0x3490
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
incl 0x4(%rbx)
leaq 0x6e51(%rip), %rdi      # 0xa2e8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2230