LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x43a5
jmp 0x43c4
leaq 0x36ba(%rip), %rdi      # 0x7a66
leaq 0x357f(%rip), %rsi      # 0x7932
movl $0x13, %edx
leaq 0x358a(%rip), %rcx      # 0x7949
callq 0x10a0
callq 0x4450
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1080
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x0, %rsi
callq 0x1150
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4416
jmp 0x4435
leaq 0x37d1(%rip), %rdi      # 0x7bee
leaq 0x350e(%rip), %rsi      # 0x7932
movl $0x19, %edx
leaq 0x3519(%rip), %rcx      # 0x7949
callq 0x10a0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x1060
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x18, %edi
callq 0x1130
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x446f
jmp 0x448e
leaq 0x32eb(%rip), %rdi      # 0x7761
leaq 0x34b5(%rip), %rsi      # 0x7932
movl $0xd4, %edx
leaq 0x3739(%rip), %rcx      # 0x7bc2
callq 0x10a0
movq -0x8(%rbp), %rdi
leaq 0x897(%rip), %rsi       # 0x4d30
leaq 0x920(%rip), %rdx       # 0x4dc0
leaq 0xa59(%rip), %rcx       # 0x4f00
leaq 0xc02(%rip), %r8        # 0x50b0
leaq 0x38a2(%rip), %r9       # 0x7d57
callq 0x6180
movl $0x1, %edi
callq 0x1130
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x44dc
jmp 0x44fb
leaq 0x3707(%rip), %rdi      # 0x7bea
leaq 0x3448(%rip), %rsi      # 0x7932
movl $0xdb, %edx
leaq 0x36cc(%rip), %rcx      # 0x7bc2
callq 0x10a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x453c
jmp 0x455b
leaq 0x2be2(%rip), %rdi      # 0x7125
leaq 0x33e8(%rip), %rsi      # 0x7932
movl $0x25, %edx
leaq 0x3418(%rip), %rcx      # 0x796e
callq 0x10a0
callq 0x4450
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jge 0x457a
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jge 0x4596
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x1c(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jle 0x45ba
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
subq -0x18(%rbp), %rax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jg 0x45ea
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addq %rcx, %rax
cmpq $0x0, %rax
jl 0x45ea
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x45ea
cmpl $0x0, -0x1c(%rbp)
ja 0x45f7
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4688
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x0, %rsi
callq 0x1150
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4634
jmp 0x4653
leaq 0x35b3(%rip), %rdi      # 0x7bee
leaq 0x32f0(%rip), %rsi      # 0x7932
movl $0x3c, %edx
leaq 0x3320(%rip), %rcx      # 0x796e
callq 0x10a0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x1040
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4709
jmp 0x4728
leaq 0x2a15(%rip), %rdi      # 0x7125
leaq 0x321b(%rip), %rsi      # 0x7932
movl $0x4d, %edx
leaq 0x32bd(%rip), %rcx      # 0x79e0
callq 0x10a0
cmpq $0x0, -0x18(%rbp)
jge 0x473e
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %ecx
cmpq %rcx, %rax
jge 0x4755
cmpq $0x0, -0x18(%rbp)
jge 0x475b
movb $0x0, -0x1(%rbp)
jmp 0x476d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4799
jmp 0x47b8
leaq 0x3277(%rip), %rdi      # 0x7a17
leaq 0x318b(%rip), %rsi      # 0x7932
movl $0x59, %edx
leaq 0x3267(%rip), %rcx      # 0x7a1a
callq 0x10a0
cmpq $0x0, -0x18(%rbp)
je 0x47c1
jmp 0x47e0
leaq 0x3290(%rip), %rdi      # 0x7a58
leaq 0x3163(%rip), %rsi      # 0x7932
movl $0x5a, %edx
leaq 0x323f(%rip), %rcx      # 0x7a1a
callq 0x10a0
callq 0x4450
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x18(%rbp), %rax
addl 0x10(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x4815
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x48bb
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x0, %rsi
callq 0x1150
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x484c
jmp 0x486b
leaq 0x3208(%rip), %rdi      # 0x7a5b
leaq 0x30d8(%rip), %rsi      # 0x7932
movl $0x62, %edx
leaq 0x31b4(%rip), %rcx      # 0x7a1a
callq 0x10a0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jbe 0x488a
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1060
movq -0x18(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jbe 0x48b3
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1060
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4b29
jmp 0x4b48
leaq 0x25f5(%rip), %rdi      # 0x7125
leaq 0x2dfb(%rip), %rsi      # 0x7932
movl $0x9f, %edx
leaq 0x2f95(%rip), %rcx      # 0x7ad8
callq 0x10a0
cmpq $0x0, -0x18(%rbp)
je 0x4b51
jmp 0x4b70
leaq 0x2fc0(%rip), %rdi      # 0x7b18
leaq 0x2dd3(%rip), %rsi      # 0x7932
movl $0xa0, %edx
leaq 0x2f6d(%rip), %rcx      # 0x7ad8
callq 0x10a0
movq -0x18(%rbp), %rdi
callq 0x1080
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movl 0x10(%rdx), %edx
subl -0x1c(%rbp), %edx
movl %edx, %edx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x4bd5
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x1050
cmpl $0x0, %eax
jne 0x4bc5
movb $0x1, -0x1(%rbp)
jmp 0x4bd9
jmp 0x4bc7
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4b88
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4c0c
jmp 0x4c2b
leaq 0x2512(%rip), %rdi      # 0x7125
leaq 0x2d18(%rip), %rsi      # 0x7932
movl $0xb2, %edx
leaq 0x2efc(%rip), %rcx      # 0x7b22
callq 0x10a0
cmpq $0x0, -0x18(%rbp)
je 0x4c34
jmp 0x4c53
leaq 0x2f26(%rip), %rdi      # 0x7b61
leaq 0x2cf0(%rip), %rsi      # 0x7932
movl $0xb3, %edx
leaq 0x2ed4(%rip), %rcx      # 0x7b22
callq 0x10a0
movq -0x18(%rbp), %rsi
leaq -0x58(%rbp), %rdi
movl $0x1, %edx
callq 0x10c0
movl %eax, -0x64(%rbp)
cmpl $0x0, %eax
je 0x4cc3
movl -0x64(%rbp), %edi
leaq -0x170(%rbp), %rdx
leaq -0x58(%rbp), %rsi
movl $0x100, %ecx            # imm = 0x100
callq 0x1110
movq 0x636c(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq -0x170(%rbp), %rcx
leaq 0x2ec6(%rip), %rsi      # 0x7b67
movb $0x0, %al
callq 0x10f0
leaq -0x58(%rbp), %rdi
callq 0x1070
leaq 0x274a(%rip), %rdi      # 0x7402
callq 0x4390
movq %rax, -0x8(%rbp)
jmp 0x4d20
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x58(%rbp), %rdi
movl $0x1, %edx
leaq -0x60(%rbp), %rcx
xorl %r8d, %r8d
callq 0x1140
cmpl $0x0, %eax
je 0x4d00
leaq -0x58(%rbp), %rdi
callq 0x1070
leaq 0x270d(%rip), %rdi      # 0x7402
callq 0x4390
movq %rax, -0x8(%rbp)
jmp 0x4d20
leaq -0x58(%rbp), %rdi
callq 0x1070
movq -0x10(%rbp), %rdi
movslq -0x60(%rbp), %rsi
movl -0x5c(%rbp), %edx
subl -0x60(%rbp), %edx
callq 0x4520
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4d4d
jmp 0x4d6c
leaq 0x2b6d(%rip), %rdi      # 0x78c1
leaq 0x2bd7(%rip), %rsi      # 0x7932
movl $0x12a, %edx            # imm = 0x12A
leaq 0x2fae(%rip), %rcx      # 0x7d15
callq 0x10a0
movq -0x8(%rbp), %rdi
leaq 0x2eaa(%rip), %rsi      # 0x7c21
callq 0x65a0
cmpb $0x0, %al
je 0x4d82
jmp 0x4da1
leaq 0x2fa9(%rip), %rdi      # 0x7d32
leaq 0x2ba2(%rip), %rsi      # 0x7932
movl $0x12b, %edx            # imm = 0x12B
leaq 0x2f79(%rip), %rcx      # 0x7d15
callq 0x10a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4db9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4ddd
jmp 0x4dfc
leaq 0x29d5(%rip), %rdi      # 0x77b9
leaq 0x2b47(%rip), %rsi      # 0x7932
movl $0xec, %edx
leaq 0x2e05(%rip), %rcx      # 0x7bfc
callq 0x10a0
movq -0x8(%rbp), %rdi
leaq 0x2e1a(%rip), %rsi      # 0x7c21
callq 0x65a0
cmpb $0x0, %al
je 0x4e12
jmp 0x4e31
leaq 0x2e11(%rip), %rdi      # 0x7c2a
leaq 0x2b12(%rip), %rsi      # 0x7932
movl $0xed, %edx
leaq 0x2dd0(%rip), %rcx      # 0x7bfc
callq 0x10a0
movsbl 0x62b0(%rip), %eax      # 0xb0e8
cmpl $0x0, %eax
jne 0x4e62
xorl %eax, %eax
movl %eax, %edi
callq 0x1120
movl %eax, %edi
callq 0x10d0
callq 0x1160
cltq
movq %rax, 0x6295(%rip)      # 0xb0f0
movb $0x1, 0x6286(%rip)      # 0xb0e8
movq 0x6287(%rip), %rax      # 0xb0f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4ec2
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movsbq (%rax), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0xa, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4e79
movq -0x18(%rbp), %rax
shlq $0x3, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0xb, %rax
xorq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shlq $0xf, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movl $0x10, %edi
callq 0x23e0
movq %rax, -0x10(%rbp)
movzwl -0x2(%rbp), %eax
movl %eax, %esi
movl $0x1, %edi
callq 0x2200
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movw -0x2(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x3345
jmp 0x337d
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x336a
jmp 0x3351
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2350
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
jmp 0x336a
jmp 0x336c
movq -0x8(%rbp), %rdi
callq 0x2350
movq $0x0, -0x8(%rbp)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x60, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2140
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movzwl -0x12(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0x2490
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movq %rax, %r9
movq -0x20(%rbp), %rax
movzwl 0x8(%rax), %r10d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2480
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x25(%rbp)
testb $0x1, -0x25(%rbp)
jne 0x345e
callq 0x23d0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20c0
movq %rax, %rsi
movl $0x4, %edi
movb $0x0, %al
callq 0x4d70
movl $0x4, %edi
leaq 0x42b5(%rip), %rsi      # 0x770c
movb $0x0, %al
callq 0x4d70
movb -0x25(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x0, %eax
jle 0x34b9
jmp 0x34d8
leaq 0x4278(%rip), %rdi      # 0x7738
leaq 0x4287(%rip), %rsi      # 0x774e
movl $0x14, %edx
leaq 0x428c(%rip), %rcx      # 0x775f
callq 0x21f0
movl $0x20, %edi
callq 0x23e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movb -0x1(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm0
callq 0x2080
cvttsd2si %xmm0, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
callq 0x3560
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x32(%rbp)
movzbl -0x32(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x3674
movq -0x18(%rbp), %rax
movzbl -0x32(%rbp), %edx
addl $0x1, %edx
shll $0x3, %edx
movl $0x40, %ecx
subl %edx, %ecx
movl %ecx, %ecx
movq $-0x1, %rdx
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
movzbl -0x32(%rbp), %ecx
shll $0x3, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movb %al, -0x31(%rbp)
movq -0x30(%rbp), %rax
movzbl -0x31(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
jne 0x363e
testb $0x1, -0x19(%rbp)
jne 0x362a
movq $0x0, -0x8(%rbp)
jmp 0x36d3
callq 0x3560
movq %rax, %rdx
movq -0x30(%rbp), %rax
movzbl -0x31(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movzbl -0x31(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x3665
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rax
movzbl -0x32(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x3667
movb -0x32(%rbp), %al
addb $0x1, %al
movb %al, -0x32(%rbp)
jmp 0x35bb
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %edx
subl $0x1, %edx
addl $0x1, %edx
shll $0x3, %edx
movl $0x40, %ecx
subl %edx, %ecx
movl %ecx, %ecx
movq $-0x1, %rdx
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
subl $0x1, %ecx
shll $0x3, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movb %al, -0x31(%rbp)
movq -0x30(%rbp), %rax
movzbl -0x31(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x7c21(%rip), %rdi      # 0xb318
callq 0x2420
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x3590
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x372c
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x3736
movq $0x0, -0x20(%rbp)
jmp 0x377d
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x3767
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3767
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x377d
jmp 0x3769
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x3741
jmp 0x377d
leaq 0x7b94(%rip), %rdi      # 0xb318
callq 0x2240
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/hash_table.c
// Function: ff_hash_table_free_bucket_level
void ff_hash_table_free_bucket_level(uint8_t bucket_levels, union ff_hash_table_bucket *bucket)
{
    assert(bucket_levels > 0);

    if (bucket_levels > 1)
    {
        for (int i = 0; i < FF_BUCKET_POOL_LENGTH; i++)
        {
            if (bucket[i].buckets != NULL)
            {
                ff_hash_table_free_bucket_level(bucket_levels - 1, bucket[i].buckets);
            }
        }

        FREE(bucket);
    }
    else if (bucket_levels == 1)
    {
        for (int i = 0; i < FF_BUCKET_POOL_LENGTH; i++)
        {
            if (bucket[i].nodes != NULL)
            {
                struct ff_hash_table_node *node = bucket[i].nodes;
                struct ff_hash_table_node *tmp_node = NULL;

                while (node != NULL)
                {
                    tmp_node = node;
                    node = node->next;
                    FREE(tmp_node);
                }
            }
        }

        FREE(bucket);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x0, %eax
jle 0x3bed
jmp 0x3c0c
leaq 0x3b9d(%rip), %rdi      # 0x7791
leaq 0x3b53(%rip), %rsi      # 0x774e
movl $0x134, %edx            # imm = 0x134
leaq 0x3b9c(%rip), %rcx      # 0x77a3
callq 0x21f0
movzbl -0x1(%rbp), %eax
cmpl $0x1, %eax
jle 0x3c74
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0x3c5c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x3c4f
movzbl -0x1(%rbp), %eax
subl $0x1, %eax
movq -0x10(%rbp), %rcx
movslq -0x14(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movzbl %al, %edi
callq 0x3bd0
jmp 0x3c51
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3c1c
jmp 0x3c5e
movq -0x10(%rbp), %rdi
callq 0x2350
movq $0x0, -0x10(%rbp)
jmp 0x3d0c
movzbl -0x1(%rbp), %eax
cmpl $0x1, %eax
jne 0x3d0a
movl $0x0, -0x18(%rbp)
cmpl $0x100, -0x18(%rbp)     # imm = 0x100
jge 0x3cf5
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x3ce8
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3ce6
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2350
movq $0x0, -0x28(%rbp)
jmp 0x3cb8
jmp 0x3ce8
jmp 0x3cea
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3c88
jmp 0x3cf7
movq -0x10(%rbp), %rdi
callq 0x2350
movq $0x0, -0x10(%rbp)
jmp 0x3d0a
jmp 0x3d0c
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/hash_table.c
// Function: ff_hash_table_iterator_init
struct ff_hash_table_iterator *ff_hash_table_iterator_init(struct ff_hash_table *hash_table)
{
    pthread_mutex_lock(&ff_hash_table_data_mutex);

    struct ff_hash_table_iterator *iterator = calloc(1, sizeof(struct ff_hash_table_iterator));
    iterator->hash_table = hash_table;
    iterator->current_node = NULL;
    iterator->started = false;

    return iterator;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x75e5(%rip), %rdi      # 0xb318
callq 0x2420
movl $0x1, %edi
movl $0x18, %esi
callq 0x2200
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/hash_table.c
// Function: ff_hash_table_iterator_next
void *ff_hash_table_iterator_next(struct ff_hash_table_iterator *iterator)
{
    if (!iterator->started)
    {
        iterator->current_node = iterator->hash_table->linked_list;
        iterator->started = true;
    }
    else if (iterator->current_node != NULL)
    {
        iterator->current_node = iterator->current_node->next_in_list;
    }

    return iterator->current_node == NULL ? NULL : iterator->current_node->value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x3daf
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x10(%rax)
jmp 0x3dd0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3dce
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3dd0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x3de3
xorl %eax, %eax
movq %rax, -0x10(%rbp)
jmp 0x3df3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/http.c
// Function: ff_http_send_request
void ff_http_send_request(struct ff_request *request)
{
    bool https = false;

    // Read options backwards to ensure the encrypted options take precedence
    uint8_t i = request->options_length;
    while (i-- > 0)
    {
        switch (request->options[i]->type)
        {
        case FF_REQUEST_OPTION_TYPE_HTTPS:
            https = request->options[i]->length == 1 && request->options[i]->value[0] == 1;
            break;

        default:
            break;
        }
    }

    char *host_name = ff_http_get_destination_host(request);
    bool success = false;

    if (host_name == NULL)
    {
        goto error;
    }

    if (https)
    {
        success = ff_http_send_request_tls(request, host_name);
    }
    else
    {
        success = ff_http_send_request_unencrypted(request, host_name);
    }

    if (success)
    {
        goto done;
    }
    else
    {
        goto error;
    }

error:
    request->state = FF_REQUEST_STATE_SENDING_FAILED;
    goto cleanup;

done:
    request->state = FF_REQUEST_STATE_SENT;
    goto cleanup;

cleanup:
    if (host_name != NULL)
    {
        FREE(host_name);
    }

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movq -0x8(%rbp), %rax
movb 0x28(%rax), %al
movb %al, -0xa(%rbp)
movb -0xa(%rbp), %al
movb %al, %cl
addb $-0x1, %cl
movb %cl, -0xa(%rbp)
movzbl %al, %eax
cmpl $0x0, %eax
jle 0x3ec2
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl -0xa(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
subl $0x4, %eax
jne 0x3ebe
jmp 0x3e76
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl -0xa(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movzwl 0x4(%rax), %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
movb %al, -0x1a(%rbp)
jne 0x3eb4
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl -0xa(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
sete %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
andb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x3ec0
jmp 0x3ec0
jmp 0x3e4a
movq -0x8(%rbp), %rdi
callq 0x3f50
movq %rax, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3edc
jmp 0x3f12
testb $0x1, -0x9(%rbp)
je 0x3ef6
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4340
andb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x3f08
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x48e0
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
je 0x3f10
jmp 0x3f1e
jmp 0x3f12
movq -0x8(%rbp), %rax
movl $0xa, (%rax)
jmp 0x3f28
movq -0x8(%rbp), %rax
movl $0xa, (%rax)
cmpq $0x0, -0x18(%rbp)
je 0x3f44
jmp 0x3f31
movq -0x18(%rbp), %rdi
callq 0x2350
movq $0x0, -0x18(%rbp)
jmp 0x3f44
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/logging.c
// Function: ff_log
void ff_log(enum ff_log_type type, char *message, ...)
{
    if (type < ff_log_level)
    {
        return;
    }

    char time_str[20];
    char *prefix;
    char full_message[255];

    time_t now;
    time(&now);
    struct tm *nowinfo = localtime(&now);
    strftime(time_str, sizeof(time_str) / sizeof(time_str[0]), "%Y-%m-%d %H:%I:%S", nowinfo);

    switch (type)
    {
    case FF_DEBUG:
        prefix = "DEBUG";
        break;
    case FF_INFO:
        prefix = "INFO";
        break;
    case FF_WARNING:
        prefix = "WARNING";
        break;
    case FF_ERROR:
        prefix = "ERROR";
        break;
    case FF_FATAL:
        prefix = "FATAL";
        break;
    default:
        prefix = "UNKNOWN";
        break;
    }

    va_list args;
    va_start(args, message);

    vsprintf(full_message, message, args);
    printf("[%s] %s %s\n", time_str, prefix, full_message);

    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
testb %al, %al
je 0x4db7
movaps %xmm0, -0x1f0(%rbp)
movaps %xmm1, -0x1e0(%rbp)
movaps %xmm2, -0x1d0(%rbp)
movaps %xmm3, -0x1c0(%rbp)
movaps %xmm4, -0x1b0(%rbp)
movaps %xmm5, -0x1a0(%rbp)
movaps %xmm6, -0x190(%rbp)
movaps %xmm7, -0x180(%rbp)
movq %r9, -0x1f8(%rbp)
movq %r8, -0x200(%rbp)
movq %rcx, -0x208(%rbp)
movq %rdx, -0x210(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x6525(%rip), %eax      # 0xb308
jae 0x4dea
jmp 0x4f04
leaq -0x148(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x22a0
movq -0x230(%rbp), %rdi
callq 0x2220
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rcx
leaq 0x2eca(%rip), %rdx      # 0x7ce8
leaq -0x30(%rbp), %rdi
movl $0x14, %esi
callq 0x2260
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x228(%rbp)
subl $0x4, %eax
ja 0x4e97
movq -0x228(%rbp), %rax
leaq 0x2e87(%rip), %rcx      # 0x7cd4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2e9d(%rip), %rax      # 0x7cfa
movq %rax, -0x38(%rbp)
jmp 0x4ea2
leaq 0x2e96(%rip), %rax      # 0x7d00
movq %rax, -0x38(%rbp)
jmp 0x4ea2
leaq 0x2e8e(%rip), %rax      # 0x7d05
movq %rax, -0x38(%rbp)
jmp 0x4ea2
leaq 0x2e89(%rip), %rax      # 0x7d0d
movq %rax, -0x38(%rbp)
jmp 0x4ea2
leaq 0x2e82(%rip), %rax      # 0x7d13
movq %rax, -0x38(%rbp)
jmp 0x4ea2
leaq 0x2e7b(%rip), %rax      # 0x7d19
movq %rax, -0x38(%rbp)
leaq -0x170(%rbp), %rax
leaq -0x220(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x140(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x170(%rbp), %rdx
callq 0x2150
leaq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x140(%rbp), %rcx
leaq 0x2e2b(%rip), %rdi      # 0x7d21
movb $0x0, %al
callq 0x2050
leaq -0x170(%rbp), %rax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/main.c
// Function: main
int main(int argc, char **argv)
{
    signal(SIGINT, ff_sigint_handler);

    enum ff_action action = ff_parse_arguments(&ff_global_config, argc, argv);
    int ret = EXIT_SUCCESS;

    switch (action)
    {
    case FF_ACTION_START_PROXY:
        ret = ff_proxy_start(&ff_global_config);
        break;

    case FF_ACTION_PRINT_VERSION:
        ff_print_version(stdout);
        ret = 0;
        break;

    case FF_ACTION_PRINT_USAGE:
        ff_print_usage(stdout);
        ret = 0;
        break;

    case FF_ACTION_INVALID_ARGS:
        ff_print_usage(stderr);
        ret = EXIT_FAILURE;
        break;
    }

    ff_log(FF_INFO, "Exiting...");
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x1c83(%rip), %rsi      # 0x6bb0
movl $0x2, %edi
callq 0x2340
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x63fb(%rip), %rdi      # 0xb340
callq 0x2630
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x14(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0x4fcf
movq -0x20(%rbp), %rax
leaq 0x2dc1(%rip), %rcx      # 0x7d30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x63c1(%rip), %rdi      # 0xb340
callq 0x6170
movl %eax, -0x18(%rbp)
jmp 0x4fcf
movq 0x6038(%rip), %rax      # 0xafc8
movq (%rax), %rdi
callq 0x2b00
movl $0x0, -0x18(%rbp)
jmp 0x4fcf
movq 0x6020(%rip), %rax      # 0xafc8
movq (%rax), %rdi
callq 0x2ab0
movl $0x0, -0x18(%rbp)
jmp 0x4fcf
movq 0x6020(%rip), %rax      # 0xafe0
movq (%rax), %rdi
callq 0x2ab0
movl $0x1, -0x18(%rbp)
movl $0x2, %edi
leaq 0x2d65(%rip), %rsi      # 0x7d40
movb $0x0, %al
callq 0x4d70
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/parser.c
// Function: ff_request_parse_chunk
void ff_request_parse_chunk(struct ff_request *request, uint32_t buff_size, void *buff)
{
    bool isFirstChunk = request->version == 0;

    if (isFirstChunk)
    {
        ff_request_parse_first_chunk(request, buff_size, buff);
    }
    else
    {
        ff_request_parse_data_chunk(request, buff_size, buff);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
sete %al
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
je 0x502b
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x5050
jmp 0x503b
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x5180
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/parser.c
// Function: ff_request_parse_first_chunk
void ff_request_parse_first_chunk(struct ff_request *request, uint32_t buff_size, void *buff)
{
    bool is_raw_http = ff_request_is_raw_http(buff_size, buff);

    if (is_raw_http)
    {
        ff_request_parse_raw_http(request, buff_size, buff);
        return;
    }

    if (buff_size < sizeof(struct __raw_ff_request_header))
    {
        ff_log(FF_WARNING, "Packet buffer too small to contain header (%d)", buff_size);
        request->state = FF_REQUEST_STATE_RECEIVING_FAIL;
        return;
    }

    struct __raw_ff_request_header *header = (struct __raw_ff_request_header *)buff;
    request->version = ntohs(header->version);
    request->request_id = ntohll(header->request_id);
    request->payload_length = ntohl(header->total_length);
    ff_request_parse_data_chunk(request, buff_size, buff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x5750
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
je 0x508f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x5840
jmp 0x5177
movl -0xc(%rbp), %eax
cmpq $0x14, %rax
jae 0x50bd
movl -0xc(%rbp), %edx
movl $0x3, %edi
leaq 0x2ca4(%rip), %rsi      # 0x7d4b
movb $0x0, %al
callq 0x4d70
movq -0x8(%rbp), %rax
movl $0x2, (%rax)
jmp 0x5177
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzwl (%rax), %edi
callq 0x24d0
movzwl %ax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl $0x1, %edi
callq 0x23a0
movl %eax, %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jne 0x50fe
movq -0x28(%rbp), %rax
movq 0x2(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x5143
movq -0x28(%rbp), %rcx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq 0x2(%rcx), %rax
movl %eax, %edi
callq 0x23a0
movl %eax, %eax
shlq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x2(%rax), %rax
shrq $0x20, %rax
movl %eax, %edi
callq 0x23a0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movl 0xa(%rax), %edi
callq 0x23a0
movl %eax, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x5180
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/parser.c
// Function: ff_request_parse_id
uint64_t ff_request_parse_id(uint32_t buff_size, void *buff)
{
    bool is_raw_http = ff_request_is_raw_http(buff_size, buff);

    if (is_raw_http)
    {
        return 0;
    }
    else
    {
        struct __raw_ff_request_header *header = (struct __raw_ff_request_header *)buff;
        return ntohll(header->request_id);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x5750
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
je 0x56c0
movq $0x0, -0x8(%rbp)
jmp 0x5738
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1, %edi
callq 0x23a0
movl %eax, %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jne 0x56eb
movq -0x28(%rbp), %rax
movq 0x2(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x5730
movq -0x28(%rbp), %rcx
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq 0x2(%rcx), %rax
movl %eax, %edi
callq 0x23a0
movl %eax, %eax
shlq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x2(%rax), %rax
shrq $0x20, %rax
movl %eax, %edi
callq 0x23a0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/parser.c
// Function: ff_request_is_raw_http
bool ff_request_is_raw_http(uint32_t buff_size, void *buff)
{
    if (buff_size == 0)
    {
        return false;
    }

    bool is_raw_http = false;

    for (int i = 0; i < (int)(sizeof(HTTP_METHODS) / sizeof(HTTP_METHODS[0])); i++)
    {
        if (buff_size < strlen(HTTP_METHODS[i]))
        {
            break;
        }

        is_raw_http |= strncmp(HTTP_METHODS[i], buff, strlen(HTTP_METHODS[i])) == 0;

        if (is_raw_http)
        {
            break;
        }
    }

    return is_raw_http;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x576e
movb $0x0, -0x1(%rbp)
jmp 0x582b
movb $0x0, -0x11(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x9, -0x18(%rbp)
jge 0x5823
movl -0x8(%rbp), %eax
movq %rax, -0x20(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x5b2b(%rip), %rax      # 0xb2c0
movq (%rax,%rcx,8), %rdi
callq 0x2140
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x57ac
jmp 0x5823
movslq -0x18(%rbp), %rcx
leaq 0x5b09(%rip), %rax      # 0xb2c0
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x5aee(%rip), %rax      # 0xb2c0
movq (%rax,%rcx,8), %rdi
callq 0x2140
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
callq 0x2160
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x5813
jmp 0x5823
jmp 0x5815
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5779
movb -0x11(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/parser.c
// Function: ff_request_parse_raw_http
void ff_request_parse_raw_http(struct ff_request *request, uint32_t buff_size, void *buff)
{
    request->version = FF_VERSION_RAW;
    request->state = FF_REQUEST_STATE_RECEIVED;
    request->payload_length = buff_size;
    request->received_length = buff_size;
    request->payload = ff_request_payload_node_alloc();
    request->payload->length = buff_size;
    ff_request_payload_load_buff(request->payload, buff_size, buff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movl -0xc(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0xc(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
callq 0x5ea0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movl -0xc(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movw %cx, 0x2(%rax)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x5ef0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/request.c
// Function: ff_request_option_node_alloc
struct ff_request_option_node *ff_request_option_node_alloc()
{
    struct ff_request_option_node *option = malloc(sizeof(struct ff_request_option_node));

    option->type = 0;
    option->length = 0;
    option->value = NULL;

    return option;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x10, %edi
callq 0x23e0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/TimeToogo[P]ff-proxy/src/request.c
// Function: ff_request_option_node_free
void ff_request_option_node_free(struct ff_request_option_node *option)
{
    if (option == NULL)
        return;

    FREE(option->value);

    FREE(option);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x5e65
jmp 0x5e93
jmp 0x5e67
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2350
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
jmp 0x5e82
movq -0x8(%rbp), %rdi
callq 0x2350
movq $0x0, -0x8(%rbp)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)