LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_iterate_prev
uint8_t obdeque_iterate_prev(const obdeque *deque, obdeque_iterator *it){

  assert(deque);
  assert(it);
  assert(it->deque == deque);

  if(!it->node) return 0;

  /* update the iterator if the prev node exists, and return 1 */
  if(it->node->prev){
    ob_retain((obj *)it->node->prev);
    ob_release((obj *)it->node);
    it->node = it->node->prev;
    return 1;
  }

  /* else the iterator is at the end of the list, return 0 */
  return 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x223e
movq %rsi, %rbx
testq %rsi, %rsi
je 0x225d
cmpq %rdi, 0x8(%rbx)
jne 0x227c
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x223a
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x223a
callq 0x34d3
movq 0x10(%rbx), %rdi
callq 0x349e
movq 0x10(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rbx)
movb $0x1, %al
jmp 0x223c
xorl %eax, %eax
popq %rbx
retq
leaq 0x2527(%rip), %rdi      # 0x476c
leaq 0x23cc(%rip), %rsi      # 0x4618
leaq 0x251f(%rip), %rcx      # 0x4772
movl $0x61, %edx
callq 0x1050
leaq 0x24f8(%rip), %rdi      # 0x475c
leaq 0x23ad(%rip), %rsi      # 0x4618
leaq 0x2500(%rip), %rcx      # 0x4772
movl $0x62, %edx
callq 0x1050
leaq 0x24dc(%rip), %rdi      # 0x475f
leaq 0x238e(%rip), %rsi      # 0x4618
leaq 0x24e1(%rip), %rcx      # 0x4772
movl $0x63, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_add_at_head
void obdeque_add_at_head(obdeque *deque, obj *to_add){

  obdeque_node *new_node;

  assert(deque);
  assert(to_add);

  /* creating deque node with to_add ob_retains to account for the deque's
   * reference */
  new_node = obdeque_new_node(to_add);

  /* set node data */
  new_node->next = deque->head;

  /* update deque data */
  /* if a head aleady exists update head prev */
  if(deque->head) deque->head->prev = new_node;
  else deque->tail = new_node; /* else set tail, which should not be NULL
                                 anymore*/
  deque->head = new_node;
  deque->length++;

  return;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x22d5
testq %rsi, %rsi
je 0x22f4
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2313
movq 0x8(%rbx), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbx), %rdx
leaq 0x18(%rcx), %rsi
testq %rcx, %rcx
cmoveq %rdx, %rsi
movq %rax, (%rsi)
movq %rax, 0x8(%rbx)
incq 0x18(%rbx)
popq %rbx
retq
leaq 0x2490(%rip), %rdi      # 0x476c
leaq 0x2335(%rip), %rsi      # 0x4618
leaq 0x24ca(%rip), %rcx      # 0x47b4
movl $0x78, %edx
callq 0x1050
leaq 0x24e4(%rip), %rdi      # 0x47df
leaq 0x2316(%rip), %rsi      # 0x4618
leaq 0x24ab(%rip), %rcx      # 0x47b4
movl $0x79, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_new_node
obdeque_node * obdeque_new_node(obj *to_store){

  static const char classname[] = "obdeque_node";
  obdeque_node *new_instance;

  assert(to_store != NULL);

  new_instance = malloc(sizeof(obdeque_node));
  assert(new_instance != NULL);

  /* initialize base class data */
  ob_init_base((obj *)new_instance, &obdeque_destroy_node, NULL, NULL, NULL,
               classname);

  ob_retain(to_store);
  new_instance->stored = to_store;
  new_instance->next = NULL;
  new_instance->prev = NULL;

  return new_instance;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x236d
movq %rdi, %rbx
movl $0x20, %edi
callq 0x10b0
testq %rax, %rax
je 0x238c
movq %rax, %r14
leaq 0x8fa(%rip), %rsi       # 0x2c32
leaq 0x2a91(%rip), %r9       # 0x4dd0
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x32f0
movq %rbx, %rdi
callq 0x34d3
movq %rbx, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2757(%rip), %rdi      # 0x4acb
leaq 0x229d(%rip), %rsi      # 0x4618
leaq 0x275a(%rip), %rcx      # 0x4adc
movl $0x1b1, %edx            # imm = 0x1B1
callq 0x1050
leaq 0x276f(%rip), %rdi      # 0x4b02
leaq 0x227e(%rip), %rsi      # 0x4618
leaq 0x273b(%rip), %rcx      # 0x4adc
movl $0x1b4, %edx            # imm = 0x1B4
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_add_at_iterator
void obdeque_add_at_iterator(obdeque *deque, obdeque_iterator *it, obj *to_add){

  obdeque_node *new_node;

  assert(deque);
  assert(it);
  assert(it->deque == deque);
  assert(to_add);

  if(!it->node){
    obdeque_add_at_head(deque, to_add);
    it->node = deque->head;
  }

  /* creating deque node with to_add ob_retains to account for the deque's
   * reference */
  new_node = obdeque_new_node(to_add);

  /* set node data */
  new_node->prev = it->node->prev;
  new_node->next = it->node;
  if(it->node->prev) it->node->prev->next = new_node;
  it->node->prev = new_node;

  deque->length++;

  /* update deque data if the iterator is pointing at the head (added node
   * cannot be the new tail) */
  if(it->node == deque->head) deque->head = new_node;

  /* update iterator to newly inserted node */
  assert(obdeque_iterate_prev(deque, it));

  return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x245f
movq %rsi, %rbx
testq %rsi, %rsi
je 0x247e
movq %rdi, %r14
cmpq %rdi, 0x8(%rbx)
jne 0x249d
movq %rdx, %r15
testq %rdx, %rdx
je 0x24bc
cmpq $0x0, 0x10(%rbx)
jne 0x2413
movq %r15, %rdi
callq 0x2313
movq 0x8(%r14), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%r14), %rdx
leaq 0x18(%rcx), %rsi
testq %rcx, %rcx
cmoveq %rdx, %rsi
movq %rax, (%rsi)
movq %rax, 0x8(%r14)
incq 0x18(%r14)
movq %rax, 0x10(%rbx)
movq %r15, %rdi
callq 0x2313
movq 0x10(%rbx), %rcx
movq 0x18(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq %rcx, 0x10(%rax)
testq %rdx, %rdx
je 0x2434
movq %rax, 0x10(%rdx)
movq %rax, 0x18(%rcx)
incq 0x18(%r14)
cmpq 0x8(%r14), %rcx
jne 0x2446
movq %rax, 0x8(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21f6
testb %al, %al
je 0x24db
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2306(%rip), %rdi      # 0x476c
leaq 0x21ab(%rip), %rsi      # 0x4618
leaq 0x239d(%rip), %rcx      # 0x4811
movl $0xac, %edx
callq 0x1050
leaq 0x22d7(%rip), %rdi      # 0x475c
leaq 0x218c(%rip), %rsi      # 0x4618
leaq 0x237e(%rip), %rcx      # 0x4811
movl $0xad, %edx
callq 0x1050
leaq 0x22bb(%rip), %rdi      # 0x475f
leaq 0x216d(%rip), %rsi      # 0x4618
leaq 0x235f(%rip), %rcx      # 0x4811
movl $0xae, %edx
callq 0x1050
leaq 0x231c(%rip), %rdi      # 0x47df
leaq 0x214e(%rip), %rsi      # 0x4618
leaq 0x2340(%rip), %rcx      # 0x4811
movl $0xaf, %edx
callq 0x1050
leaq 0x2372(%rip), %rdi      # 0x4854
leaq 0x212f(%rip), %rsi      # 0x4618
leaq 0x2321(%rip), %rcx      # 0x4811
movl $0xc7, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_join
obdeque * obdeque_join(const obdeque *d1, const obdeque *d2){

  obdeque *joined;
  obdeque_iterator *it;
  obj *element;

  assert(d1);
  assert(d2);

  joined = obdeque_copy(d1);

  it = obdeque_head_iterator(d2);

  if(!it) return joined; /* if the list is empty, return joined list */

  /* while there are elements in the deque to copy add to the tail of the
   * deque */
  do{
    element = obdeque_obj_at_iterator(d2, it);
    obdeque_add_at_tail(joined, element);
  } while(obdeque_iterate_next(d2, it));

  ob_release((obj *)it);

  return joined;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x258e
movq %rsi, %rbx
testq %rsi, %rsi
je 0x25ad
callq 0x1e72
movq %rax, %r14
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
callq 0x213c
testq %rax, %rax
je 0x2566
movq %rax, %r15
cmpq %rbx, 0x8(%r15)
jne 0x256f
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x2545
movq 0x8(%rax), %rsi
jmp 0x2547
xorl %esi, %esi
movq %r14, %rdi
callq 0x1fc7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x203f
testb %al, %al
jne 0x2530
movq %r15, %rdi
callq 0x349e
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x21e9(%rip), %rdi      # 0x475f
leaq 0x209b(%rip), %rsi      # 0x4618
leaq 0x2447(%rip), %rcx      # 0x49cb
movl $0x12a, %edx            # imm = 0x12A
callq 0x1050
leaq 0x22df(%rip), %rdi      # 0x4874
leaq 0x207c(%rip), %rsi      # 0x4618
leaq 0x22d4(%rip), %rcx      # 0x4877
movl $0xd3, %edx
callq 0x1050
leaq 0x22fb(%rip), %rdi      # 0x48af
leaq 0x205d(%rip), %rsi      # 0x4618
leaq 0x22b5(%rip), %rcx      # 0x4877
movl $0xd4, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_find_obj
uint8_t obdeque_find_obj(const obdeque *deque, const obj *to_find){

  obdeque_iterator *it;
  uint8_t retval = 0;

  assert(deque);
  assert(to_find);

  it = obdeque_head_iterator(deque);
  if(!it) return 0; /* obj is not in an empty list */

  do{
    if(ob_compare(obdeque_obj_at_iterator(deque, it), to_find) == OB_EQUAL_TO){
      retval = 1;
      break;
    }
  } while(obdeque_iterate_next(deque, it));

  ob_release((obj *)it);

  return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x268c
movq %rsi, %rbx
testq %rsi, %rsi
je 0x26ab
movq %rdi, %r14
movq 0x8(%rdi), %rsi
callq 0x213c
testq %rax, %rax
je 0x2611
movq %rax, %r15
cmpq %r14, 0x8(%rax)
jne 0x266d
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x2615
movq 0x8(%rax), %rdi
jmp 0x2617
xorl %ebp, %ebp
jmp 0x2660
xorl %edi, %edi
movq %rbx, %rsi
callq 0x341b
movb $0x1, %bpl
testb %al, %al
je 0x2658
movq %r14, %rdi
movq %r15, %rsi
callq 0x203f
testb %al, %al
je 0x2656
cmpq %r14, 0x8(%r15)
jne 0x266d
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x264a
movq 0x8(%rax), %rdi
jmp 0x264c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x341b
jmp 0x2622
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x349e
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20eb(%rip), %rdi      # 0x475f
leaq 0x1f9d(%rip), %rsi      # 0x4618
leaq 0x2349(%rip), %rcx      # 0x49cb
movl $0x12a, %edx            # imm = 0x12A
callq 0x1050
leaq 0x20d9(%rip), %rdi      # 0x476c
leaq 0x1f7e(%rip), %rsi      # 0x4618
leaq 0x2211(%rip), %rcx      # 0x48b2
movl $0xed, %edx
callq 0x1050
leaq 0x2237(%rip), %rdi      # 0x48e9
leaq 0x1f5f(%rip), %rsi      # 0x4618
leaq 0x21f2(%rip), %rcx      # 0x48b2
movl $0xee, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_sort_with_funct
void obdeque_sort_with_funct(obdeque *deque, int8_t order, ob_compare_fptr funct){

  obdeque sorted; /* stack variable to remove internal memory management
                     burden */

  assert(deque);
  assert(order == OB_LEAST_TO_GREATEST || order == OB_GREATEST_TO_LEAST);
  assert(funct);

  sorted = obdeque_recursive_sort(*deque, order, funct);

  /* connect head and tail of newly sorted list to deque */
  deque->head = sorted.head;
  deque->tail = sorted.tail;

  return;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
testq %rdi, %rdi
je 0x2726
movq %rdi, %rbx
movsbl %sil, %esi
cmpl $-0x1, %esi
je 0x26f3
cmpl $0x1, %esi
jne 0x2764
testq %rdx, %rdx
je 0x2745
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x2783
movups 0x8(%r14), %xmm0
movups %xmm0, 0x8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x203f(%rip), %rdi      # 0x476c
leaq 0x1ee4(%rip), %rsi      # 0x4618
leaq 0x21b6(%rip), %rcx      # 0x48f1
movl $0x10a, %edx            # imm = 0x10A
callq 0x1050
leaq 0x2225(%rip), %rdi      # 0x4971
leaq 0x1ec5(%rip), %rsi      # 0x4618
leaq 0x2197(%rip), %rcx      # 0x48f1
movl $0x10c, %edx            # imm = 0x10C
callq 0x1050
leaq 0x21c7(%rip), %rdi      # 0x4932
leaq 0x1ea6(%rip), %rsi      # 0x4618
leaq 0x2178(%rip), %rcx      # 0x48f1
movl $0x10b, %edx            # imm = 0x10B
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_remove_head
void obdeque_remove_head(obdeque *deque){

  obdeque_node *temp_node;

  assert(deque);

  /* return if the list is empty */
  if(!(temp_node = deque->head)) return;

  /* repair deque after removal */
  deque->head = deque->head->next;
  if(deque->head) deque->head->prev = NULL;
  else deque->tail = NULL;

  deque->length--;

  /* set temp_node next and prev to null, to separate the node completely from
   * the deque if it lives on through a reference in an iterator */
  temp_node->next = NULL;
  temp_node->prev = NULL;

  ob_release((obj *)temp_node);

  return;
}

// Assembly:
testq %rdi, %rdi
je 0x2a35
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x2a34
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x10(%rdi), %rdx
leaq 0x18(%rcx), %rsi
testq %rcx, %rcx
cmoveq %rdx, %rsi
movq $0x0, (%rsi)
decq 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %rax, %rdi
jmp 0x349e
retq
pushq %rax
leaq 0x1d2f(%rip), %rdi      # 0x476c
leaq 0x1bd4(%rip), %rsi      # 0x4618
leaq 0x1fc8(%rip), %rcx      # 0x4a13
movl $0x135, %edx            # imm = 0x135
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_remove_tail
void obdeque_remove_tail(obdeque *deque){

  obdeque_node *temp_node;

  assert(deque);

  /* return NULL if the list is empty */
  if(!(temp_node = deque->tail)) return;

  /* repair deque after removal */
  deque->tail = deque->tail->prev;
  if(deque->tail) deque->tail->next = NULL;
  else deque->head = NULL;

  deque->length--;

  /* set temp_node next and prev to null, to separate the node completely from
   * the deque if it lives on through a reference in an iterator */
  temp_node->next = NULL;
  temp_node->prev = NULL;

  ob_release((obj *)temp_node);

  return;
}

// Assembly:
testq %rdi, %rdi
je 0x2a95
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x2a94
movq 0x18(%rax), %rcx
movq %rcx, 0x10(%rdi)
leaq 0x8(%rdi), %rdx
leaq 0x10(%rcx), %rsi
testq %rcx, %rcx
cmoveq %rdx, %rsi
movq $0x0, (%rsi)
decq 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %rax, %rdi
jmp 0x349e
retq
pushq %rax
leaq 0x1ccf(%rip), %rdi      # 0x476c
leaq 0x1b74(%rip), %rsi      # 0x4618
leaq 0x1f8c(%rip), %rcx      # 0x4a37
movl $0x150, %edx            # imm = 0x150
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_remove_at_iterator
void obdeque_remove_at_iterator(obdeque *deque, obdeque_iterator *it){

  obdeque_node *temp_node;

  assert(deque);
  assert(it);
  assert(deque == it->deque); /* ensure that iterator is associated with given
                                 deque */
  if(!it->node) return; /* if iterator points to no node (an empty deque)
                           do nothing */

  if(it->node == deque->head) deque->head = it->node->next;
  if(it->node == deque->tail) deque->tail = it->node->prev;
  if(it->node->prev) it->node->prev->next = it->node->next;
  if(it->node->next) it->node->next->prev = it->node->prev;

  deque->length--;

  temp_node = it->node;

  /* advance iterator to next valid node */
  if(!obdeque_iterate_next(deque, it) && !obdeque_iterate_prev(deque, it))
    it->node = NULL;

  /* set temp_node next and prev to null, to separate the node completely from
   * the deque if it lives on through a reference in an iterator */
  temp_node->next = NULL;
  temp_node->prev = NULL;

  ob_release((obj *)temp_node); /* ob_release reference that deque holds on node */

  return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2b6f
movq %rsi, %rbx
testq %rsi, %rsi
je 0x2b8e
movq %rdi, %r15
cmpq %rdi, 0x8(%rbx)
jne 0x2bad
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x2b63
cmpq 0x8(%r15), %r14
jne 0x2af6
movq 0x10(%r14), %rax
movq %rax, 0x8(%r15)
movq 0x18(%r14), %rax
cmpq 0x10(%r15), %r14
jne 0x2b04
movq %rax, 0x10(%r15)
movq 0x10(%r14), %rcx
testq %rax, %rax
je 0x2b11
movq %rcx, 0x10(%rax)
testq %rcx, %rcx
je 0x2b1a
movq %rax, 0x18(%rcx)
leaq 0x10(%r14), %r12
decq 0x18(%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x203f
testb %al, %al
jne 0x2b48
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21f6
testb %al, %al
jne 0x2b48
movq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x349e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1bf6(%rip), %rdi      # 0x476c
leaq 0x1a9b(%rip), %rsi      # 0x4618
leaq 0x1ed7(%rip), %rcx      # 0x4a5b
movl $0x16b, %edx            # imm = 0x16B
callq 0x1050
leaq 0x1bc7(%rip), %rdi      # 0x475c
leaq 0x1a7c(%rip), %rsi      # 0x4618
leaq 0x1eb8(%rip), %rcx      # 0x4a5b
movl $0x16c, %edx            # imm = 0x16C
callq 0x1050
leaq 0x1ee6(%rip), %rdi      # 0x4a9a
leaq 0x1a5d(%rip), %rsi      # 0x4618
leaq 0x1e99(%rip), %rcx      # 0x4a5b
movl $0x16d, %edx            # imm = 0x16D
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_clear
void obdeque_clear(obdeque *deque){

  obdeque_node *tmp, *next;

  assert(deque);

  tmp = deque->head;

  while(tmp){

    next = tmp->next;

    /* remove references to other nodes, individual nodes may live on due to
     * references from iterators */
    tmp->next = NULL;
    tmp->prev = NULL;

    ob_release((obj *)tmp);
    tmp = next;
  }

  deque->head = NULL;
  deque->tail = NULL;
  deque->length = 0;

  return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2c13
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
je 0x2bfd
movq 0x10(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
callq 0x349e
movq %r14, %rdi
testq %r14, %r14
jne 0x2be5
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1b52(%rip), %rdi      # 0x476c
leaq 0x19f7(%rip), %rsi      # 0x4618
leaq 0x1e85(%rip), %rcx      # 0x4aad
movl $0x18e, %edx            # imm = 0x18E
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_destroy_node
void obdeque_destroy_node(obj *to_dealloc){

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

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

  ob_release(instance->stored);

  return;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2c55
movq %rdi, %rbx
leaq 0x218e(%rip), %rsi      # 0x4dd0
callq 0x3518
testb %al, %al
je 0x2c74
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x349e
leaq 0x1ebb(%rip), %rdi      # 0x4b17
leaq 0x19b5(%rip), %rsi      # 0x4618
leaq 0x1eb8(%rip), %rcx      # 0x4b22
movl $0x1c8, %edx            # imm = 0x1C8
callq 0x1050
leaq 0x1ec8(%rip), %rdi      # 0x4b43
leaq 0x1996(%rip), %rsi      # 0x4618
leaq 0x1e99(%rip), %rcx      # 0x4b22
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_destroy_iterator
void obdeque_destroy_iterator(obj *to_dealloc){

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

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

  ob_release((obj *)instance->node);

  return;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2cb6
movq %rdi, %rbx
leaq 0x213d(%rip), %rsi      # 0x4de0
callq 0x3518
testb %al, %al
je 0x2cd5
movq 0x10(%rbx), %rdi
popq %rbx
jmp 0x349e
leaq 0x1e5a(%rip), %rdi      # 0x4b17
leaq 0x1954(%rip), %rsi      # 0x4618
leaq 0x1ef7(%rip), %rcx      # 0x4bc2
movl $0x1ef, %edx            # imm = 0x1EF
callq 0x1050
leaq 0x1f0b(%rip), %rdi      # 0x4be7
leaq 0x1935(%rip), %rsi      # 0x4618
leaq 0x1ed8(%rip), %rcx      # 0x4bc2
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_destroy
void obdeque_destroy(obj *to_dealloc){

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

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

  obdeque_clear(instance);

  return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2d4b
movq %rdi, %rbx
leaq 0x20ea(%rip), %rsi      # 0x4df1
callq 0x3518
testb %al, %al
je 0x2d6a
movq 0x8(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
je 0x2d35
movq 0x10(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
callq 0x349e
movq %r14, %rdi
testq %r14, %r14
jne 0x2d1d
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1dc5(%rip), %rdi      # 0x4b17
leaq 0x18bf(%rip), %rsi      # 0x4618
leaq 0x2021(%rip), %rcx      # 0x4d81
movl $0x2cf, %edx            # imm = 0x2CF
callq 0x1050
leaq 0x202c(%rip), %rdi      # 0x4d9d
leaq 0x18a0(%rip), %rsi      # 0x4618
leaq 0x2002(%rip), %rcx      # 0x4d81
movl $0x2d0, %edx            # imm = 0x2D0
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_hash
ob_hash_t obdeque_hash(const obj *to_hash){

  static int8_t init = 0;
  ob_hash_t value;
  static ob_hash_t seed = 0;
  obdeque *instance = (obdeque *)to_hash;
  obdeque_iterator *it;

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

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

  value = seed;

  it = obdeque_head_iterator(instance);
  if(!it) return value;

  do{
    value += ob_hash(obdeque_obj_at_iterator(instance, it));
    value += value << 10;
    value ^= value >> 6;
  }while(obdeque_iterate_next(instance, it));

  ob_release((obj *)it);

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

  return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2e82
movq %rdi, %rbx
leaq 0x2050(%rip), %rsi      # 0x4df1
callq 0x3518
testb %al, %al
je 0x2ea1
cmpb $0x1, 0x42d3(%rip)      # 0x7088
jne 0x2dc0
movq 0x42d2(%rip), %r15      # 0x7090
jmp 0x2de4
xorl %edi, %edi
callq 0x10a0
movl %eax, %edi
callq 0x1070
callq 0x10d0
movslq %eax, %r15
movq %r15, 0x42b3(%rip)      # 0x7090
movb $0x1, 0x42a4(%rip)      # 0x7088
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
callq 0x213c
testq %rax, %rax
je 0x2e5a
movq %rax, %r14
cmpq %rbx, 0x8(%r14)
jne 0x2e63
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x2e0d
movq 0x8(%rax), %rdi
jmp 0x2e0f
xorl %edi, %edi
callq 0x33dc
addq %r15, %rax
movq %rax, %rcx
shlq $0xa, %rcx
addq %rax, %rcx
movq %rcx, %r15
shrq $0x6, %r15
xorq %rcx, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x203f
testb %al, %al
jne 0x2df8
movq %r14, %rdi
callq 0x349e
leaq (%r15,%r15,8), %rax
movq %rax, %rcx
shrq $0xb, %rcx
xorq %rax, %rcx
movq %rcx, %r15
shlq $0xf, %r15
addq %rcx, %r15
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x18f5(%rip), %rdi      # 0x475f
leaq 0x17a7(%rip), %rsi      # 0x4618
leaq 0x1b53(%rip), %rcx      # 0x49cb
movl $0x12a, %edx            # imm = 0x12A
callq 0x1050
leaq 0x1db1(%rip), %rdi      # 0x4c3a
leaq 0x1788(%rip), %rsi      # 0x4618
leaq 0x1dab(%rip), %rcx      # 0x4c42
movl $0x26b, %edx            # imm = 0x26B
callq 0x1050
leaq 0x1dbe(%rip), %rdi      # 0x4c66
leaq 0x1769(%rip), %rsi      # 0x4618
leaq 0x1d8c(%rip), %rcx      # 0x4c42
movl $0x26c, %edx            # imm = 0x26C
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/theck01[P]offbrand_lib/src/classes/obdeque.c
// Function: obdeque_compare
int8_t obdeque_compare(const obj *a, const obj *b){

  int8_t retval = OB_EQUAL_TO; /* assume equality and disprove if not */
  const obdeque *comp_a = (obdeque *)a;
  const obdeque *comp_b = (obdeque *)b;
  obdeque_iterator *a_it, *b_it;

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

  if(comp_a->length != comp_b->length) return OB_NOT_EQUAL;

  a_it = obdeque_head_iterator(comp_a);
  b_it = obdeque_head_iterator(comp_b);

  if(!a_it && !b_it) return OB_EQUAL_TO;

  if(a_it && b_it){
    do{
      if(ob_compare(obdeque_obj_at_iterator(comp_a, a_it),
                    obdeque_obj_at_iterator(comp_b, b_it)) !=
       OB_EQUAL_TO){
      retval = OB_NOT_EQUAL;
      break;
    }
    }while(obdeque_iterate_next(comp_a, a_it) &&
           obdeque_iterate_next(comp_b, b_it));
  }
  else retval = OB_NOT_EQUAL;

  ob_release((obj *)a_it);
  ob_release((obj *)b_it);

  return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x2fec
movq %rsi, %rbx
testq %rsi, %rsi
je 0x300b
movq %rdi, %r14
leaq 0x1f0a(%rip), %rsi      # 0x4df1
callq 0x3518
testb %al, %al
je 0x302a
leaq 0x1ef6(%rip), %rsi      # 0x4df1
movq %rbx, %rdi
callq 0x3518
testb %al, %al
je 0x3049
movq 0x18(%r14), %rax
movb $0x2, %bpl
cmpq 0x18(%rbx), %rax
jne 0x2fc2
movq 0x8(%r14), %rsi
movq %r14, %rdi
callq 0x213c
movq %rax, %r15
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
callq 0x213c
movq %rax, %r12
movq %r15, %rax
orq %r12, %rax
je 0x2fc0
testq %r12, %r12
sete %al
testq %r15, %r15
sete %cl
movb $0x2, %bpl
orb %al, %cl
jne 0x2fae
cmpq %r14, 0x8(%r15)
jne 0x2fcd
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x2f6a
movq 0x8(%rax), %rdi
jmp 0x2f6c
xorl %edi, %edi
cmpq %rbx, 0x8(%r12)
jne 0x2fcd
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x2f83
movq 0x8(%rax), %rsi
jmp 0x2f85
xorl %esi, %esi
callq 0x341b
testb %al, %al
jne 0x2fae
movq %r14, %rdi
movq %r15, %rsi
callq 0x203f
testb %al, %al
je 0x2fac
movq %rbx, %rdi
movq %r12, %rsi
callq 0x203f
testb %al, %al
jne 0x2f55
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x349e
movq %r12, %rdi
callq 0x349e
jmp 0x2fc2
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x178b(%rip), %rdi      # 0x475f
leaq 0x163d(%rip), %rsi      # 0x4618
leaq 0x19e9(%rip), %rcx      # 0x49cb
movl $0x12a, %edx            # imm = 0x12A
callq 0x1050
leaq 0x1c94(%rip), %rdi      # 0x4c87
leaq 0x161e(%rip), %rsi      # 0x4618
leaq 0x1c88(%rip), %rcx      # 0x4c89
movl $0x290, %edx            # imm = 0x290
callq 0x1050
leaq 0x1ca8(%rip), %rdi      # 0x4cba
leaq 0x15ff(%rip), %rsi      # 0x4618
leaq 0x1c69(%rip), %rcx      # 0x4c89
movl $0x291, %edx            # imm = 0x291
callq 0x1050
leaq 0x1c8b(%rip), %rdi      # 0x4cbc
leaq 0x15e0(%rip), %rsi      # 0x4618
leaq 0x1c4a(%rip), %rcx      # 0x4c89
movl $0x292, %edx            # imm = 0x292
callq 0x1050
leaq 0x1c87(%rip), %rdi      # 0x4cd7
leaq 0x15c1(%rip), %rsi      # 0x4618
leaq 0x1c2b(%rip), %rcx      # 0x4c89
movl $0x293, %edx            # imm = 0x293
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/waywardgeek[P]sonic/sonic_lite.c
// Function: sonicFlushStream
void sonicFlushStream(void) {
  int maxRequired = 2 * SONIC_MAX_PERIOD;
  int remainingSamples = sonicStream.numInputSamples;
  float speed = sonicStream.speed;
  int expectedOutputSamples = sonicStream.numOutputSamples + (int)((remainingSamples / speed) + 0.5f);

  memset(sonicStream.inputBuffer + remainingSamples, 0,
      sizeof(short) * (SONIC_INPUT_BUFFER_SIZE - remainingSamples));
  sonicStream.numInputSamples += 2 * maxRequired;
  sonicWriteShortToStream(NULL, 0);
  /* Throw away any extra samples we generated due to the silence we added */
  if (sonicStream.numOutputSamples > expectedOutputSamples) {
    sonicStream.numOutputSamples = expectedOutputSamples;
  }
  /* Empty input buffer */
  sonicStream.numInputSamples = 0;
  sonicStream.remainingInputToCopy = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq 0x4149(%rip), %rax      # 0x5624
leaq 0x3bca(%rip), %rcx      # 0x50ac
cvtsi2ss %eax, %xmm0
divss 0x412e(%rip), %xmm0     # 0x561c
addss 0x1b2a(%rip), %xmm0     # 0x3020
cvttss2si %xmm0, %ebx
addl 0x4128(%rip), %ebx      # 0x5628
leaq (%rcx,%rax,2), %rdi
movl $0x146, %edx            # imm = 0x146
subq %rax, %rdx
addq %rdx, %rdx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x1090
addl $0x1ec, 0x4101(%rip)    # imm = 0x1EC
xorl %edi, %edi
xorl %esi, %esi
callq 0x1550
cmpl %ebx, 0x40f6(%rip)      # 0x5628
jle 0x153a
movl %ebx, 0x40ee(%rip)      # 0x5628
movl %r14d, 0x40e3(%rip)     # 0x5624
movl %r14d, 0x40e4(%rip)     # 0x562c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/waywardgeek[P]sonic/main_lite.c
// Function: main
int main(int argc, char** argv) {
  char* inFileName;
  char* outFileName;
  float speed = 1.0f;
  float volume = 1.0f;
  int xArg = 1;

  while (xArg < argc && *(argv[xArg]) == '-') {
    if (!strcmp(argv[xArg], "-s")) {
      xArg++;
      if (xArg < argc) {
        speed = atof(argv[xArg]);
        printf("Setting speed to %0.2fX\n", speed);
      }
    } else if (!strcmp(argv[xArg], "-v")) {
      xArg++;
      if (xArg < argc) {
        volume = atof(argv[xArg]);
        printf("Setting volume to %0.2f\n", volume);
      }
    }
    xArg++;
  }
  if (argc - xArg != 2) {
    usage();
  }
  inFileName = argv[xArg];
  outFileName = argv[xArg + 1];
  runSonic(inFileName, outFileName, speed, volume);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2, %edi
jl 0x2218
movss 0xeb3(%rip), %xmm0      # 0x302c
movl $0x1, %r14d
leaq 0x1091(%rip), %r15      # 0x3217
leaq 0x10a3(%rip), %r12      # 0x3230
movss %xmm0, (%rsp)
movss %xmm0, 0x4(%rsp)
movslq %r14d, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
jne 0x2231
cmpb $0x73, 0x1(%rax)
jne 0x21b4
cmpb $0x0, 0x2(%rax)
je 0x21e2
cmpb $0x76, 0x1(%rax)
jne 0x220e
cmpb $0x0, 0x2(%rax)
jne 0x220e
incl %r14d
cmpl %ebp, %r14d
jge 0x220e
movslq %r14d, %rax
movq (%rbx,%rax,8), %rdi
callq 0x1050
cvtsd2ss %xmm0, %xmm0
movq %r12, %rdi
movss %xmm0, (%rsp)
jmp 0x2203
incl %r14d
cmpl %ebp, %r14d
jge 0x220e
movslq %r14d, %rax
movq (%rbx,%rax,8), %rdi
callq 0x1050
cvtsd2ss %xmm0, %xmm0
movq %r15, %rdi
movss %xmm0, 0x4(%rsp)
cvtss2sd %xmm0, %xmm0
movb $0x1, %al
callq 0x1080
incl %r14d
cmpl %ebp, %r14d
jl 0x2198
jmp 0x2231
movl $0x1, %r14d
movss 0xe06(%rip), %xmm0      # 0x302c
movss %xmm0, 0x4(%rsp)
movss %xmm0, (%rsp)
subl %r14d, %ebp
cmpl $0x2, %ebp
jne 0x2339
movslq %r14d, %rax
movq (%rbx,%rax,8), %r14
movq 0x8(%rbx,%rax,8), %r15
leaq 0x8(%rsp), %rsi
leaq 0xc(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x19dc
movl (%r12), %edi
cmpl $0x1, %edi
jne 0x233e
movl 0x8(%rsp), %edi
cmpl $0x1f40, %edi           # imm = 0x1F40
jne 0x2343
movq %rax, %rbx
testq %rax, %rax
je 0x2348
movq %r15, %rdi
movl $0x1f40, %esi           # imm = 0x1F40
movl $0x1, %edx
callq 0x1c6c
testq %rax, %rax
je 0x2350
movq %rax, %r14
callq 0x143e
movss 0x4(%rsp), %xmm0
callq 0x142c
movss (%rsp), %xmm0
callq 0x1435
leaq 0xb0(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movl $0x50, %edx
callq 0x1f42
movl %eax, %ebp
testl %eax, %eax
je 0x22ee
movq %r15, %rdi
movl %ebp, %esi
callq 0x1550
jmp 0x2302
callq 0x14d0
jmp 0x2302
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x1fc0
movq %r12, %rdi
movl $0x50, %esi
callq 0x1463
testl %eax, %eax
jg 0x22f5
testl %ebp, %ebp
jg 0x22cc
movq %rbx, %rdi
callq 0x1e60
movq %r14, %rdi
callq 0x1e60
xorl %eax, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1270
callq 0x1297
callq 0x12ba
movq %r14, %rdi
callq 0x130e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12e2
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_print_error
void AVI_print_error(char *str)
{
   int aerrno;

   aerrno = (AVI_errno>=0 && AVI_errno<num_avi_errors) ? AVI_errno : num_avi_errors-1;

   fprintf(stderr,"%s: %s\n",str,avi_errors[aerrno]);

   /* for the following errors, perror should report a more detailed reason: */

   if(AVI_errno == AVI_ERR_OPEN ||
      AVI_errno == AVI_ERR_READ ||
      AVI_errno == AVI_ERR_WRITE ||
      AVI_errno == AVI_ERR_WRITE_INDEX ||
      AVI_errno == AVI_ERR_CLOSE )
   {
      perror("REASON");
   }
}

// Assembly:
pushq %rax
movq %rdi, %rdx
movq 0x11a385(%rip), %rax    # 0x51b510
movl %eax, %ecx
cmpq $0xf, %rax
pushq $0xe
popq %rax
cmovbq %rcx, %rax
movq $0x519848, %rcx         # imm = 0x519848
movq (%rcx), %rdi
leaq 0x117fc7(%rip), %rcx    # 0x519170
movq (%rcx,%rax,8), %rcx
leaq 0xd5143(%rip), %rsi     # 0x4d62f7
xorl %eax, %eax
callq 0x428270
movq 0x11a34e(%rip), %rax    # 0x51b510
addq $-0x2, %rax
cmpq $0x4, %rax
jbe 0x4011ce
popq %rax
retq
leaq 0xd512a(%rip), %rdi     # 0x4d62ff
popq %rax
jmp 0x4286f0
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_open_output_file
avi_t* AVI_open_output_file(char * filename)
{
   avi_t *AVI;
   int i;

   int mask;

   unsigned char AVI_header[HEADERBYTES];

   /* Allocate the avi_t struct and zero it */

   AVI = (avi_t *) malloc(sizeof(avi_t));
   if(AVI==0)
   {
      AVI_errno = AVI_ERR_NO_MEM;
      return 0;
   }
   memset((void *)AVI,0,sizeof(avi_t));

   /* Since Linux needs a long time when deleting big files,
      we do not truncate the file when we open it.
      Instead it is truncated when the AVI file is closed */

   mask = umask (0);
   umask (mask);

#ifdef WIN32
   AVI->fdes = open(filename, O_RDWR|O_CREAT|O_BINARY, (S_IRUSR | S_IWUSR) &~ mask);
#else
   AVI->fdes = open(filename, O_RDWR|O_CREAT, (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) &~ mask);
#endif
   if (AVI->fdes < 0)
   {
      AVI_errno = AVI_ERR_OPEN;
      free(AVI);
      return 0;
   }

   /* Write out HEADERBYTES bytes, the header will go here
      when we are finished with writing */

   for (i=0;i<HEADERBYTES;i++) AVI_header[i] = 0;
   i = avi_write(AVI->fdes,(char *)AVI_header,HEADERBYTES);
   if (i != HEADERBYTES)
   {
      close(AVI->fdes);
      AVI_errno = AVI_ERR_WRITE;
      free(AVI);
      return 0;
   }

   AVI->pos  = HEADERBYTES;
   AVI->mode = AVI_MODE_WRITE; /* open for writing */

   //init
   AVI->anum = 0;
   AVI->aptr = 0;

   return AVI;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x800, %rsp            # imm = 0x800
movq %rdi, %r14
movl $0x1, %edi
movl $0x488, %esi            # imm = 0x488
callq 0x446d10
testq %rax, %rax
je 0x401a59
movq %rax, %rbx
xorl %edi, %edi
callq 0x482470
movl %eax, %ebp
notl %ebp
movl %eax, %edi
callq 0x482470
andl $0x1a4, %ebp            # imm = 0x1A4
movq %r14, %rdi
movl $0x42, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x4824b0
movl %eax, %ebp
cltq
movq %rax, (%rbx)
testl %ebp, %ebp
js 0x401a66
movq %rsp, %rdi
xorl %r14d, %r14d
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x4010e0
leaq (%rsp,%r14), %rsi
movl $0x800, %edx            # imm = 0x800
subq %r14, %rdx
movl %ebp, %edi
callq 0x482680
testq %rax, %rax
js 0x401a73
addq %rax, %r14
cmpq $0x800, %r14            # imm = 0x800
jb 0x401a33
jmp 0x401a76
movq $0x8, 0x119aac(%rip) # 0x51b510
jmp 0x401ab3
movq $0x2, 0x119a9f(%rip) # 0x51b510
jmp 0x401aab
movq %rax, %r14
cmpl $0x800, %r14d           # imm = 0x800
jne 0x401a99
movq $0x800, 0x3e0(%rbx) # imm = 0x800
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq %rax, 0x438(%rbx)
jmp 0x401ab5
movl %ebp, %edi
callq 0x482880
movq $0x4, 0x119a65(%rip) # 0x51b510
movq %rbx, %rdi
callq 0x445c00
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_set_video
void AVI_set_video(avi_t *AVI, int width, int height, double fps, const char *compressor)
{
   /* may only be called if file is open for writing */

   if(AVI->mode==AVI_MODE_READ) return;

   AVI->width  = width;
   AVI->height = height;
   AVI->fps    = fps;

   if(strncmp(compressor, "RGB", 3)==0) {
     memset(AVI->compressor, 0, 4);
   } else {
     memcpy(AVI->compressor,compressor,4);
   }

   AVI->compressor[4] = 0;

   avi_update_header(AVI);
}

// Assembly:
cmpq $0x1, 0x8(%rdi)
jne 0x401acc
retq
movslq %esi, %rax
movq %rax, 0x10(%rdi)
movslq %edx, %rax
movq %rax, 0x18(%rdi)
movsd %xmm0, 0x20(%rdi)
cmpb $0x52, (%rcx)
jne 0x401af2
cmpb $0x47, 0x1(%rcx)
jne 0x401af2
xorl %eax, %eax
cmpb $0x42, 0x2(%rcx)
je 0x401af4
movl (%rcx), %eax
movl %eax, 0x28(%rdi)
movb $0x0, 0x2c(%rdi)
jmp 0x401b00
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_write_frame
int AVI_write_frame(avi_t *AVI, char *data, long bytes, int keyframe)
{
  unsigned long pos;

  if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; }

  pos = AVI->pos;

  if(avi_write_data(AVI,data,bytes,0,keyframe)) return -1;

  AVI->last_pos = pos;
  AVI->last_len = bytes;
  AVI->video_frames++;
  return 0;
}

// Assembly:
cmpq $0x1, 0x8(%rdi)
jne 0x402201
movq $0x7, 0x119315(%rip) # 0x51b510
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %r8d
movq %rdx, %rbx
movq %rdi, %r14
movq 0x3e0(%rdi), %r15
xorl %ecx, %ecx
callq 0x402242
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x40223c
movq %r15, 0x418(%r14)
movq %rbx, 0x420(%r14)
incq 0x40(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: avi_write_data
static int avi_write_data(avi_t *AVI, char *data, unsigned long length, int audio, int keyframe)
{
   int n;

   unsigned char astr[5];

   /* Check for maximum file length */

   if ( (AVI->pos + 8 + length + 8 + (AVI->n_idx+1)*16) > AVI_MAX_LEN ) {
     AVI_errno = AVI_ERR_SIZELIM;
     return -1;
   }

   /* Add index entry */

   //set tag for current audio track
   sprintf((char *)astr, "0%1dwb", (int)(AVI->aptr+1));

   if(audio)
     n = avi_add_index_entry(AVI,astr,0x00,AVI->pos,length);
   else
     n = avi_add_index_entry(AVI,(unsigned char *)"00db",((keyframe)?0x10:0x0),AVI->pos,length);

   if(n) return -1;

   /* Output tag and data */

   if(audio)
     n = avi_add_chunk(AVI,astr,(unsigned char *)data,length);
   else
     n = avi_add_chunk(AVI,(unsigned char *)"00db",(unsigned char *)data,length);

   if (n) return -1;

   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r12d
movq 0x3e8(%rdi), %rax
shlq $0x4, %rax
movq 0x3e0(%rdi), %rcx
addq %rdx, %rcx
addq %rax, %rcx
movabsq $-0xfefff800, %rax      # imm = 0xFFFFFFFF01000800
addq %rax, %rcx
addq $0x20, %rcx
cmpq %rax, %rcx
jae 0x402294
movq $0x1, 0x119286(%rip) # 0x51b510
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x402335
movl %r8d, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x43c(%rdi), %edx
incl %edx
leaq 0xd405f(%rip), %rsi     # 0x4d630e
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x4284c0
testl %r12d, %r12d
je 0x4022ed
movq 0x3e0(%r15), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %r8
callq 0x4023a4
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x402335
movl 0x8(%rsp), %esi
movq %r15, %rdi
jmp 0x402323
xorl %edx, %edx
testl %ebp, %ebp
setne %dl
shll $0x4, %edx
movq 0x3e0(%r15), %rcx
leaq 0xd3dc4(%rip), %rsi     # 0x4d60c9
movq %r15, %rdi
movq %rbx, %r8
callq 0x4023a4
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x402335
movq %r15, %rdi
movl $0x62643030, %esi       # imm = 0x62643030
movq %r14, %rdx
movl %ebx, %ecx
callq 0x404715
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_dup_frame
int AVI_dup_frame(avi_t *AVI)
{
   if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; }

   if(AVI->last_pos==0) return 0; /* No previous real frame */
   if(avi_add_index_entry(AVI,(unsigned char *)"00db",0x10,AVI->last_pos,AVI->last_len)) return -1;
   AVI->video_frames++;
   AVI->must_use_index = 1;
   return 0;
}

// Assembly:
cmpq $0x1, 0x8(%rdi)
jne 0x40235a
movq $0x7, 0x1191bc(%rip) # 0x51b510
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %rbx
movq %rdi, %rbx
movq 0x418(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x4023a2
movq 0x420(%rbx), %r8
leaq 0xd3d4f(%rip), %rsi     # 0x4d60c9
movl $0x10, %edx
movq %rbx, %rdi
callq 0x4023a4
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4023a2
incq 0x40(%rbx)
movl $0x1, 0x428(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: avi_add_index_entry
static int avi_add_index_entry(avi_t *AVI, unsigned char *tag, long flags, unsigned long pos, unsigned long len)
{
   void *ptr;

   if(AVI->n_idx>=AVI->max_idx) {
     ptr = realloc((void *)AVI->idx,(AVI->max_idx+4096)*16);

     if(ptr == 0) {
       AVI_errno = AVI_ERR_NO_MEM;
       return -1;
     }
     AVI->max_idx += 4096;
     AVI->idx = (unsigned char((*)[16]) ) ptr;
   }

   /* Add index entry */

   //   fprintf(stderr, "INDEX %s %ld %lu %lu\n", tag, flags, pos, len);

   memcpy(AVI->idx[AVI->n_idx],tag,4);
   long2str(AVI->idx[AVI->n_idx]+ 4,flags);
   long2str(AVI->idx[AVI->n_idx]+ 8, pos);
   long2str(AVI->idx[AVI->n_idx]+12, len);

   /* Update counter */

   AVI->n_idx++;

   if(len>AVI->max_len) AVI->max_len=len;

   return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq 0x3e8(%rdi), %rcx
movq 0x3f0(%rdi), %rsi
movq 0x408(%rdi), %rax
cmpq %rsi, %rcx
jl 0x402407
shlq $0x4, %rsi
addq $0x10000, %rsi          # imm = 0x10000
movq %rax, %rdi
callq 0x445f50
testq %rax, %rax
je 0x40246b
addq $0x1000, 0x3f0(%r14) # imm = 0x1000
movq %rax, 0x408(%r14)
movq 0x3e8(%r14), %rcx
shlq $0x4, %rcx
movl (%r13), %edx
movl %edx, (%rax,%rcx)
movq 0x3e8(%r14), %rax
movq 0x408(%r14), %rcx
shlq $0x4, %rax
movl %r12d, 0x4(%rcx,%rax)
movq 0x3e8(%r14), %rax
movq 0x408(%r14), %rcx
shlq $0x4, %rax
movl %r15d, 0x8(%rcx,%rax)
movq 0x3e8(%r14), %rax
movq 0x408(%r14), %rcx
shlq $0x4, %rax
movl %ebx, 0xc(%rcx,%rax)
incq 0x3e8(%r14)
xorl %eax, %eax
cmpq %rbx, 0x58(%r14)
jae 0x40247b
movq %rbx, 0x58(%r14)
jmp 0x40247b
movq $0x8, 0x11909a(%rip) # 0x51b510
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_append_audio
int AVI_append_audio(avi_t *AVI, char *data, long bytes)
{

  long i, length, pos;
  unsigned char c[4];

  if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; }

  // update last index entry:

  --AVI->n_idx;
  length = str2ulong(AVI->idx[AVI->n_idx]+12);
  pos    = str2ulong(AVI->idx[AVI->n_idx]+8);

  //update;
  long2str(AVI->idx[AVI->n_idx]+12,length+bytes);

  ++AVI->n_idx;

  AVI->track[AVI->aptr].audio_bytes += bytes;

  //update chunk header
  lseek(AVI->fdes, pos+4, SEEK_SET);
  long2str(c, length+bytes);
  avi_write(AVI->fdes, (char *)c, 4);

  lseek(AVI->fdes, pos+8+length, SEEK_SET);

  i=PAD_EVEN(length + bytes);

  bytes = i - length;
  avi_write(AVI->fdes, data, bytes);
  AVI->pos = pos + 8 + i;

  return 0;
}

// Assembly:
cmpq $0x1, 0x8(%rdi)
jne 0x4024f4
movq $0x7, 0x119022(%rip) # 0x51b510
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x3e8(%rdi), %rax
movq 0x408(%rdi), %rcx
decq %rax
movq %rax, 0x3e8(%rdi)
shlq $0x4, %rax
movslq 0xc(%rcx,%rax), %rsi
movslq 0x8(%rcx,%rax), %r13
movq %rsi, 0x8(%rsp)
leaq (%rsi,%rdx), %r12
movl %r12d, 0xc(%rcx,%rax)
incq 0x3e8(%rdi)
movslq 0x43c(%rdi), %rax
imulq $0x70, %rax, %rax
addq %rdx, 0x90(%rdi,%rax)
movl (%rdi), %edi
leaq 0x4(%r13), %rsi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x482720
movl %r12d, 0x4(%rsp)
movl (%rbx), %ebp
leaq (%rsp,%r15), %rsi
addq $0x4, %rsi
movl $0x4, %edx
subq %r15, %rdx
movl %ebp, %edi
callq 0x482680
testq %rax, %rax
js 0x402592
addq %rax, %r15
cmpq $0x4, %r15
jb 0x40256d
movl (%rbx), %edi
movq 0x8(%rsp), %r15
leaq (%r15,%r13), %rsi
addq $0x8, %rsi
addq $0x8, %r13
movq %r13, 0x10(%rsp)
xorl %edx, %edx
callq 0x482720
incq %r12
andq $-0x2, %r12
movq %r12, %r13
subq %r15, %r13
je 0x4025e4
movl (%rbx), %r15d
xorl %ebp, %ebp
leaq (%r14,%rbp), %rsi
movq %r13, %rdx
subq %rbp, %rdx
movl %r15d, %edi
callq 0x482680
testq %rax, %rax
js 0x4025e4
addq %rax, %rbp
cmpq %r13, %rbp
jb 0x4025c5
addq 0x10(%rsp), %r12
movq %r12, 0x3e0(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_open_input_file
avi_t *AVI_open_input_file(const char *filename, int getIndex)
{
  avi_t *AVI=NULL;

  /* Create avi_t structure */

  AVI = (avi_t *) malloc(sizeof(avi_t));
  if(AVI==NULL)
    {
      AVI_errno = AVI_ERR_NO_MEM;
      return 0;
    }
  memset((void *)AVI,0,sizeof(avi_t));

  AVI->mode = AVI_MODE_READ; /* open for reading */

  /* Open the file */

#ifdef WIN32
  AVI->fdes = open(filename,O_RDONLY|O_BINARY);
#else
  AVI->fdes = open(filename,O_RDONLY);
#endif
  if(AVI->fdes < 0)
    {
      AVI_errno = AVI_ERR_OPEN;
      free(AVI);
      return 0;
    }

  avi_parse_input_file(AVI, getIndex);

  AVI->aptr=0; //reset

  return AVI;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %edi
movl $0x488, %esi            # imm = 0x488
callq 0x446d10
testq %rax, %rax
je 0x402f21
movq %rax, %rbx
movq $0x1, 0x8(%rax)
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x4824b0
cltq
movq %rax, (%rbx)
testl %eax, %eax
js 0x402f2e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x402f4b
movl $0x0, 0x43c(%rbx)
jmp 0x402f43
movq $0x8, 0x1185e4(%rip) # 0x51b510
jmp 0x402f41
movq $0x2, 0x1185d7(%rip) # 0x51b510
movq %rbx, %rdi
callq 0x445c00
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_open_fd
avi_t *AVI_open_fd(int fd, int getIndex)
{
  avi_t *AVI=NULL;

  /* Create avi_t structure */

  AVI = (avi_t *) malloc(sizeof(avi_t));
  if(AVI==NULL)
    {
      AVI_errno = AVI_ERR_NO_MEM;
      return 0;
    }
  memset((void *)AVI,0,sizeof(avi_t));

  AVI->mode = AVI_MODE_READ; /* open for reading */

  // file alread open
  AVI->fdes = fd;

  avi_parse_input_file(AVI, getIndex);

  AVI->aptr=0; //reset

  return AVI;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x1, %edi
movl $0x488, %esi            # imm = 0x488
callq 0x446d10
movq %rax, %rbx
testq %rax, %rax
je 0x403e14
movq $0x1, 0x8(%rbx)
movslq %r14d, %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x402f4b
movl $0x0, 0x43c(%rbx)
jmp 0x403e1f
movq $0x8, 0x1176f1(%rip) # 0x51b510
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_frame_size
long AVI_frame_size(avi_t *AVI, long frame)
{
   if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; }
   if(!AVI->video_index)         { AVI_errno = AVI_ERR_NO_IDX;   return -1; }

   if(frame < 0 || frame >= AVI->video_frames) return 0;
   return(AVI->video_index[frame].len);
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x403f28
movq 0x410(%rdi), %rax
testq %rax, %rax
je 0x403f38
testq %rsi, %rsi
js 0x403f35
cmpq %rsi, 0x40(%rdi)
jle 0x403f35
leaq (%rsi,%rsi,2), %rcx
movq 0x10(%rax,%rcx,8), %rax
retq
movq $0x7, 0x1175dd(%rip) # 0x51b510
jmp 0x403f43
xorl %eax, %eax
retq
movq $0xd, 0x1175cd(%rip) # 0x51b510
movq $-0x1, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/avilib.c
// Function: AVI_audio_size
long AVI_audio_size(avi_t *AVI, long frame)
{
  if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; }
  if(!AVI->track[AVI->aptr].audio_index)         { AVI_errno = AVI_ERR_NO_IDX;   return -1; }

  if(frame < 0 || frame >= AVI->track[AVI->aptr].audio_chunks) return 0;
  return(AVI->track[AVI->aptr].audio_index[frame].len);
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x403f86
movslq 0x43c(%rdi), %rax
imulq $0x70, %rax, %rcx
movq 0xc8(%rdi,%rcx), %rax
testq %rax, %rax
je 0x403f96
testq %rsi, %rsi
js 0x403f93
addq %rdi, %rcx
addq $0x60, %rcx
cmpq %rsi, 0x38(%rcx)
jle 0x403f93
leaq (%rsi,%rsi,2), %rcx
movq 0x8(%rax,%rcx,8), %rax
retq
movq $0x7, 0x11757f(%rip) # 0x51b510
jmp 0x403fa1
xorl %eax, %eax
retq
movq $0xd, 0x11756f(%rip) # 0x51b510
movq $-0x1, %rax
retq