LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_annotationitem
DexAnnotationItem* dx_annotationitem(ByteStream* bs, uint32_t offset) {
  DexAnnotationItem* res;
  int check;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexAnnotationItem,res);

  bsseek(bs,offset);

  check  = bsread(bs,(uint8_t*) &(res->visibility),sizeof(uint8_t));

  res->annotation = dx_encodedannotation(bs,bs->offset);

  res->meta.corrupted = (check != sizeof(uint8_t) || bs->exhausted);
  
  return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x7316
movl %esi, %ebp
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x46a0
movq %rax, %rbx
movl %ebp, 0x4(%rax)
movb $0x0, (%rax)
movq %r14, %rdi
movl %ebp, %esi
callq 0x4480
leaq 0x8(%rbx), %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x4490
movl %eax, %ebp
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4160
movq %rax, 0x10(%rbx)
movb $0x1, %al
cmpl $0x1, %ebp
jne 0x7312
cmpl $0x0, 0x1c(%r14)
setne %al
movb %al, (%rbx)
jmp 0x7318
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_encodedarrayitem
DexEncodedArrayItem* dx_encodedarrayitem(ByteStream* bs, uint32_t offset) {
  DexEncodedArrayItem* res;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexEncodedArrayItem,res);

  bsseek(bs,offset);

  res->value = dx_encodedarray(bs,bs->offset);

  res->meta.corrupted = bs->exhausted;
  
  return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x7362
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x46a0
movq %rax, %r14
movl %ebp, 0x4(%rax)
movb $0x0, (%rax)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4480
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x47f0
movq %rax, 0x8(%r14)
cmpl $0x0, 0x1c(%rbx)
setne (%r14)
jmp 0x7365
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_string.c
// Function: dx_string_find_index
uint32_t dx_string_find_index(Dex* dx, char* str) {
  unsigned int i;
  int ret;

  if (dx == NULL || str == NULL) return -1;

  for (i=0; i<dx->header->string_ids_size; i++) {
    ret = strncmp(str, (char *)dx->string_data_list[i]->data, strlen((char *)dx->string_data_list[i]->data));

    if (ret == 0) // string already exists
      return -1;
    else if (ret < 0)
      return i;
  }

  return dx->header->string_ids_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
pushq $-0x1
popq %rbx
jne 0x8016
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
movl 0x40(%rax), %r13d
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x800f
movq 0x40(%r15), %rax
movq (%rax,%rbp,8), %rax
movq 0x18(%rax), %r12
movq %r12, %rdi
callq 0x4200
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x40a0
testl %eax, %eax
je 0x8016
js 0x8014
incq %rbp
jmp 0x7fdd
movl %r13d, %ebx
jmp 0x8016
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_string.c
// Function: dx_string_add
void dx_string_add(Dex* dx, char* str) {
  uint32_t index;

  if (dx == NULL || str == NULL) return;

  index = dx_string_find_index(dx,str);

  dx_string_add_stringid(dx,index);
  dx_string_add_stringdata(dx,index,str);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x8333
retq
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x48c0
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0x4300
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x4510
nop
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: add_shift
void add_shift(dx_shift* shift, uint32_t base, int32_t delta) {
  dx_shift* next;
  dx_shift* last;

  printf("Shift Added.\n");

  if (shift == NULL) return;

  next = (dx_shift*) malloc_s(sizeof(dx_shift));

  next->base = base;
  next->delta = delta;
  next->next = NULL;
  
  last = shift;
  while (last->next != NULL) last = last->next;
  
  last->next = next;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x1e76(%rip), %rdi      # 0xa1e9
callq 0x40e0
testq %rbx, %rbx
je 0x83a0
pushq $0x10
popq %rdi
callq 0x46a0
movl %r14d, (%rax)
movl %ebp, 0x4(%rax)
andq $0x0, 0x8(%rax)
movq %rbx, %rcx
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x8390
movq %rax, 0x8(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_header
void dxo_header(DexHeaderItem* obj, dx_shift* shift) {
  UPDATE(obj->meta.offset);

  UPDATE(obj->link_off);
  UPDATE(obj->map_off);
  UPDATE(obj->string_ids_off);
  UPDATE(obj->type_ids_off);
  UPDATE(obj->proto_ids_off);
  UPDATE(obj->field_ids_off);
  UPDATE(obj->method_ids_off);
  UPDATE(obj->class_defs_off);
  UPDATE(obj->data_off);
}

// Assembly:
movl 0x4(%rdi), %ecx
movl (%rsi), %eax
cmpl %eax, %ecx
jb 0x83b4
addl 0x4(%rsi), %ecx
movl %ecx, 0x4(%rdi)
movl 0x38(%rdi), %ecx
cmpl %eax, %ecx
jb 0x83c1
addl 0x4(%rsi), %ecx
movl %ecx, 0x38(%rdi)
movl 0x3c(%rdi), %ecx
cmpl %eax, %ecx
jb 0x83ce
addl 0x4(%rsi), %ecx
movl %ecx, 0x3c(%rdi)
movl 0x44(%rdi), %ecx
cmpl %eax, %ecx
jb 0x83db
addl 0x4(%rsi), %ecx
movl %ecx, 0x44(%rdi)
movl 0x4c(%rdi), %ecx
cmpl %eax, %ecx
jb 0x83e8
addl 0x4(%rsi), %ecx
movl %ecx, 0x4c(%rdi)
movl 0x54(%rdi), %ecx
cmpl %eax, %ecx
jb 0x83f5
addl 0x4(%rsi), %ecx
movl %ecx, 0x54(%rdi)
movl 0x5c(%rdi), %ecx
cmpl %eax, %ecx
jb 0x8402
addl 0x4(%rsi), %ecx
movl %ecx, 0x5c(%rdi)
movl 0x64(%rdi), %ecx
cmpl %eax, %ecx
jb 0x840f
addl 0x4(%rsi), %ecx
movl %ecx, 0x64(%rdi)
movl 0x6c(%rdi), %ecx
cmpl %eax, %ecx
jb 0x841c
addl 0x4(%rsi), %ecx
movl %ecx, 0x6c(%rdi)
movl 0x74(%rdi), %ecx
cmpl %eax, %ecx
jb 0x8429
addl 0x4(%rsi), %ecx
movl %ecx, 0x74(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_classdef
void dxo_classdef(DexClassDefItem* obj, dx_shift* shift) {
  UPDATE(obj->meta.offset);

  UPDATE(obj->interfaces_off);
  UPDATE(obj->annotations_off);
  UPDATE(obj->class_data_off);
  UPDATE(obj->static_values_off);
}

// Assembly:
movl 0x4(%rdi), %ecx
movl (%rsi), %eax
cmpl %eax, %ecx
jb 0x849d
addl 0x4(%rsi), %ecx
movl %ecx, 0x4(%rdi)
movl 0x14(%rdi), %ecx
cmpl %eax, %ecx
jb 0x84aa
addl 0x4(%rsi), %ecx
movl %ecx, 0x14(%rdi)
movl 0x1c(%rdi), %ecx
cmpl %eax, %ecx
jb 0x84b7
addl 0x4(%rsi), %ecx
movl %ecx, 0x1c(%rdi)
movl 0x20(%rdi), %ecx
cmpl %eax, %ecx
jb 0x84c4
addl 0x4(%rsi), %ecx
movl %ecx, 0x20(%rdi)
movl 0x24(%rdi), %ecx
cmpl %eax, %ecx
jb 0x84d1
addl 0x4(%rsi), %ecx
movl %ecx, 0x24(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_encodedmethod
void dxo_encodedmethod(DexEncodedMethodItem* obj, dx_shift* shift) {
  size_t old_size;

  UPDATE(obj->meta.offset);
  
  old_size = obj->code_off.size;
  
  UPDATE_ULEB(obj->code_off);

  if (obj->code_off.size != old_size)
    add_shift(shift,obj->meta.offset + 1,obj->code_off.size - old_size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x8509
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
movl 0x28(%r14), %ebp
movq 0x20(%r14), %rdi
movl %ebp, %esi
callq 0x4180
cmpl (%rbx), %eax
jb 0x853a
leaq 0x20(%r14), %r15
movq 0x20(%r14), %rdi
movl 0x28(%r14), %esi
callq 0x4180
addl 0x4(%rbx), %eax
movq %r15, %rdi
movl %eax, %esi
callq 0x44d0
movl 0x28(%r14), %edx
subl %ebp, %edx
jne 0x854d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%r14), %esi
incl %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4280
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_classdata
void dxo_classdata(DexClassDataItem* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  for (i=0; i<ul128toui(obj->static_fields_size); i++)
    dxo_encodedfield(obj->static_fields[i],shift);

  for (i=0; i<ul128toui(obj->instance_fields_size); i++)
    dxo_encodedfield(obj->instance_fields[i],shift);

  for (i=0; i<ul128toui(obj->direct_methods_size); i++)
    dxo_encodedmethod(obj->direct_methods[i],shift);

  for (i=0; i<ul128toui(obj->virtual_methods_size); i++)
    dxo_encodedmethod(obj->virtual_methods[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x857e
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
xorl %r15d, %r15d
movq 0x8(%r14), %rdi
movl 0x10(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x85af
movq 0x38(%r14), %rax
movq (%rax,%r15,8), %rax
movl 0x4(%rax), %ecx
cmpl (%rbx), %ecx
jb 0x85aa
addl 0x4(%rbx), %ecx
movl %ecx, 0x4(%rax)
incq %r15
jmp 0x8581
xorl %r15d, %r15d
movq 0x14(%r14), %rdi
movl 0x1c(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x85e0
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rax
movl 0x4(%rax), %ecx
cmpl (%rbx), %ecx
jb 0x85db
addl 0x4(%rbx), %ecx
movl %ecx, 0x4(%rax)
incq %r15
jmp 0x85b2
xorl %r15d, %r15d
movq 0x20(%r14), %rdi
movl 0x28(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x860c
movq 0x48(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x4770
incq %r15
jmp 0x85e3
xorl %r15d, %r15d
movq 0x2c(%r14), %rdi
movl 0x34(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x8638
movq 0x50(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x4770
incq %r15
jmp 0x860f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_typelist
void dxo_typelist(DexTypeList* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  for (i=0; i<obj->size; i++)
    dxo_typeitem(obj->list[i],shift);
}

// Assembly:
movl 0x4(%rdi), %ecx
movl (%rsi), %eax
cmpl %eax, %ecx
jb 0x865b
addl 0x4(%rsi), %ecx
movl %ecx, 0x4(%rdi)
movl 0x8(%rdi), %ecx
xorl %edx, %edx
cmpq %rcx, %rdx
jae 0x8683
movq 0x10(%rdi), %r8
movq (%r8,%rdx,8), %r8
movl 0x4(%r8), %r9d
cmpl %eax, %r9d
jb 0x867e
addl 0x4(%rsi), %r9d
movl %r9d, 0x4(%r8)
incq %rdx
jmp 0x8660
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_encodedcatchhandler
void dxo_encodedcatchhandler(DexEncodedCatchHandler* obj, dx_shift* shift) {
  int i;

  UPDATE(obj->meta.offset);

  for (i=0; i<abs(sl128toi(obj->size)); i++)
    dxo_encodedtypeaddrpair(obj->handlers[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x86b9
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
xorl %r15d, %r15d
movq 0x8(%r14), %rdi
movl 0x10(%r14), %esi
callq 0x4560
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpq %rcx, %r15
jae 0x86ef
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rax
movl 0x4(%rax), %ecx
cmpl (%rbx), %ecx
jb 0x86ea
addl 0x4(%rbx), %ecx
movl %ecx, 0x4(%rax)
incq %r15
jmp 0x86bc
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_encodedcatchhandlerlist
void dxo_encodedcatchhandlerlist(DexEncodedCatchHandlerList* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  for (i=0; i<ul128toui(obj->size); i++)
    dxo_encodedcatchhandler(obj->list[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x870e
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
xorl %r15d, %r15d
movq 0x8(%r14), %rdi
movl 0x10(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x873a
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x4570
incq %r15
jmp 0x8711
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_codeitem
void dxo_codeitem(DexCodeItem* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  UPDATE(obj->debug_info_off);

  if (obj->tries_size > 0) {
    for (i=0; i<obj->tries_size; i++)
      dxo_tryitem(obj->tries[i],shift);

    dxo_encodedcatchhandlerlist(obj->handlers,shift);    
  }
}

// Assembly:
movl 0x4(%rdi), %ecx
movl (%rsi), %eax
cmpl %eax, %ecx
jb 0x874f
addl 0x4(%rsi), %ecx
movl %ecx, 0x4(%rdi)
movl 0x10(%rdi), %ecx
cmpl %eax, %ecx
jb 0x875c
addl 0x4(%rsi), %ecx
movl %ecx, 0x10(%rdi)
movzwl 0xe(%rdi), %ecx
testq %rcx, %rcx
je 0x8794
movq 0x28(%rdi), %rdx
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x878b
movq (%rdx,%r8,8), %r9
movl 0x4(%r9), %r10d
cmpl %eax, %r10d
jb 0x8786
addl 0x4(%rsi), %r10d
movl %r10d, 0x4(%r9)
incq %r8
jmp 0x876c
movq 0x30(%rdi), %rdi
jmp 0x4070
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_maplist
void dxo_maplist(DexMapList* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  for (i=0; i<obj->size; i++)
    dxo_mapitem(obj->list[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x87d9
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
xorl %r15d, %r15d
movl 0x8(%r14), %eax
cmpq %rax, %r15
jae 0x87fa
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x41c0
incq %r15
jmp 0x87dc
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_encodedarray
void dxo_encodedarray(DexEncodedArray* obj, dx_shift* shift) {
  unsigned int i;
  
  UPDATE(obj->meta.offset);

  for (i=0; i<ul128toui(obj->size); i++)
    dxo_encodedvalue(obj->values[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x884a
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
xorl %r15d, %r15d
movq 0x8(%r14), %rdi
movl 0x10(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x8876
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x41a0
incq %r15
jmp 0x884d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_encodedannotation
void dxo_encodedannotation(DexEncodedAnnotation* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  for (i=0; i<ul128toui(obj->size); i++)
    dxo_annotationelement(obj->elements[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x8895
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
xorl %r15d, %r15d
movq 0x14(%r14), %rdi
movl 0x1c(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x88c1
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x4100
incq %r15
jmp 0x8898
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_annotationdirectoryitem
void dxo_annotationdirectoryitem(DexAnnotationDirectoryItem* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  UPDATE(obj->class_annotations_off);

  for (i=0; i<obj->fields_size; i++)
    dxo_fieldannotation(obj->field_annotations[i],shift);

  for (i=0; i<obj->annotated_methods_size; i++)
    dxo_methodannotation(obj->method_annotations[i],shift);
  
  for (i=0; i<obj->annotated_parameters_size; i++)
    dxo_parameterannotation(obj->parameter_annotations[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %ecx
movl (%rsi), %eax
cmpl %eax, %ecx
jb 0x894f
addl 0x4(%rbx), %ecx
movl %ecx, 0x4(%r14)
movl 0x8(%r14), %ecx
cmpl %eax, %ecx
jb 0x895e
addl 0x4(%rbx), %ecx
movl %ecx, 0x8(%r14)
xorl %r15d, %r15d
movl 0xc(%r14), %eax
cmpq %rax, %r15
jae 0x897f
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x4270
incq %r15
jmp 0x8961
xorl %r15d, %r15d
movl 0x10(%r14), %eax
cmpq %rax, %r15
jae 0x89a0
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x45d0
incq %r15
jmp 0x8982
xorl %r15d, %r15d
movl 0x14(%r14), %eax
cmpq %rax, %r15
jae 0x89c1
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x4810
incq %r15
jmp 0x89a3
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_annotationsetreflist
void dxo_annotationsetreflist(DexAnnotationSetRefList* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  for (i=0; i<obj->size; i++)
    dxo_annotationsetrefitem(obj->list[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x89fd
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
xorl %r15d, %r15d
movl 0x8(%r14), %eax
cmpq %rax, %r15
jae 0x8a1e
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x4750
incq %r15
jmp 0x8a00
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_offset.c
// Function: dxo_annotationsetitem
void dxo_annotationsetitem(DexAnnotationSetItem* obj, dx_shift* shift) {
  unsigned int i;

  UPDATE(obj->meta.offset);

  for (i=0; i<obj->size; i++)
    dxo_annotationoffitem(obj->entries[i],shift);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl (%rsi), %eax
jb 0x8a5a
addl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
xorl %r15d, %r15d
movl 0x8(%r14), %eax
cmpq %rax, %r15
jae 0x8a7b
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x44b0
incq %r15
jmp 0x8a5d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_stringid.c
// Function: dxsi_debuginfo
void dxsi_debuginfo(DexDebugInfo* obj, dx_shift* shift) {
  unsigned int i;
  size_t old_size;

  for (i=0; i<ul128toui(obj->parameters_size); i++) {
    old_size = obj->parameter_names[i].size;

    UPDATE_ULEBP1(obj->parameter_names[i]);
    
    if (obj->parameter_names[i].size != old_size)
      add_shift(shift,obj->meta.offset + 1,obj->parameter_names[i].size - old_size);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x14(%r14), %rdi
movl 0x1c(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r13
jae 0x8e78
movq 0x20(%r14), %rax
movl 0x8(%rax,%r12), %ebp
movq (%rax,%r12), %rdi
movl %ebp, %esi
callq 0x4520
cmpl (%rbx), %eax
jl 0x8e54
movq 0x20(%r14), %rax
leaq (%rax,%r12), %r15
movq (%rax,%r12), %rdi
movl 0x8(%rax,%r12), %esi
callq 0x4520
addl 0x4(%rbx), %eax
movq %r15, %rdi
movl %eax, %esi
callq 0x4680
movq 0x20(%r14), %rax
movl 0x8(%rax,%r12), %edx
subl %ebp, %edx
je 0x8e6f
movl 0x4(%r14), %esi
incl %esi
movq %rbx, %rdi
callq 0x4280
incq %r13
addq $0xc, %r12
jmp 0x8e05
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_stringid.c
// Function: dxsi_encodedvalue
void dxsi_encodedvalue(DexEncodedValue* obj, dx_shift* shift) {
  uint8_t value_type;

  value_type = (obj->argtype & 0x1f);
	       
  switch (value_type) {
  case 0x17:
    UPDATE(*((uint32_t*)obj->value));
    break;
  case 0x1C:
    dxsi_encodedarray((DexEncodedArray*) obj->value,shift);
    break;
  case 0x1d:
    dxsi_encodedannotation((DexEncodedAnnotation*)obj->value,shift);
    break;
  default:
    break;
  }
}

// Assembly:
movzbl 0x8(%rdi), %eax
andl $0x1f, %eax
cmpl $0x1d, %eax
je 0x8eb6
cmpl $0x1c, %eax
je 0x8ead
cmpl $0x17, %eax
jne 0x8eac
movq 0x10(%rdi), %rax
movl (%rax), %ecx
cmpl (%rsi), %ecx
jb 0x8eac
addl 0x4(%rsi), %ecx
movl %ecx, (%rax)
retq
movq 0x10(%rdi), %rdi
jmp 0x4350
movq 0x10(%rdi), %rdi
jmp 0x4790
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_stringid.c
// Function: dxsi_annotationelement
void dxsi_annotationelement(DexAnnotationElement* obj, dx_shift* shift) {
  size_t old_size;
 
  old_size = obj->name_idx.size;

  UPDATE_ULEB(obj->name_idx);
  
  if (obj->name_idx.size != old_size)
    add_shift(shift,obj->meta.offset + 1,obj->name_idx.size - old_size);

  dxsi_encodedvalue(obj->value,shift);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %ebp
movq 0x8(%rdi), %rdi
movl %ebp, %esi
callq 0x4180
cmpl (%rbx), %eax
jb 0x8f76
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rdi
movl 0x10(%r14), %esi
callq 0x4180
addl 0x4(%rbx), %eax
movq %r15, %rdi
movl %eax, %esi
callq 0x44d0
movl 0x10(%r14), %edx
subl %ebp, %edx
je 0x8f8c
movl 0x4(%r14), %esi
incl %esi
movq %rbx, %rdi
callq 0x4280
movq 0x18(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4730
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/leb128.c
// Function: l128size
unsigned int l128size(ByteStream* bs) {
  int32_t offset;
  unsigned int len = 0;
  uint8_t cbyte = 0x0;

  if (bs == NULL) return 0;

  offset = bs->offset;

  bsread(bs,&cbyte,1);

  if (!bs->exhausted) {
    len = 1;

    while (!bs->exhausted && len < 5 && (cbyte & 0x80) != 0x0) {
      len++;
      bsread(bs,&cbyte,1);
    }      
  }  
  
  bsseek(bs,offset);  

  return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movb $0x0, 0xf(%rsp)
testq %rdi, %rdi
je 0x919e
movq %rdi, %rbx
movl 0x18(%rdi), %ebp
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x4490
xorl %r14d, %r14d
cmpl $0x0, 0x1c(%rbx)
je 0x91b1
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4480
jmp 0x91a1
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %r14
xorl %eax, %eax
leaq 0xf(%rsp), %r15
pushq $0x1
popq %r12
testl %eax, %eax
jne 0x9192
cmpl $0x4, %r14d
ja 0x9192
cmpb $0x0, 0xf(%rsp)
jns 0x9192
incl %r14d
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4490
movl 0x1c(%rbx), %eax
jmp 0x91c0
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/leb128.c
// Function: l128read
int l128read(ByteStream* bs, leb128_t* leb) {
  unsigned int ret;

  if (bs == NULL || leb == NULL) return -1;

  leb->size = l128size(bs);

  ret = bsread(bs,leb->data,leb->size);

  return ret != leb->size;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x91fb
pushq $-0x1
popq %rax
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x42b0
movl %eax, 0x8(%rbx)
movl %eax, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4490
movl %eax, %ecx
xorl %eax, %eax
cmpl 0x8(%rbx), %ecx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/leb128.c
// Function: ul128toui
uint32_t ul128toui(leb128_t uleb) {
  uint32_t val = 0;
  int i;
  
  for (i=uleb.size-1; i>=0; i--) {
    val = val * 128 + (uleb.data[i] & 0x7f);
  }  

  return val;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x8(%rsp)
movl %esi, %ecx
decq %rcx
xorl %eax, %eax
testl %ecx, %ecx
js 0x92e2
shll $0x7, %eax
movl %ecx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movzbl -0x10(%rsp,%rdx), %edx
andl $0x7f, %edx
orl %edx, %eax
decq %rcx
jmp 0x92c4
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/leb128.c
// Function: sl128toi
int32_t sl128toi(leb128_t sleb) {
  int32_t val = 0;
  
  val = ul128toui(sleb);

  if ((sleb.size != 5) && (sleb.data[sleb.size-1] & 0x40) != 0) {
    val = val | ~((1 << (sleb.size*7))-1);
  }

  return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, (%rsp)
movl %esi, 0x8(%rsp)
callq 0x4180
cmpl $0x5, %ebx
je 0x9319
leal -0x1(%rbx), %ecx
testb $0x40, (%rsp,%rcx)
je 0x9319
imull $0x7, %ebx, %ecx
pushq $-0x1
popq %rdx
shll %cl, %edx
orl %edx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/leb128.c
// Function: uitoul128
void uitoul128(leb128_t* leb, uint32_t num) {
  unsigned int i;

  for (i=0; i<5; i++) {
    if (i == 4)
      leb->data[i] = num & 0x4f;
    else
      leb->data[i] = num & 0x7f;

    num /= 128;
    
    if (num == 0) break;

    leb->data[i] |= 0x80;
  }

  leb->size = i+1;
}

// Assembly:
xorl %eax, %eax
cmpq $0x4, %rax
je 0x9337
cmpq $0x5, %rax
je 0x9357
movl %esi, %ecx
andb $0x7f, %cl
movb %cl, (%rdi,%rax)
jmp 0x933f
movl %esi, %ecx
andb $0x4f, %cl
movb %cl, 0x4(%rdi)
cmpl $0x80, %esi
jb 0x9353
shrl $0x7, %esi
orb $-0x80, (%rdi,%rax)
incq %rax
jmp 0x9321
incl %eax
jmp 0x935a
pushq $0x6
popq %rax
movl %eax, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/leb128.c
// Function: itosl128
void itosl128(leb128_t* leb, int32_t num) {
  unsigned int i;

  leb->data[0] = ((num >> 00) & 0x7f) | 0x80;
  leb->data[1] = ((num >> 07) & 0x7f) | 0x80;
  leb->data[2] = ((num >> 14) & 0x7f) | 0x80;
  leb->data[3] = ((num >> 21) & 0x7f) | 0x80;
  leb->data[4] = ((num >> 28) & 0x4f) | 0x00;

  leb->size = 5;

  if (leb->data[4] == 0x00 || leb->data[4] == 0x4f) {
    leb->size--;

    for (i=3; i>0; i--) {
      if (leb->data[i] == 0x80 || leb->data[i] == 0xff)
	leb->size--;
      else 
	break;
    }
  }

  if (num > 0 && (leb->data[leb->size-1] & 0x40) != 0x0) {
    leb->size++;
  } 

  if (num < 0 && (leb->data[leb->size-1] & 0x40) == 0x0) {
    leb->size++;
  } 

  leb->data[leb->size-1] &= 0x7f;
}

// Assembly:
movl %esi, %eax
orb $-0x80, %al
movb %al, (%rdi)
movl %esi, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x1(%rdi)
movl %esi, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x2(%rdi)
movl %esi, %eax
shrl $0x15, %eax
orb $-0x80, %al
movb %al, 0x3(%rdi)
movl %esi, %eax
sarl $0x1c, %eax
movl %eax, %ecx
andb $0x4f, %cl
movb %cl, 0x4(%rdi)
movl $0x5, 0x8(%rdi)
andl $0x4f, %eax
cmpl $0x4f, %eax
je 0x93a9
testl %eax, %eax
jne 0x93e4
movl $0x4, 0x8(%rdi)
pushq $0x3
popq %rdx
pushq $-0x4
popq %rax
movq %rdx, %rcx
subq $0x1, %rcx
jb 0x93e0
movzbl (%rdi,%rdx), %r8d
cmpl $0xff, %r8d
je 0x93d6
cmpl $0x80, %r8d
jne 0x93e0
movl %edx, 0x8(%rdi)
incl %eax
movq %rcx, %rdx
jmp 0x93b9
negl %eax
jmp 0x93e7
pushq $0x5
popq %rax
testl %esi, %esi
jle 0x93fb
leal -0x1(%rax), %ecx
testb $0x40, (%rdi,%rcx)
je 0x9406
incl %eax
movl %eax, 0x8(%rdi)
jmp 0x9406
jns 0x9406
leal -0x1(%rax), %ecx
testb $0x40, (%rdi,%rcx)
je 0x93f4
decl %eax
andb $0x7f, (%rdi,%rax)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/malloc_s.c
// Function: malloc_s
void *malloc_s(size_t size) {
	if (!size)
		return NULL;

	void *new_mem = malloc(size);

	if (!new_mem) {
		fprintf(stderr, "fatal: memory exhausted (malloc of %zu bytes)\n", size);
		exit(-1);
	}

	return new_mem;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x9446
movq %rdi, %rbx
callq 0x4530
testq %rax, %rax
jne 0x9448
movq 0x4bce(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0xdcf(%rip), %rsi       # 0xa203
movq %rbx, %rdx
xorl %eax, %eax
callq 0x43d0
pushq $-0x1
popq %rdi
callq 0x47c0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/vector.c
// Function: construct_vector
vector_t *construct_vector() {
    vector_t *vector = (vector_t*)calloc(1, sizeof(vector_t));
    vector->memory = 1;
    vector->size = 0;
    vector->elements = calloc(1, sizeof(void*));
    vector->remaining = 0;

    return vector;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x3340
movq %rax, %r14
movl $0x1, 0x8(%rax)
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x3340
movq %rax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/vector.c
// Function: vector_iterator
void *vector_iterator(vector_t *vector) {
    if (!vector->remaining) {
        vector->remaining = vector->size;
        return NULL;
    }

    unsigned int index = (vector->size - vector->remaining);
    vector->remaining--;

    return get_from_vector(vector, index);
}

// Assembly:
movl 0xc(%rdi), %eax
movl 0x10(%rdi), %ecx
testl %ecx, %ecx
je 0x3859
leal -0x1(%rcx), %edx
movl %edx, 0x10(%rdi)
subl %ecx, %eax
jb 0x385c
movq (%rdi), %rcx
movq (%rcx,%rax,8), %rax
retq
movl %eax, 0x10(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/vector.c
// Function: push_to_vector
void push_to_vector(vector_t *vector, void *data) {
    if (vector->size == vector->memory) {
        vector->memory *= 2;
        vector->elements = realloc(vector->elements,
            sizeof(void*) * (vector->memory + 1));
    }

    vector->elements[vector->size++] = (void*)data;
    vector->remaining++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rdi), %ecx
movq (%rdi), %rax
cmpl 0x8(%rdi), %ecx
jne 0x38a8
addl %ecx, %ecx
movl %ecx, 0x8(%rbx)
leaq 0x8(,%rcx,8), %rsi
movq %rax, %rdi
callq 0x3490
movq %rax, (%rbx)
movl 0xc(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movl %ecx, %ecx
movq %r14, (%rax,%rcx,8)
incl 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/vector.c
// Function: pull_from_vector
void pull_from_vector(vector_t *vector, unsigned int index) {
    if (index >= vector->size)
        return;

    for (; index < vector->size; index++)
        vector->elements[index] = vector->elements[index + 1];

    vector->elements[vector->size--] = NULL;
    vector->remaining--;

    if ((vector->size * 2) == vector->memory) {
        vector->memory /= 2;
        vector->elements = realloc(vector->elements,
            sizeof(void *) * (vector->memory + 1));
    }
}

// Assembly:
movl 0xc(%rdi), %eax
cmpl %esi, %eax
jbe 0x3919
pushq %rbx
movq %rdi, %rbx
movl %esi, %ecx
movq (%rbx), %rdx
cmpq %rax, %rcx
jae 0x38e2
movq 0x8(%rdx,%rcx,8), %rsi
movq %rsi, (%rdx,%rcx,8)
incq %rcx
jmp 0x38cc
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rbx)
andq $0x0, (%rdx,%rax,8)
decl 0x10(%rbx)
leal -0x2(,%rax,2), %eax
cmpl 0x8(%rbx), %eax
jne 0x3918
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, 0x8(%rbx)
movq (%rbx), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x3490
movq %rax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/controller.c
// Function: controller
int controller(int argc, char** argv) {
    log_debug("Instance became controller");

    socket_mode = CONTROLLER;

    if (!initialize_socket())
        return EXIT_FAILURE;

    char* input_feed = calloc(1024, sizeof(char));

    for (int index = 2; index < argc; index++) {
        strcat(input_feed, argv[index]);
        input_feed[strlen(input_feed)] = '\31';
    }
    input_feed[strlen(input_feed) - 1] = '\0';

    write_to_socket(input_feed);
    free(input_feed);

    finalize_socket();

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x46a4(%rip), %rsi      # 0x8004
leaq 0x46c2(%rip), %rdx      # 0x8029
leaq 0x46ab(%rip), %r8       # 0x8019
pushq $0x3
popq %rdi
pushq $0x12
popq %rcx
xorl %eax, %eax
callq 0x50dd
leaq 0x8f2a(%rip), %rax      # 0xc8ac
movl $0x1, (%rax)
callq 0x481c
testw %ax, %ax
je 0x39f3
pushq $0x1
popq %rsi
movl $0x400, %edi            # imm = 0x400
callq 0x3340
movq %rax, %r14
movslq %ebp, %r15
pushq $0x2
popq %r12
cmpq %r15, %r12
jge 0x39cc
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x35e0
movq %r14, %rdi
callq 0x31f0
movb $0x19, (%r14,%rax)
incq %r12
jmp 0x39a9
movq %r14, %rdi
callq 0x31f0
movb $0x0, -0x1(%r14,%rax)
movq %r14, %rdi
callq 0x49eb
movq %r14, %rdi
callq 0x3060
callq 0x49bb
xorl %eax, %eax
jmp 0x39f6
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/ipc.c
// Function: ipc_process_input
void ipc_process_input(char *feed) {
    unsigned short update = 0;
    vector_t *input = construct_vector();

    char *token;
    while ((token = strsep(&feed, "\31")))
        push_to_vector(input, token);

    char *qualifier = vector_iterator(input);

    if (!strcmp(qualifier, "halt")) {
        custard_is_running = 0;
    } else if (!strcmp(qualifier, "configure"))
        ipc_command_configure(input, &update);
    else if (!strcmp(qualifier, "geometry"))
        ipc_command_geometry(input, &update);
    else if (!strcmp(qualifier, "match"))
        ipc_command_match(input, &update);
    else if (!strcmp(qualifier, "window"))
        ipc_command_window(input, &update);
    else if (!strcmp(qualifier, "workspace"))
        ipc_command_workspace(input, &update);
    else if (!strcmp(qualifier, "focus"))
        ipc_command_focus(input, &update);

    if (update) {
        apply();
        update = 0;
    }

    deconstruct_vector(input);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %r14
movq %rdi, (%r14)
andw $0x0, 0x6(%rsp)
callq 0x3808
movq %rax, %rbx
leaq 0x460e(%rip), %r15      # 0x8034
movq %r14, %rdi
movq %r15, %rsi
callq 0x3430
movq %rbx, %rdi
testq %rax, %rax
je 0x3a43
movq %rax, %rsi
callq 0x3878
jmp 0x3a26
callq 0x383d
movq %rax, %r14
leaq 0x45e4(%rip), %rsi      # 0x8036
movq %rax, %rdi
callq 0x3370
testl %eax, %eax
je 0x3adc
leaq 0x45d6(%rip), %rsi      # 0x803b
movq %r14, %rdi
callq 0x3370
testl %eax, %eax
je 0x3ae9
leaq 0x4f81(%rip), %rsi      # 0x89f9
movq %r14, %rdi
callq 0x3370
testl %eax, %eax
je 0x3af8
leaq 0x45ba(%rip), %rsi      # 0x8045
movq %r14, %rdi
callq 0x3370
testl %eax, %eax
je 0x3b02
leaq 0x4672(%rip), %rsi      # 0x8110
movq %r14, %rdi
callq 0x3370
testl %eax, %eax
je 0x3b0c
leaq 0x459a(%rip), %rsi      # 0x804b
movq %r14, %rdi
callq 0x3370
testl %eax, %eax
je 0x3b1b
leaq 0x4591(%rip), %rsi      # 0x8055
movq %r14, %rdi
callq 0x3370
testl %eax, %eax
jne 0x3b28
leaq 0x6(%rsp), %rsi
callq 0x4306
jmp 0x3b28
leaq 0x8ddd(%rip), %rax      # 0xc8c0
andw $0x0, (%rax)
jmp 0x3b28
leaq 0x6(%rsp), %rsi
movq %rbx, %rdi
callq 0x3b47
jmp 0x3b28
movq %rbx, %rdi
callq 0x3bdf
jmp 0x3b28
movq %rbx, %rdi
callq 0x3d4e
jmp 0x3b28
leaq 0x6(%rsp), %rsi
movq %rbx, %rdi
callq 0x3d81
jmp 0x3b28
leaq 0x6(%rsp), %rsi
movq %rbx, %rdi
callq 0x42ca
cmpw $0x0, 0x6(%rsp)
je 0x3b35
callq 0x6fd5
movq %rbx, %rdi
callq 0x391a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/ipc.c
// Function: ipc_command_configure
void ipc_command_configure(vector_t *input, unsigned short *screen_update) {
    /*
     * Usage:
     *  custard - configure ([configurable] [value])...
     */

    char *variable;
    char *value_string;
    kv_value_t *value = NULL;

    while (input->remaining) {
        variable = vector_iterator(input);
        value_string = vector_iterator(input);

        if (!(value = get_value_from_key(configuration, variable)))
            continue;

        ipc_helper_typecast_and_assign(value, variable, value_string);
    }

    if (!windows)
        return;

    window_t *window;
    while ((window = vector_iterator(windows))) {
        set_window_geometry(window, window->geometry);
        decorate(window);
    }

    *screen_update = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8d53(%rip), %r13      # 0xc8b0
cmpl $0x0, 0x10(%r14)
je 0x3b9b
movq %r14, %rdi
callq 0x383d
movq %rax, %r15
movq %r14, %rdi
callq 0x383d
movq %rax, %r12
movq (%r13), %rdi
movq %r15, %rsi
callq 0x4d26
testq %rax, %rax
je 0x3b5d
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4428
jmp 0x3b5d
leaq 0x8d36(%rip), %r15      # 0xc8d8
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3bd5
callq 0x383d
testq %rax, %rax
je 0x3bd0
movq %rax, %r14
movq 0x8(%rax), %rsi
movq %rax, %rdi
callq 0x6c26
movq %r14, %rdi
callq 0x5726
movq (%r15), %rdi
jmp 0x3baa
movw $0x1, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/ipc.c
// Function: ipc_command_match
void ipc_command_match(vector_t *input, unsigned short *screen_update) {
    suppress_unused(screen_update);

    if (input->size < 3) return;

    char *subject = vector_iterator(input);

    if (!strcmp(subject, "monitor"))
        ipc_sub_command_match_monitor(input);
    else
        ipc_sub_command_match_window(input);
}

// Assembly:
pushq %rbx
cmpl $0x3, 0xc(%rdi)
jae 0x3d57
popq %rbx
retq
movq %rdi, %rbx
callq 0x383d
leaq 0x445f(%rip), %rsi      # 0x81c5
movq %rax, %rdi
callq 0x3370
movq %rbx, %rdi
testl %eax, %eax
je 0x3d7b
popq %rbx
jmp 0x45c4
popq %rbx
jmp 0x44ed
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/ipc.c
// Function: ipc_command_workspace
void ipc_command_workspace(vector_t *input, unsigned short *screen_update) {
    monitor_t *monitor = monitor_with_cursor_residence();

    unsigned int workspace = string_to_integer(vector_iterator(input));
    if (workspace) {
        show_workspace_on_monitor(monitor, workspace);
    }

    *screen_update = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x65f0
movq %rax, %r14
movq %r15, %rdi
callq 0x383d
movq %rax, %rdi
callq 0x46ec
testl %eax, %eax
je 0x42fb
movq %r14, %rdi
movl %eax, %esi
callq 0x6da4
movw $0x1, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/ipc.c
// Function: ipc_command_focus
void ipc_command_focus(vector_t *input, unsigned short *screen_update) {
    suppress_unused(input);

    unsigned short passed = 0;

    monitor_t *monitor = monitor_with_cursor_residence();

    window_t *window;
    while ((window = vector_iterator(windows))) {
        if (window->workspace != monitor->workspace)
            continue;

        if (window->id == focused_window) {
            if (passed)
                return; // only one window

            if (!windows->remaining)
                reset_vector_iterator(windows);

            passed = 1;
            continue;
        }

        if (passed) {
            reset_vector_iterator(windows);
            /* Focus on this window */
            xcb_window_t previous_window = focused_window;
            focused_window = window->id;

            xcb_ungrab_button(xcb_connection,
                XCB_BUTTON_INDEX_ANY, window->id, XCB_MOD_MASK_ANY);
            raise_window(window->parent);
            decorate(window);
            focus_window(window->id);

            if (previous_window != XCB_WINDOW_NONE) {
                window = get_window_by_id(previous_window);
                xcb_grab_button(xcb_connection, 0, previous_window,
                    XCB_EVENT_MASK_BUTTON_PRESS,
                    XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC,
                    XCB_NONE, XCB_NONE,
                    XCB_BUTTON_INDEX_ANY ^ \
                        XCB_BUTTON_INDEX_4 ^ XCB_BUTTON_INDEX_5,
                    XCB_MOD_MASK_ANY);
                decorate(window);
            }

            *screen_update = 1;
            return;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x20(%rsp)
movb $0x1, %bpl
callq 0x65f0
movq %rax, %r14
leaq 0x85ad(%rip), %r13      # 0xc8d8
leaq 0x85ae(%rip), %r12      # 0xc8e0
movq (%r13), %rdi
callq 0x383d
testq %rax, %rax
je 0x4419
movq %rax, %r15
movl 0x24(%rax), %eax
cmpl 0x20(%r14), %eax
jne 0x4332
movl (%r15), %eax
cmpl (%r12), %eax
setne %bl
je 0x4366
testb $0x1, %bpl
movl %ebx, %ebp
jne 0x4332
jmp 0x4385
testb $0x1, %bpl
je 0x4419
movq (%r13), %rdi
cmpl $0x0, 0x10(%rdi)
movl %ebx, %ebp
jne 0x4332
callq 0x3871
movl %ebx, %ebp
jmp 0x4332
movq (%r13), %rdi
callq 0x3871
movl (%r12), %ebp
movl (%r15), %edx
movl %edx, (%r12)
leaq 0x8548(%rip), %r12      # 0xc8e8
movq (%r12), %rdi
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0x34f0
movl 0x4(%r15), %edi
callq 0x7348
movq %r15, %rdi
callq 0x5726
movl (%r15), %edi
callq 0x72b8
testl %ebp, %ebp
je 0x440f
movl %ebp, %edi
callq 0x6916
movq %rax, %r14
movq (%r12), %rdi
movl $0x8000, 0x18(%rsp)     # imm = 0x8000
andl $0x0, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r8
xorl %esi, %esi
movl %ebp, %edx
movl %r8d, %r9d
callq 0x3360
movq %r14, %rdi
callq 0x5726
movq 0x20(%rsp), %rax
movw $0x1, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/ipc.c
// Function: ipc_helper_typecast_and_assign
void ipc_helper_typecast_and_assign(kv_value_t *kv_value, char *variable,
    char *input) {

    // Assign all color values

    if (!strcmp(variable, "border.color.focused") ||
        !strcmp(variable, "border.color.unfocused") ||
        !strcmp(variable, "border.color.background")) {
        kv_value->color = string_to_color(input);
        return;
    }

    // Assign all boolean values

    if (!strcmp(variable, "border.colors.flipped")) {
        kv_value->boolean = string_to_boolean(input);
        return;
    }

    // Assign all string values

    if (!strcmp(variable, "geometry") ||
        !strcmp(variable, "monitor")) {
        kv_value->string = (char*)calloc(1, sizeof(char));
        strcpy(kv_value->string, input);
        return;
    }

    // If all else fails, it's an integer

    kv_value->number = string_to_integer(input);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x3c1e(%rip), %rsi      # 0x805b
movq %r15, %rdi
callq 0x3370
testl %eax, %eax
je 0x44b2
leaq 0x3c20(%rip), %rsi      # 0x8070
movq %r15, %rdi
callq 0x3370
testl %eax, %eax
je 0x44b2
leaq 0x3c24(%rip), %rsi      # 0x8087
movq %r15, %rdi
callq 0x3370
testl %eax, %eax
je 0x44b2
leaq 0x3c29(%rip), %rsi      # 0x809f
movq %r15, %rdi
callq 0x3370
testl %eax, %eax
je 0x44e0
leaq 0x4570(%rip), %rsi      # 0x89f9
movq %r15, %rdi
callq 0x3370
testl %eax, %eax
je 0x44c2
leaq 0x3d29(%rip), %rsi      # 0x81c5
movq %r15, %rdi
callq 0x3370
testl %eax, %eax
je 0x44c2
movq %r14, %rdi
callq 0x46ec
jmp 0x44ba
movq %r14, %rdi
callq 0x46f1
movl %eax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
pushq $0x1
popq %rdi
movq %rdi, %rsi
callq 0x3340
movq %rax, (%rbx)
movq %rax, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x30e0
movq %r14, %rdi
callq 0x46b8
movw %ax, (%rbx)
jmp 0x44bc
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/ipc.c
// Function: ipc_sub_command_match_monitor
void ipc_sub_command_match_monitor(vector_t *input) {
    char *monitor_name = vector_iterator(input);
    monitor_t *monitor = monitor_from_name(monitor_name);

    if (!monitor)
        return;

    if (!monitor->configuration)
        monitor->configuration = construct_vector();

    char *configurables[7] = {
        "grid.rows,"
        "grid.columns",
        "grid.margins",
        "grid.margin.top",
        "grid.margin.bottom",
        "grid.margin.left",
        "grid.margin.right"
    };
    unsigned int index = 0;
    kv_pair_t *setting;

    char *variable;
    char *value_string;

    while (input->remaining) {
        variable = vector_iterator(input);
        value_string = vector_iterator(input);

        log_debug("%s = %s", variable, value_string);

        for (index = 0; index < 7;) {
            if (!strcmp(configurables[index++], variable)) {
                setting = create_or_get_kv_pair(monitor->configuration,
                    variable);
                setting->value->number = string_to_integer(value_string);
                break;
            }
        }
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x383d
movq %rax, %rdi
callq 0x65af
testq %rax, %rax
je 0x45b5
movq %rax, %r14
cmpq $0x0, 0x18(%rax)
jne 0x4524
callq 0x3808
movq %rax, 0x18(%r14)
leaq 0x7815(%rip), %r13      # 0xbd40
cmpl $0x0, 0x10(%rbx)
je 0x45b5
movq %rbx, %rdi
callq 0x383d
movq %rax, %r15
movq %rbx, %rdi
callq 0x383d
movq %rax, %r12
movq %rax, (%rsp)
pushq $0x3
popq %rdi
leaq 0x3b9d(%rip), %rsi      # 0x80f6
leaq 0x3c4f(%rip), %rdx      # 0x81af
movl $0x1ec, %ecx            # imm = 0x1EC
leaq 0x3c61(%rip), %r8       # 0x81cd
movq %r15, %r9
xorl %eax, %eax
callq 0x50dd
xorl %ebp, %ebp
cmpq $0x38, %rbp
je 0x452b
movq (%rbp,%r13), %rdi
movq %r15, %rsi
callq 0x3370
addq $0x8, %rbp
testl %eax, %eax
jne 0x4578
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x4c6d
movq %rax, %r15
movq %r12, %rdi
callq 0x46ec
movq 0x8(%r15), %rcx
movl %eax, (%rcx)
jmp 0x452b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/comfies[P]custard/src/ipc/ipc.c
// Function: ipc_sub_command_match_window
void ipc_sub_command_match_window(vector_t *input) {
    /*
     * Usage:
     *  custard - match window.name [expression] ([configurable] [value])...
     * custard - match window.class [expression] ([configurable] [value])...
     */

    input->remaining++;
    char *subject = vector_iterator(input);
    char *expression = vector_iterator(input);

    window_attribute_t attribute;

    if (!strcmp(subject, "window.name"))
        attribute = name;
    else if (!strcmp(subject, "window.class"))
        attribute = class;
    else return;

    rule_t *rule = create_or_get_rule(attribute, expression);
    if (!rule->rules)
        rule->rules = construct_vector();

    char *configurables[10] = {
        "borders",
        "border.size.outer",
        "border.size.inner",
        "border.color.focused",
        "border.color.unfocused",
        "border.color.background",
        "border.colors.flipped",
        "geometry",
        "monitor",
        "workspace"
    };
    unsigned int index = 0;
    kv_pair_t *setting;

    char *variable;
    char *value_string;

    while (input->remaining > 0) {
        variable = vector_iterator(input);
        value_string = vector_iterator(input);

        for (index = 0; index < 10;) {
            if (!strcmp(configurables[index++], variable)) {
                setting = create_or_get_kv_pair(rule->rules, variable);
                ipc_helper_typecast_and_assign(setting->value,
                    variable, value_string);
                break;
            }
        }
    }

    add_rule(rule);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl 0x10(%rdi)
callq 0x383d
movq %rax, %r15
movq %rbx, %rdi
callq 0x383d
movq %rax, %r14
leaq 0x3be6(%rip), %rsi      # 0x81d5
movq %r15, %rdi
callq 0x3370
testl %eax, %eax
je 0x461d
leaq 0x3bdf(%rip), %rsi      # 0x81e1
movq %r15, %rdi
callq 0x3370
testl %eax, %eax
je 0x4621
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
jmp 0x4624
pushq $0x1
popq %rdi
movq %r14, %rsi
callq 0x6688
movq %rax, %r14
cmpq $0x0, 0x10(%rax)
jne 0x463f
callq 0x3808
movq %rax, 0x10(%r14)
leaq 0x3bd6(%rip), %r13      # 0x821c
cmpl $0x0, 0x10(%rbx)
je 0x469f
movq %rbx, %rdi
callq 0x383d
movq %rax, %r15
movq %rbx, %rdi
callq 0x383d
movq %rax, %r12
xorl %ebp, %ebp
cmpq $0x28, %rbp
je 0x4646
movslq (%rbp,%r13), %rdi
addq %r13, %rdi
movq %r15, %rsi
callq 0x3370
addq $0x4, %rbp
testl %eax, %eax
jne 0x4664
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x4c6d
movq 0x8(%rax), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4428
jmp 0x4646
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6718
nopl (%rax)