LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_classdata
void dxb_classdata(ByteStream* bs, DexClassDataItem* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->static_fields_size));
  l128write(bs,&(obj->instance_fields_size));
  l128write(bs,&(obj->direct_methods_size));
  l128write(bs,&(obj->virtual_methods_size));

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

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

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

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x51bc
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
leaq 0x14(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
leaq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
leaq 0x2c(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x5136
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x4030
incq %r15
jmp 0x510e
xorl %r15d, %r15d
movq 0x14(%rbx), %rdi
movl 0x1c(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x5161
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x4030
incq %r15
jmp 0x5139
xorl %r15d, %r15d
movq 0x20(%rbx), %rdi
movl 0x28(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x518c
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x46d0
incq %r15
jmp 0x5164
xorl %r15d, %r15d
movq 0x2c(%rbx), %rdi
movl 0x34(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x51b7
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x46d0
incq %r15
jmp 0x518f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_typelist
void dxb_typelist(ByteStream* bs, DexTypeList* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*) &(obj->size),sizeof(uint32_t));

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x525c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %r15
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4600
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x5251
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x45c0
incq %r12
jmp 0x5234
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedtypeaddrpair
void dxb_encodedtypeaddrpair(ByteStream* bs, DexEncodedTypeAddrPair* obj) {
  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->type_idx));
  l128write(bs,&(obj->addr));
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x52aa
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
addq $0x14, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x44f0
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedcatchhandler
void dxb_encodedcatchhandler(ByteStream* bs, DexEncodedCatchHandler* obj) {
  int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->size));

  for (i=0; i<abs(sl128toi(obj->size)); i++)
    dxb_encodedtypeaddrpair(bs,obj->handlers[i]);

  if (sl128toi(obj->size) <= 0) 
    l128write(bs,&(obj->catch_all_addr));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x534d
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4560
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpq %rcx, %r15
jae 0x533d
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x43a0
incq %r15
jmp 0x5310
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4560
testl %eax, %eax
jle 0x5353
popq %rbx
popq %r14
popq %r15
retq
addq $0x20, %rbx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x44f0
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedcatchhandlerlist
void dxb_encodedcatchhandlerlist(ByteStream* bs, DexEncodedCatchHandlerList* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->size));

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x53c6
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x53c1
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x4470
incq %r15
jmp 0x5399
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_codeitem
void dxb_codeitem(ByteStream* bs, DexCodeItem* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*) &(obj->registers_size),sizeof(uint16_t));
  bswrite(bs,(uint8_t*) &(obj->ins_size),sizeof(uint16_t));
  bswrite(bs,(uint8_t*) &(obj->outs_size),sizeof(uint16_t));
  bswrite(bs,(uint8_t*) &(obj->tries_size),sizeof(uint16_t));
  bswrite(bs,(uint8_t*) &(obj->debug_info_off),sizeof(uint32_t));
  bswrite(bs,(uint8_t*) &(obj->insns_size),sizeof(uint32_t));

  for (i=0; i<obj->insns_size; i++)
    bswrite(bs,(uint8_t*) &(obj->insns[i]),sizeof(uint16_t));

  if (obj->tries_size > 0) {
    if (obj->insns_size % 2 != 0)
      bswrite(bs,(uint8_t*) &(obj->padding),sizeof(uint16_t));

    for (i=0; i<obj->tries_size; i++)
     dxb_tryitem(bs,obj->tries[i]);

    dxb_encodedcatchhandlerlist(bs,obj->handlers);    
  }
}

// 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
jne 0x54c3
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%r14), %rsi
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %edx
callq 0x4600
leaq 0xa(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x4600
leaq 0xc(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x4600
leaq 0xe(%r14), %rsi
movq %rbx, %rdi
movq %rsi, (%rsp)
movl %ebp, %r15d
movl %ebp, %edx
callq 0x4600
leaq 0x10(%r14), %rsi
pushq $0x4
popq %r13
movq %rbx, %rdi
movl %r13d, %edx
callq 0x4600
leaq 0x14(%r14), %r12
movq %rbx, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x4600
xorl %r13d, %r13d
xorl %ebp, %ebp
movl (%r12), %eax
cmpq %rax, %rbp
jae 0x5484
movq 0x18(%r14), %rsi
addq %r13, %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x4600
incq %rbp
addq $0x2, %r13
jmp 0x5460
movq (%rsp), %r15
cmpw $0x0, (%r15)
je 0x54c3
testb $0x1, %al
je 0x54a2
leaq 0x20(%r14), %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x4600
xorl %r12d, %r12d
movzwl (%r15), %eax
cmpq %rax, %r12
jae 0x54d2
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x4840
incq %r12
jmp 0x54a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x48f0
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_debuginfo
void dxb_debuginfo(ByteStream* bs, DexDebugInfo* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->line_start));
  l128write(bs,&(obj->parameters_size));

  for (i=0; i<ul128toui(obj->parameters_size); i++)
    l128write(bs,&(obj->parameter_names[i]));

  dxb_debug_state_machine(bs,obj->state_machine);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x54fd
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x44f0
leaq 0x14(%r14), %rsi
movq %rbx, %rdi
callq 0x44f0
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x14(%r14), %rdi
movl 0x1c(%r14), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r12
jae 0x555d
movq 0x20(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x44f0
incq %r12
addq $0xc, %r15
jmp 0x5531
movq 0x28(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4340
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_maplist
void dxb_maplist(ByteStream* bs, DexMapList* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*)&(obj->size),sizeof(uint32_t));

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x562f
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %r15
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4600
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x5624
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x46f0
incq %r12
jmp 0x5607
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedvalue
void dxb_encodedvalue(ByteStream* bs, DexEncodedValue* obj) {
  int i;

  uint8_t value_type;
  uint8_t value_arg;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*)&(obj->argtype),sizeof(uint8_t));

  value_type = (obj->argtype & 0x1f);
  value_arg  = ((obj->argtype >> 5) & 0x7);
	       
  switch (value_type) {
  case 0x00:
    bswrite(bs,(uint8_t*) obj->value,sizeof(uint8_t));
    break;
  case 0x02:
  case 0x03:
  case 0x04:
  case 0x06:
  case 0x10:
  case 0x11:
  case 0x17:
  case 0x18:
  case 0x19:
  case 0x1a:
  case 0x1b:
    for (i=0; i<value_arg+1; i++)
      bswrite(bs,(uint8_t*) &(obj->value[i]),sizeof(uint8_t));   

    break;
  case 0x1c:
    dxb_encodedarray(bs,(DexEncodedArray*) obj->value);
    break;
  case 0x1d:
    dxb_encodedannotation(bs,(DexEncodedAnnotation*)obj->value);
    break;
  case 0x1e:
  case 0x1f:
    break;
  default:
    break;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x5651
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%r14), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x4600
movzbl 0x8(%r14), %r15d
movl %r15d, %eax
andl $0x1f, %eax
cmpl $0x1d, %eax
ja 0x5648
leaq 0x4a3f(%rip), %rcx      # 0xa0c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x5, %r15d
incq %r15
xorl %r12d, %r12d
pushq $0x1
popq %rbp
cmpq %r12, %r15
je 0x5648
movq 0x10(%r14), %rsi
addq %r12, %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x4600
incq %r12
jmp 0x569b
movq 0x10(%r14), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4600
movq 0x10(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x48e0
movq 0x10(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4850
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedarray
void dxb_encodedarray(ByteStream* bs, DexEncodedArray* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->size));

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x5754
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x574f
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x4900
incq %r15
jmp 0x5727
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedannotation
void dxb_encodedannotation(ByteStream* bs, DexEncodedAnnotation* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->type_idx));
  l128write(bs,&(obj->size));

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x57c0
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
leaq 0x14(%rbx), %rsi
movq %r14, %rdi
callq 0x44f0
xorl %r15d, %r15d
movq 0x14(%rbx), %rdi
movl 0x1c(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x57bb
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x4420
incq %r15
jmp 0x5793
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_annotationelement
void dxb_annotationelement(ByteStream* bs, DexAnnotationElement* obj) {
  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->name_idx));

  dxb_encodedvalue(bs,obj->value);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x57d2
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x44f0
movq 0x18(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4900
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_annotationdirectoryitem
void dxb_annotationdirectoryitem(ByteStream* bs, DexAnnotationDirectoryItem* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*) &(obj->class_annotations_off),sizeof(uint32_t));
  bswrite(bs,(uint8_t*) &(obj->fields_size),sizeof(uint32_t));
  bswrite(bs,(uint8_t*) &(obj->annotated_methods_size),sizeof(uint32_t));
  bswrite(bs,(uint8_t*) &(obj->annotated_parameters_size),sizeof(uint32_t));

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

  for (i=0; i<obj->annotated_methods_size; i++)
    dxb_methodannotation(bs,obj->method_annotations[i]);
  
  for (i=0; i<obj->annotated_parameters_size; i++)
    dxb_parameterannotation(bs,obj->parameter_annotations[i]);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x5997
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %rsi
pushq $0x4
popq %rbp
movq %r14, %rdi
movl %ebp, %edx
callq 0x4600
leaq 0xc(%rbx), %r13
movq %r14, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x4600
leaq 0x10(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x4600
leaq 0x14(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x4600
xorl %ebp, %ebp
movl (%r13), %eax
cmpq %rax, %rbp
jae 0x5948
movq 0x18(%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq %r14, %rdi
callq 0x4860
incq %rbp
jmp 0x592a
xorl %r13d, %r13d
movl (%r12), %eax
cmpq %rax, %r13
jae 0x5969
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
callq 0x4400
incq %r13
jmp 0x594b
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x5989
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x45f0
incq %r12
jmp 0x596c
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_builder.c
// Function: dxb_annotationsetreflist
void dxb_annotationsetreflist(ByteStream* bs, DexAnnotationSetRefList* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*) &(obj->size),sizeof(uint32_t));

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x5a37
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %r15
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4600
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x5a2c
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x4700
incq %r12
jmp 0x5a0f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_annotationsetitem
void dxb_annotationsetitem(ByteStream* bs, DexAnnotationSetItem* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*) &(obj->size),sizeof(uint32_t));

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x5ad7
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%rbx), %r15
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4600
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x5acc
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x41b0
incq %r12
jmp 0x5aaf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_annotationitem
void dxb_annotationitem(ByteStream* bs, DexAnnotationItem* obj) {
  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*) &(obj->visibility),sizeof(uint8_t));

  dxb_encodedannotation(bs,obj->annotation);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x5ae9
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %esi
callq 0x4480
leaq 0x8(%r14), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x4600
movq 0x10(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x48e0
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_stringdata
DexStringDataItem* dx_stringdata(ByteStream* bs, uint32_t offset) {
  DexStringDataItem* res;
  int check;
  uint8_t* tape;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexStringDataItem,res);

  bsseek(bs,offset);

  check = l128read(bs,&(res->size));

  if (check || bs->exhausted) {
    res->meta.corrupted = true;
    return res;
  }

  DX_ALLOC_LIST(uint8_t,res->data,ul128toui(res->size)*3+1);

  tape = (uint8_t*) res->data;

  bsread(bs,tape,sizeof(uint8_t));
  
  while(*tape) {
    if ((*tape & 0xe0) == 0xc0 ) {
      tape++;
      bsread(bs,tape,sizeof(uint8_t));
    }

    else if ((*tape & 0xf0) == 0xe0) {
      tape++;
      bsread(bs,tape,sizeof(uint8_t)*2);      
      tape++;
    }
        
    tape++;
    bsread(bs,tape,sizeof(uint8_t));
  }
  
  res->meta.corrupted |= bs->exhausted;

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x60d2
movl %esi, %ebp
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x46a0
movq %rax, %rbx
movl %ebp, 0x4(%rax)
movb $0x0, (%rax)
movq %r14, %rdi
movl %ebp, %esi
callq 0x4480
movq %rbx, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x4820
movb $0x1, %cl
testl %eax, %eax
jne 0x616e
cmpl $0x0, 0x1c(%r14)
jne 0x616e
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
cmpl $0x55555555, %eax       # imm = 0x55555555
jne 0x60d9
xorl %r15d, %r15d
jmp 0x60f2
xorl %ebx, %ebx
jmp 0x6170
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
leal (%rax,%rax,2), %edi
incl %edi
callq 0x46a0
movq %rax, %r15
movq %r15, 0x18(%rbx)
pushq $0x1
popq %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4490
pushq $0x2
popq %r13
movzbl (%r15), %eax
testl %eax, %eax
je 0x6164
movl %eax, %ecx
andl $-0x20, %ecx
cmpl $0xc0, %ecx
jne 0x6134
incq %r15
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4490
jmp 0x6151
andl $-0x10, %eax
cmpl $0xe0, %eax
jne 0x6151
leaq 0x1(%r15), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x4490
addq $0x2, %r15
incq %r15
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4490
jmp 0x610c
movzbl (%rbx), %eax
orl 0x1c(%r14), %eax
setne %cl
movb %cl, (%rbx)
movq %rbx, %rax
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_parser.c
// Function: dx_encodedfield
DexEncodedFieldItem* dx_encodedfield(ByteStream* bs, uint32_t offset) {
  DexEncodedFieldItem* res;
  int check;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexEncodedFieldItem,res);

  bsseek(bs,offset);

  check  = l128read(bs,&(res->field_idx_diff));
  check |= l128read(bs,&(res->access_flags));

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x61da
movl %esi, %ebp
movq %rdi, %r14
pushq $0x20
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
movq %r14, %rdi
callq 0x4820
movl %eax, %ebp
movq %rbx, %rsi
addq $0x14, %rsi
movq %r14, %rdi
callq 0x4820
movb $0x1, %cl
orl %ebp, %eax
jne 0x61d6
cmpl $0x0, 0x1c(%r14)
setne %cl
movb %cl, (%rbx)
jmp 0x61dc
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_encodedmethod
DexEncodedMethodItem* dx_encodedmethod(ByteStream* bs, uint32_t offset) {
  DexEncodedMethodItem* res;
  int check;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexEncodedMethodItem,res);

  bsseek(bs,offset);

  check  = l128read(bs,&(res->method_idx_diff));
  check |= l128read(bs,&(res->access_flags));
  check |= l128read(bs,&(res->code_off));

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6252
movl %esi, %ebp
movq %rdi, %r14
pushq $0x2c
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
movq %r14, %rdi
callq 0x4820
movl %eax, %ebp
leaq 0x14(%rbx), %rsi
movq %r14, %rdi
callq 0x4820
movl %eax, %r15d
orl %ebp, %r15d
movq %rbx, %rsi
addq $0x20, %rsi
movq %r14, %rdi
callq 0x4820
movb $0x1, %cl
orl %r15d, %eax
jne 0x624e
cmpl $0x0, 0x1c(%r14)
setne %cl
movb %cl, (%rbx)
jmp 0x6254
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_typelist
DexTypeList* dx_typelist(ByteStream* bs, uint32_t offset) {
  DexTypeList* res;
  int check;
  unsigned int i;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexTypeList,res);

  bsseek(bs,offset);

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

  res->meta.corrupted = (check != sizeof(uint32_t));
  if (res->meta.corrupted) return res;

  DX_ALLOC_LIST(DexTypeItem*,res->list,res->size);

  for (i=0; i<res->size; i++)
    res->list[i] = dx_typeitem(bs,bs->offset);

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x6519
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), %r15
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4490
cmpl $0x4, %eax
setne (%rbx)
jne 0x651b
movl (%r15), %edi
testq %rdi, %rdi
je 0x6527
shlq $0x3, %rdi
callq 0x46a0
jmp 0x6529
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x651b
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4220
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x6530
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_encodedtypeaddrpair
DexEncodedTypeAddrPair* dx_encodedtypeaddrpair(ByteStream* bs, uint32_t offset) {
  DexEncodedTypeAddrPair* res;
  int check;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexEncodedTypeAddrPair,res);

  bsseek(bs,offset);

  check  = l128read(bs,&(res->type_idx));
  check |= l128read(bs,&(res->addr));

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x65f9
movl %esi, %ebp
movq %rdi, %r14
pushq $0x20
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
movq %r14, %rdi
callq 0x4820
movl %eax, %ebp
movq %rbx, %rsi
addq $0x14, %rsi
movq %r14, %rdi
callq 0x4820
movb $0x1, %cl
orl %ebp, %eax
jne 0x65f5
cmpl $0x0, 0x1c(%r14)
setne %cl
movb %cl, (%rbx)
jmp 0x65fb
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_encodedcatchhandler
DexEncodedCatchHandler* dx_encodedcatchhandler(ByteStream* bs, uint32_t offset) {
  DexEncodedCatchHandler* res;
  int check;
  int i;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexEncodedCatchHandler,res);

  bsseek(bs,offset);

  check  = l128read(bs,&(res->size));

  res->meta.corrupted = check;
  if (res->meta.corrupted) return res;

  DX_ALLOC_LIST(DexEncodedTypeAddrPair*,res->handlers,ul128toui(res->size));

  for (i=0; i<abs(sl128toi(res->size)); i++)
    res->handlers[i] = dx_encodedtypeaddrpair(bs,bs->offset);

  if (sl128toi(res->size) <= 0) 
    check |= l128read(bs,&(res->catch_all_addr));

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x666f
movl %esi, %ebp
movq %rdi, %r14
pushq $0x30
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
movq %r14, %rdi
callq 0x4820
testl %eax, %eax
setne (%rbx)
jne 0x66de
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
testl %eax, %eax
je 0x6673
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
movl %eax, %edi
shlq $0x3, %rdi
callq 0x46a0
jmp 0x6675
xorl %ebx, %ebx
jmp 0x66de
xorl %eax, %eax
movq %rax, 0x18(%rbx)
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4560
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpq %rcx, %r15
jae 0x66ad
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4500
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x667c
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4560
testl %eax, %eax
jle 0x66c7
cmpl $0x0, 0x1c(%r14)
setne %cl
jmp 0x66dc
movq %rbx, %rsi
addq $0x20, %rsi
movq %r14, %rdi
callq 0x4820
movb $0x1, %cl
testl %eax, %eax
je 0x66bd
movb %cl, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_encodedcatchhandlerlist
DexEncodedCatchHandlerList* dx_encodedcatchhandlerlist(ByteStream* bs, uint32_t offset) {
  DexEncodedCatchHandlerList* res;
  int check;
  unsigned int i;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexEncodedCatchHandlerList,res);

  bsseek(bs,offset);

  check  = l128read(bs,&(res->size));

  res->meta.corrupted = check;
  if (res->meta.corrupted) return res;

  DX_ALLOC_LIST(DexEncodedCatchHandler*,res->list,ul128toui(res->size));

  for (i=0; i<ul128toui(res->size); i++)
    res->list[i] = dx_encodedcatchhandler(bs,bs->offset);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6754
movl %esi, %ebp
movq %rdi, %r14
pushq $0x20
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
movq %r14, %rdi
callq 0x4820
testl %eax, %eax
setne (%rbx)
jne 0x6795
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
testl %eax, %eax
je 0x6758
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
movl %eax, %edi
shlq $0x3, %rdi
callq 0x46a0
jmp 0x675a
xorl %ebx, %ebx
jmp 0x6795
xorl %eax, %eax
movq %rax, 0x18(%rbx)
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x678d
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4550
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x6761
cmpl $0x0, 0x1c(%r14)
setne (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_codeitem
DexCodeItem* dx_codeitem(ByteStream* bs, uint32_t offset) {
  DexCodeItem* res;
  unsigned int i;

  DX_ALLOC(DexCodeItem,res);

  bsseek(bs,offset);

  bsread(bs,(uint8_t*) &(res->registers_size),sizeof(uint16_t));
  bsread(bs,(uint8_t*) &(res->ins_size),sizeof(uint16_t));
  bsread(bs,(uint8_t*) &(res->outs_size),sizeof(uint16_t));
  bsread(bs,(uint8_t*) &(res->tries_size),sizeof(uint16_t));
  bsread(bs,(uint8_t*) &(res->debug_info_off),sizeof(uint32_t));
  bsread(bs,(uint8_t*) &(res->insns_size),sizeof(uint32_t));

  res->meta.corrupted = bs->exhausted;
  if (res->meta.corrupted) return res;

  DX_ALLOC_LIST(uint16_t,res->insns,res->insns_size);

  for (i=0; i<res->insns_size; i++)
    bsread(bs,(uint8_t*) &(res->insns[i]),sizeof(uint16_t));

  if (res->tries_size > 0) {
    if (res->insns_size % 2 != 0)
      bsread(bs,(uint8_t*) &(res->padding),sizeof(uint16_t));

    DX_ALLOC_LIST(DexTryItem*,res->tries,res->tries_size); 
   
    for (i=0; i<res->tries_size; i++)
      res->tries[i] = dx_tryitem(bs,bs->offset);

    res->handlers = dx_encodedcatchhandlerlist(bs,bs->offset);    
  }

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
pushq $0x38
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 $0x2
popq %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x4490
leaq 0xa(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x4490
leaq 0xc(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x4490
leaq 0xe(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4490
leaq 0x10(%rbx), %rsi
pushq $0x4
popq %r13
movq %r14, %rdi
movq %r13, %rdx
callq 0x4490
leaq 0x14(%rbx), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4490
cmpl $0x0, 0x1c(%r14)
setne (%rbx)
jne 0x68fd
movl (%r12), %edi
testq %rdi, %rdi
movq %r15, (%rsp)
je 0x685b
addq %rdi, %rdi
callq 0x46a0
jmp 0x685d
xorl %eax, %eax
movq %rax, 0x18(%rbx)
xorl %ebp, %ebp
pushq $0x2
popq %r13
xorl %r15d, %r15d
movl (%r12), %ecx
cmpq %rcx, %r15
jae 0x688e
movq 0x18(%rbx), %rsi
addq %rbp, %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x4490
incq %r15
addq $0x2, %rbp
jmp 0x686a
movq (%rsp), %r12
movzwl (%r12), %eax
testw %ax, %ax
je 0x68fd
testb $0x1, %cl
je 0x68bc
movq %rbx, %rsi
addq $0x20, %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x4490
movzwl 0xe(%rbx), %eax
testw %ax, %ax
je 0x690f
movzwl %ax, %edi
shll $0x3, %edi
callq 0x46a0
movq %rax, 0x28(%rbx)
xorl %r15d, %r15d
movzwl (%r12), %eax
movl 0x18(%r14), %esi
cmpq %rax, %r15
jae 0x68f1
movq %r14, %rdi
callq 0x4830
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x68ce
movq %r14, %rdi
callq 0x4230
movq %rax, 0x30(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x68c7
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_debuginfo
DexDebugInfo* dx_debuginfo(ByteStream* bs, uint32_t offset) {
  DexDebugInfo* res;
  int check;
  unsigned int i;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexDebugInfo,res);

  bsseek(bs,offset);

  check  = l128read(bs,&(res->line_start));
  check |= l128read(bs,&(res->parameters_size));

  res->meta.corrupted = check || bs->exhausted;
  if (res->meta.corrupted) return res;

  DX_ALLOC_LIST(leb128_t,res->parameter_names,ul128toui(res->parameters_size));

  for (i=0; i<ul128toui(res->parameters_size); i++)
    l128read(bs,&(res->parameter_names[i]));

  res->state_machine = dx_debug_state_machine(bs,bs->offset);

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x6966
movl %esi, %ebp
movq %rdi, %r14
pushq $0x30
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
movq %r14, %rdi
callq 0x4820
movl %eax, %ebp
movq %rbx, %rsi
addq $0x14, %rsi
movq %r14, %rdi
callq 0x4820
orl %ebp, %eax
je 0x696a
movb $0x1, (%rbx)
jmp 0x69e4
xorl %ebx, %ebx
jmp 0x69e4
cmpl $0x0, 0x1c(%r14)
setne (%rbx)
jne 0x69e4
movq 0x14(%rbx), %rdi
movl 0x1c(%rbx), %esi
callq 0x4180
testl %eax, %eax
je 0x699d
movq 0x14(%rbx), %rdi
movl 0x1c(%rbx), %esi
callq 0x4180
movl %eax, %eax
imulq $0xc, %rax, %rdi
callq 0x46a0
jmp 0x699f
xorl %eax, %eax
movq %rax, 0x20(%rbx)
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x14(%rbx), %rdi
movl 0x1c(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r12
jae 0x69d4
movq 0x20(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x4820
incq %r12
addq $0xc, %r15
jmp 0x69a9
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4150
movq %rax, 0x28(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_debug_state_machine
uint8_t* dx_debug_state_machine(ByteStream* bs, uint32_t offset) {
  uint32_t size = 1;
  uint8_t opcode;
  leb128_t leb;
  uint8_t* res;

  bsseek(bs,offset);
  bsread(bs,&opcode,1);

  while (opcode != 0x0) {
    switch (opcode) {
    case 0x1:
    case 0x2:
    case 0x5:
    case 0x6:
    case 0x9:
      l128read(bs,&leb);
      break;
    case 0x3:
      l128read(bs,&leb);
      l128read(bs,&leb);
      l128read(bs,&leb);
      break;
    case 0x4:
      l128read(bs,&leb);
      l128read(bs,&leb);
      l128read(bs,&leb);
      l128read(bs,&leb);
    default:
      break;
    }

    bsread(bs,&opcode,1);
  }

  size = bs->offset - offset;

  DX_ALLOC_LIST(uint8_t,res,size + sizeof(uint32_t));  

  bsseek(bs,offset);
  bsread(bs,(res+sizeof(uint32_t)),size);

  ((uint32_t*) res)[0] = size;

  return res;    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4480
leaq 0xb(%rsp), %r14
pushq $0x1
popq %r15
leaq 0x3724(%rip), %r13      # 0xa13c
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4490
movzbl 0xb(%rsp), %eax
cmpq $0x9, %rax
ja 0x6a1d
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4820
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4820
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4820
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4820
jmp 0x6a1d
movl 0x18(%rbx), %r14d
subl %ebp, %r14d
leaq 0x4(%r14), %rdi
callq 0x46a0
movq %rax, %r15
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4480
leaq 0x4(%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4490
movl %r14d, (%r15)
movq %r15, %rax
addq $0x18, %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_parser.c
// Function: dx_maplist
DexMapList* dx_maplist(ByteStream* bs, uint32_t offset) {
  DexMapList* res;
  int check;
  unsigned int i;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexMapList,res);

  bsseek(bs,offset);

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

  res->meta.corrupted = (check != sizeof(uint32_t));
  if (res->meta.corrupted) return res;

  DX_ALLOC_LIST(DexMapItem*,res->list,res->size);  

  for (i=0; i<res->size; i++)
    res->list[i] = dx_mapitem(bs,bs->offset);

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x6b59
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), %r15
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4490
cmpl $0x4, %eax
setne (%rbx)
jne 0x6b5b
movl (%r15), %edi
testq %rdi, %rdi
je 0x6b67
shlq $0x3, %rdi
callq 0x46a0
jmp 0x6b69
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x6b5b
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4110
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x6b70
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_encodedvalue
DexEncodedValue* dx_encodedvalue(ByteStream* bs, uint32_t offset) {
  DexEncodedValue* res;
  int check;
  int i;

  uint8_t value_type;
  uint8_t value_arg;

  if (bs == NULL) return NULL;

  bsseek(bs,offset);

  DX_ALLOC(DexEncodedValue,res);

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

  res->meta.corrupted = (check != sizeof(uint8_t));
  if (res->meta.corrupted) return res;

  value_type = (res->argtype & 0x1f);
  value_arg  = ((res->argtype >> 5) & 0x7);
	       
  switch (value_type) {
  case 0x00:
    DX_ALLOC_LIST(uint8_t,res->value,1);
    bsread(bs,(uint8_t*) res->value,sizeof(uint8_t));
    break;
  case 0x02:
  case 0x03:
  case 0x04:
  case 0x06:
  case 0x10:
  case 0x11:
  case 0x17:
  case 0x18:
  case 0x19:
  case 0x1a:
  case 0x1b:
    DX_ALLOC_LIST(uint8_t,res->value,value_arg+1);

    for (i=0; i<value_arg+1; i++)
      bsread(bs,(uint8_t*) &(res->value[i]),sizeof(uint8_t));   

    break;
  case 0x1c:
    res->value = (uint8_t*) dx_encodedarray(bs,bs->offset);
    break;
  case 0x1d:
    res->value = (uint8_t*) dx_encodedannotation(bs,bs->offset);
    break;
  case 0x1e:
  case 0x1f:
    res->value = NULL;
  default:
    res->meta.corrupted = true;
    res->value = (uint8_t*) -1;
  }

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6c33
movl %esi, %ebp
movq %rdi, %r14
callq 0x4480
pushq $0x18
popq %rdi
callq 0x46a0
movq %rax, %rbx
movl %ebp, 0x4(%rax)
movb $0x0, (%rax)
leaq 0x8(%rax), %r15
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4490
cmpl $0x1, %eax
setne (%rbx)
jne 0x6c35
movzbl (%r15), %r15d
movl %r15d, %eax
andl $0x1f, %eax
cmpl $0x1d, %eax
ja 0x6c87
leaq 0x3570(%rip), %rcx      # 0xa164
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x5, %r15d
incq %r15
movq %r15, %rdi
callq 0x46a0
movq %rax, 0x10(%rbx)
xorl %r13d, %r13d
pushq $0x1
popq %r12
cmpq %r13, %r15
je 0x6c35
movq 0x10(%rbx), %rsi
addq %r13, %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x4490
incq %r13
jmp 0x6c17
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %r15
movq %r15, %rdi
callq 0x46a0
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4490
jmp 0x6c35
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4160
jmp 0x6c81
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x47f0
movq %rax, 0x10(%rbx)
jmp 0x6c35
movb $0x1, (%rbx)
orq $-0x1, 0x10(%rbx)
jmp 0x6c35
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_encodedarray
DexEncodedArray* dx_encodedarray(ByteStream* bs, uint32_t offset) {
  DexEncodedArray* res;
  int check;
  unsigned int i;

  if (bs == NULL) return NULL;

  bsseek(bs,offset);

  DX_ALLOC(DexEncodedArray,res);

  check = l128read(bs,&(res->size));

  res->meta.corrupted = (check || bs->exhausted);
  if (res->meta.corrupted) return res;

  DX_ALLOC_LIST(DexEncodedValue*,res->values,ul128toui(res->size));

  for (i=0; i<ul128toui(res->size); i++)
    res->values[i] = dx_encodedvalue(bs,bs->offset);

  return res;  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6ccd
movl %esi, %ebp
movq %rdi, %r14
callq 0x4480
pushq $0x20
popq %rdi
callq 0x46a0
movq %rax, %rbx
movl %ebp, 0x4(%rax)
movb $0x0, (%rax)
leaq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x4820
testl %eax, %eax
je 0x6cd1
movb $0x1, (%rbx)
jmp 0x6cdb
xorl %ebx, %ebx
jmp 0x6cdb
cmpl $0x0, 0x1c(%r14)
setne (%rbx)
je 0x6ce9
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
testl %eax, %eax
je 0x6d12
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
movl %eax, %edi
shlq $0x3, %rdi
callq 0x46a0
jmp 0x6d14
xorl %eax, %eax
movq %rax, 0x18(%rbx)
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x6cdb
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4890
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x6d1b
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_encodedannotation
DexEncodedAnnotation* dx_encodedannotation(ByteStream* bs, uint32_t offset) {
  DexEncodedAnnotation* res;
  int check;
  unsigned int i;

  if (bs == NULL) return NULL;

  bsseek(bs,offset);

  DX_ALLOC(DexEncodedAnnotation,res);

  check  = l128read(bs,&(res->type_idx));
  check |= l128read(bs,&(res->size));

  res->meta.corrupted = (check || bs->exhausted);
  if (res->meta.corrupted) return res;

  DX_ALLOC_LIST(DexAnnotationElement*,res->elements,ul128toui(res->size));

  for (i=0; i<ul128toui(res->size); i++)
    res->elements[i] = dx_annotationelement(bs,bs->offset);

  return res;  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6d94
movl %esi, %ebp
movq %rdi, %r14
callq 0x4480
pushq $0x28
popq %rdi
callq 0x46a0
movq %rax, %rbx
movl %ebp, 0x4(%rax)
movb $0x0, (%rax)
leaq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x4820
movl %eax, %ebp
movq %rbx, %rsi
addq $0x14, %rsi
movq %r14, %rdi
callq 0x4820
orl %ebp, %eax
je 0x6d98
movb $0x1, (%rbx)
jmp 0x6da2
xorl %ebx, %ebx
jmp 0x6da2
cmpl $0x0, 0x1c(%r14)
setne (%rbx)
je 0x6db0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x14(%rbx), %rdi
movl 0x1c(%rbx), %esi
callq 0x4180
testl %eax, %eax
je 0x6dd9
movq 0x14(%rbx), %rdi
movl 0x1c(%rbx), %esi
callq 0x4180
movl %eax, %edi
shlq $0x3, %rdi
callq 0x46a0
jmp 0x6ddb
xorl %eax, %eax
movq %rax, 0x20(%rbx)
xorl %r15d, %r15d
movq 0x14(%rbx), %rdi
movl 0x1c(%rbx), %esi
callq 0x4180
movl %eax, %eax
cmpq %rax, %r15
jae 0x6da2
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x42c0
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x6de2
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_annotationelement
DexAnnotationElement* dx_annotationelement(ByteStream* bs, uint32_t offset) {
  DexAnnotationElement* res;
  int check;

  if (bs == NULL) return NULL;

  bsseek(bs,offset);

  DX_ALLOC(DexAnnotationElement,res);

  check = l128read(bs,&(res->name_idx));

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

  res->meta.corrupted = (check || bs->exhausted);

  return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x6e61
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4480
pushq $0x20
popq %rdi
callq 0x46a0
movq %rax, %r14
movl %ebp, 0x4(%rax)
movb $0x0, (%rax)
leaq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x4820
movl %eax, %ebp
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x4890
movq %rax, 0x18(%r14)
movb $0x1, %al
testl %ebp, %ebp
jne 0x6e5c
cmpl $0x0, 0x1c(%rbx)
setne %al
movb %al, (%r14)
jmp 0x6e64
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_parser.c
// Function: dx_annotationsetreflist
DexAnnotationSetRefList* dx_annotationsetreflist(ByteStream* bs, uint32_t offset) {
  DexAnnotationSetRefList* res;
  int check;
  unsigned int i;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexAnnotationSetRefList,res);

  bsseek(bs,offset);

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

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

  DX_ALLOC_LIST(DexAnnotationSetRefItem*,res->list,res->size);

  for (i=0; i<res->size; i++)
    res->list[i] = dx_annotationsetrefitem(bs,bs->offset);

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x718b
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
movq %rbx, %r15
addq $0x8, %r15
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4490
cmpl $0x4, %eax
jne 0x718f
cmpl $0x0, 0x1c(%r14)
setne (%rbx)
jne 0x7192
movl (%r15), %edi
testq %rdi, %rdi
je 0x719e
shlq $0x3, %rdi
callq 0x46a0
jmp 0x71a0
xorl %ebx, %ebx
jmp 0x7192
movb $0x1, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x7192
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x44a0
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x71a7
// File: /workspace/github_c_makefile_star2_O2/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_annotationsetitem
DexAnnotationSetItem* dx_annotationsetitem(ByteStream* bs, uint32_t offset) {
  DexAnnotationSetItem* res;
  int check;
  unsigned int i;

  if (bs == NULL) return NULL;

  DX_ALLOC(DexAnnotationSetItem,res);

  bsseek(bs,offset);

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

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

  DX_ALLOC_LIST(DexAnnotationOffItem*,res->entries,res->size);

  for (i=0; i<res->size; i++)
    res->entries[i] = dx_annotationoffitem(bs,bs->offset);

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x727c
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
movq %rbx, %r15
addq $0x8, %r15
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4490
cmpl $0x4, %eax
jne 0x7280
cmpl $0x0, 0x1c(%r14)
setne (%rbx)
jne 0x7283
movl (%r15), %edi
testq %rdi, %rdi
je 0x728f
shlq $0x3, %rdi
callq 0x46a0
jmp 0x7291
xorl %ebx, %ebx
jmp 0x7283
movb $0x1, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
movl (%r15), %eax
cmpq %rax, %r12
jae 0x7283
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x47b0
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x7298