// File: /workspace/github_c_makefile_star2_O1/rchiossi[P]dexterity/lib/dex_parser.c
// Function: dx_parse
Dex* dx_parse(ByteStream* bs) {
  Dex* dx;
  unsigned int i,j;

  if (bs == NULL) return NULL;

  dx = (Dex*) malloc_s(sizeof(Dex));

  dx->header = dx_header(bs,bs->offset);
  dx->map_list = dx_maplist(bs,dx->header->map_off);

  //header data
  DX_ALLOC_LIST(DexStringIdItem*,dx->string_ids,dx->header->string_ids_size);
  DX_ALLOC_LIST(DexTypeIdItem*,dx->type_ids,dx->header->type_ids_size);
  DX_ALLOC_LIST(DexProtoIdItem*,dx->proto_ids,dx->header->proto_ids_size);
  DX_ALLOC_LIST(DexFieldIdItem*,dx->field_ids,dx->header->field_ids_size);
  DX_ALLOC_LIST(DexMethodIdItem*,dx->method_ids,dx->header->method_ids_size);
  DX_ALLOC_LIST(DexClassDefItem*,dx->class_defs,dx->header->class_defs_size);

  dx->meta.string_ids_alloc = dx->header->string_ids_size;
  dx->meta.type_ids_alloc = dx->header->type_ids_size;
  dx->meta.proto_ids_alloc = dx->header->proto_ids_size;
  dx->meta.field_ids_alloc = dx->header->field_ids_size;
  dx->meta.method_ids_alloc = dx->header->method_ids_size;
  dx->meta.class_defs_alloc = dx->header->class_defs_size;
    
  bsseek(bs,dx->header->string_ids_off);
  for (i=0; i<dx->header->string_ids_size; i++)
    dx->string_ids[i] = dx_stringid(bs,bs->offset);

  bsseek(bs,dx->header->type_ids_off);
  for (i=0; i<dx->header->type_ids_size; i++)
    dx->type_ids[i] = dx_typeid(bs,bs->offset);

  bsseek(bs,dx->header->proto_ids_off);
  for (i=0; i<dx->header->proto_ids_size; i++)
    dx->proto_ids[i] = dx_protoid(bs,bs->offset);

  bsseek(bs,dx->header->field_ids_off);
  for (i=0; i<dx->header->field_ids_size; i++)
    dx->field_ids[i] = dx_fieldid(bs,bs->offset);

  bsseek(bs,dx->header->method_ids_off);
  for (i=0; i<dx->header->method_ids_size; i++)
    dx->method_ids[i] = dx_methodid(bs,bs->offset);

  bsseek(bs,dx->header->class_defs_off);
  for (i=0; i<dx->header->class_defs_size; i++)
    dx->class_defs[i] = dx_classdef(bs,bs->offset);

  //Data from string id
  dx->meta.string_data_list_size = dx->header->string_ids_size;
  dx->meta.string_data_list_alloc = dx->header->string_ids_size;

  DX_ALLOC_LIST(DexStringDataItem*,dx->string_data_list,dx->header->string_ids_size);

  for (i=0; i<dx->meta.string_data_list_size; i++)
    dx->string_data_list[i] = dx_stringdata(bs,dx->string_ids[i]->string_data_off);
  
  //Data from proto id
  dx->meta.type_lists_size = 0;
  dx->meta.type_lists_alloc = dx->header->proto_ids_size;

  DX_ALLOC_LIST(DexTypeList*,dx->type_lists,dx->meta.type_lists_alloc);

  DX_READ_TABLE(DexTypeList*,
		dx_typelist,
		dx->header->proto_ids_size,
		dx->proto_ids[i]->parameters_off,
		dx->type_lists,
		dx->meta.type_lists_size,
		dx->meta.type_lists_alloc);

  //Data from class def
  DX_READ_TABLE(DexTypeList*,
		dx_typelist,
		dx->header->class_defs_size,
		dx->class_defs[i]->interfaces_off,
		dx->type_lists,
		dx->meta.type_lists_size,
		dx->meta.type_lists_alloc);

  dx->meta.an_directories_size = 0;
  dx->meta.an_directories_alloc = dx->header->class_defs_size;

  DX_ALLOC_LIST(DexAnnotationDirectoryItem*,
		dx->an_directories,dx->meta.an_directories_alloc);

  DX_READ_TABLE(DexAnnotationDirectoryItem*,
		dx_annotationdirectoryitem,
		dx->header->class_defs_size,
		dx->class_defs[i]->annotations_off,
		dx->an_directories,
		dx->meta.an_directories_size,
		dx->meta.an_directories_alloc);

  dx->meta.class_data_size = 0;
  dx->meta.class_data_alloc = dx->header->class_defs_size;

  DX_ALLOC_LIST(DexClassDataItem*,
		dx->class_data,dx->meta.class_data_alloc);

  DX_READ_TABLE(DexClassDataItem*,
		dx_classdata,
		dx->header->class_defs_size,
		dx->class_defs[i]->class_data_off,
		dx->class_data,
		dx->meta.class_data_size,
		dx->meta.class_data_alloc);

  dx->meta.encoded_arrays_size = 0;
  dx->meta.encoded_arrays_alloc = dx->header->class_defs_size;

  DX_ALLOC_LIST(DexEncodedArray*,
		dx->encoded_arrays,dx->meta.encoded_arrays_alloc);

  DX_READ_TABLE(DexEncodedArray*,
		dx_encodedarray,
		dx->header->class_defs_size,
		dx->class_defs[i]->static_values_off,
		dx->encoded_arrays,
		dx->meta.encoded_arrays_size,
		dx->meta.encoded_arrays_alloc);

  //Data from class data
  dx->meta.code_list_size = 0;
  dx->meta.code_list_alloc = dx->meta.class_data_size;

  DX_ALLOC_LIST(DexCodeItem*,
		dx->code_list,dx->meta.code_list_alloc);

  for (j=0; j< dx->meta.class_data_size; j++) {
    if (dx->class_data[j]->meta.corrupted) continue;

    DX_READ_TABLE(DexCodeItem*,
		  dx_codeitem,
		  ul128toui(dx->class_data[j]->direct_methods_size),
		  ul128toui(dx->class_data[j]->direct_methods[i]->code_off),
		  dx->code_list,
		  dx->meta.code_list_size,
		  dx->meta.code_list_alloc);   

    DX_READ_TABLE(DexCodeItem*,
		  dx_codeitem,
		  ul128toui(dx->class_data[j]->virtual_methods_size),
		  ul128toui(dx->class_data[j]->virtual_methods[i]->code_off),
		  dx->code_list,
		  dx->meta.code_list_size,
		  dx->meta.code_list_alloc);   
  }

  //data from code item
  dx->meta.debug_info_list_size = 0;
  dx->meta.debug_info_list_alloc = dx->meta.code_list_size;

  DX_ALLOC_LIST(DexDebugInfo*,
		dx->debug_info_list,dx->meta.debug_info_list_alloc);

  DX_READ_TABLE(DexDebugInfo*,
		dx_debuginfo,
		dx->meta.code_list_size,
		dx->code_list[i]->debug_info_off,
		dx->debug_info_list,
		dx->meta.debug_info_list_size,
		dx->meta.debug_info_list_alloc);
 
  //data from annotations directory
  dx->meta.an_set_size = 0;
  dx->meta.an_set_alloc = dx->meta.an_directories_size;

  DX_ALLOC_LIST(DexAnnotationSetItem*,
		dx->an_set,dx->meta.an_set_alloc);

  DX_READ_TABLE(DexAnnotationSetItem*,
		dx_annotationsetitem,
		dx->meta.an_directories_size,
		dx->an_directories[i]->class_annotations_off,
		dx->an_set,
		dx->meta.an_set_size,
		dx->meta.an_set_alloc);

  dx->meta.an_set_ref_lists_size = 0;
  dx->meta.an_set_ref_lists_alloc = dx->meta.an_directories_size;

  DX_ALLOC_LIST(DexAnnotationSetRefList*,
		dx->an_set_ref_lists,dx->meta.an_set_ref_lists_alloc);

  for (j=0; j<dx->meta.an_directories_size; j++) {
    if (dx->an_directories[j]->meta.corrupted) continue;

    DX_READ_TABLE(DexAnnotationSetItem*,
		  dx_annotationsetitem,
		  dx->an_directories[j]->fields_size,
		  dx->an_directories[j]->field_annotations[i]->annotations_off,
		  dx->an_set,
		  dx->meta.an_set_size,
		  dx->meta.an_set_alloc);

    DX_READ_TABLE(DexAnnotationSetItem*,
		  dx_annotationsetitem,
		  dx->an_directories[j]->annotated_methods_size,
		  dx->an_directories[j]->method_annotations[i]->annotations_off,
		  dx->an_set,
		  dx->meta.an_set_size,
		  dx->meta.an_set_alloc);

    DX_READ_TABLE(DexAnnotationSetRefList*,
		  dx_annotationsetreflist,
		  dx->an_directories[j]->annotated_parameters_size,
		  dx->an_directories[j]->parameter_annotations[i]->annotations_off,
		  dx->an_set_ref_lists,
		  dx->meta.an_set_ref_lists_size,
		  dx->meta.an_set_ref_lists_alloc);
  }

  //data from annotation set ref lists
  for (j=0; j<dx->meta.an_set_ref_lists_size; j++) {
    if (dx->an_set_ref_lists[j]->meta.corrupted) continue;
    
    DX_READ_TABLE(DexAnnotationSetItem*,
		  dx_annotationsetitem,
		  dx->an_set_ref_lists[j]->size,
		  dx->an_set_ref_lists[j]->list[i]->annotations_off,
		  dx->an_set,
		  dx->meta.an_set_size,
		  dx->meta.an_set_alloc);
  }

  //data from annotation set items
  dx->meta.annotations_size = 0;
  dx->meta.annotations_alloc = dx->meta.an_set_size;

  DX_ALLOC_LIST(DexAnnotationItem*,
		dx->annotations,dx->meta.annotations_alloc);


  for (j=0; j<dx->meta.an_set_size; j++) {
    if (dx->an_set[j]->meta.corrupted) continue;
    
    DX_READ_TABLE(DexAnnotationItem*,
		  dx_annotationitem,
		  dx->an_set[j]->size,
		  dx->an_set[j]->entries[i]->annotation_off,
		  dx->annotations,
		  dx->meta.annotations_size,
		  dx->meta.annotations_alloc);
  }

  return dx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x7610
movq %rdi, %r14
movl $0x168, %edi            # imm = 0x168
callq 0x4600
movq %rax, %rbx
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x43f0
movq %rax, (%rbx)
movl 0x3c(%rax), %esi
movq %r14, %rdi
callq 0x43d0
movq %rax, 0x8(%rbx)
movq (%rbx), %rax
movl 0x40(%rax), %edi
testq %rdi, %rdi
je 0x7617
shlq $0x3, %rdi
callq 0x4600
jmp 0x7619
xorl %ebx, %ebx
jmp 0x8307
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movl 0x48(%rax), %edi
testq %rdi, %rdi
je 0x7633
shlq $0x3, %rdi
callq 0x4600
jmp 0x7635
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movq (%rbx), %rax
movl 0x50(%rax), %edi
testq %rdi, %rdi
je 0x764f
shlq $0x3, %rdi
callq 0x4600
jmp 0x7651
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movq (%rbx), %rax
movl 0x58(%rax), %edi
testq %rdi, %rdi
je 0x766b
shlq $0x3, %rdi
callq 0x4600
jmp 0x766d
xorl %eax, %eax
movq %rax, 0x28(%rbx)
movq (%rbx), %rax
movl 0x60(%rax), %edi
testq %rdi, %rdi
je 0x7687
shlq $0x3, %rdi
callq 0x4600
jmp 0x7689
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq (%rbx), %rax
movl 0x68(%rax), %edi
testq %rdi, %rdi
je 0x76a3
shlq $0x3, %rdi
callq 0x4600
jmp 0x76a5
xorl %eax, %eax
movq %rax, 0x38(%rbx)
movq (%rbx), %rax
movl 0x40(%rax), %ecx
movq %rcx, 0x98(%rbx)
movl 0x48(%rax), %ecx
movq %rcx, 0xa0(%rbx)
movl 0x50(%rax), %ecx
movq %rcx, 0xa8(%rbx)
movl 0x58(%rax), %ecx
movq %rcx, 0xb0(%rbx)
movl 0x60(%rax), %ecx
movq %rcx, 0xb8(%rbx)
movl 0x68(%rax), %ecx
movq %rcx, 0xc0(%rbx)
movl 0x44(%rax), %esi
movq %r14, %rdi
callq 0x4410
movq (%rbx), %rax
cmpl $0x0, 0x40(%rax)
je 0x7721
xorl %r15d, %r15d
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4240
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
movq (%rbx), %rax
movl 0x40(%rax), %ecx
cmpq %rcx, %r15
jb 0x76ff
movl 0x4c(%rax), %esi
movq %r14, %rdi
callq 0x4410
movq (%rbx), %rax
cmpl $0x0, 0x48(%rax)
je 0x775a
xorl %r15d, %r15d
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x43c0
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
movq (%rbx), %rax
movl 0x48(%rax), %ecx
cmpq %rcx, %r15
jb 0x7738
movl 0x54(%rax), %esi
movq %r14, %rdi
callq 0x4410
movq (%rbx), %rax
cmpl $0x0, 0x50(%rax)
je 0x7793
xorl %r15d, %r15d
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4620
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
movq (%rbx), %rax
movl 0x50(%rax), %ecx
cmpq %rcx, %r15
jb 0x7771
movl 0x5c(%rax), %esi
movq %r14, %rdi
callq 0x4410
movq (%rbx), %rax
cmpl $0x0, 0x58(%rax)
je 0x77cc
xorl %r15d, %r15d
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4610
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
movq (%rbx), %rax
movl 0x58(%rax), %ecx
cmpq %rcx, %r15
jb 0x77aa
movl 0x64(%rax), %esi
movq %r14, %rdi
callq 0x4410
movq (%rbx), %rax
cmpl $0x0, 0x60(%rax)
je 0x7805
xorl %r15d, %r15d
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4090
movq 0x30(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
movq (%rbx), %rax
movl 0x60(%rax), %ecx
cmpq %rcx, %r15
jb 0x77e3
movl 0x6c(%rax), %esi
movq %r14, %rdi
callq 0x4410
movq (%rbx), %rax
cmpl $0x0, 0x68(%rax)
je 0x783e
xorl %r15d, %r15d
movl 0x18(%r14), %esi
movq %r14, %rdi
callq 0x4800
movq 0x38(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
movq (%rbx), %rax
movl 0x68(%rax), %ecx
cmpq %rcx, %r15
jb 0x781c
movl 0x40(%rax), %edi
movq %rdi, 0xc8(%rbx)
movq %rdi, 0xd0(%rbx)
testq %rdi, %rdi
je 0x785f
shlq $0x3, %rdi
callq 0x4600
jmp 0x7861
xorl %eax, %eax
movq %rax, 0x40(%rbx)
cmpq $0x0, 0xc8(%rbx)
je 0x78a0
movl $0x1, %ebp
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x41b0
movq 0x40(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movl %ebp, %r15d
incl %ebp
cmpq %r15, 0xc8(%rbx)
ja 0x7877
movq $0x0, 0xd8(%rbx)
movq (%rbx), %rax
movl 0x50(%rax), %edi
movq %rdi, 0xe0(%rbx)
testq %rdi, %rdi
je 0x78c8
shlq $0x3, %rdi
callq 0x4600
jmp 0x78ca
xorl %eax, %eax
movq %rax, 0x48(%rbx)
movq (%rbx), %rax
cmpl $0x0, 0x50(%rax)
je 0x794a
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x10(%rax)
je 0x793c
movq 0xe0(%rbx), %rsi
cmpq %rsi, 0xd8(%rbx)
jb 0x7910
movq 0x48(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x48(%rbx)
shlq 0xe0(%rbx)
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x43e0
movq 0x48(%rbx), %rcx
movq 0xd8(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0xd8(%rbx)
incq %r15
movq (%rbx), %rax
movl 0x50(%rax), %eax
cmpq %rax, %r15
jb 0x78da
movq (%rbx), %rax
movl 0x68(%rax), %eax
testl %eax, %eax
je 0x79c7
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x14(%rax)
je 0x79b9
movq 0xe0(%rbx), %rsi
cmpq %rsi, 0xd8(%rbx)
jb 0x798d
movq 0x48(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x48(%rbx)
shlq 0xe0(%rbx)
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x14(%rax), %esi
movq %r14, %rdi
callq 0x43e0
movq 0x48(%rbx), %rcx
movq 0xd8(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0xd8(%rbx)
incq %r15
movq (%rbx), %rax
movl 0x68(%rax), %eax
cmpq %rax, %r15
jb 0x7957
movq $0x0, 0xe8(%rbx)
movl %eax, %edi
movq %rdi, 0xf0(%rbx)
testl %eax, %eax
je 0x79ea
shlq $0x3, %rdi
callq 0x4600
jmp 0x79ec
xorl %eax, %eax
movq %rax, 0x50(%rbx)
movq (%rbx), %rax
movl 0x68(%rax), %eax
testl %eax, %eax
je 0x7a6d
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x1c(%rax)
je 0x7a5f
movq 0xf0(%rbx), %rsi
cmpq %rsi, 0xe8(%rbx)
jb 0x7a33
movq 0x50(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x50(%rbx)
shlq 0xf0(%rbx)
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x1c(%rax), %esi
movq %r14, %rdi
callq 0x46a0
movq 0x50(%rbx), %rcx
movq 0xe8(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0xe8(%rbx)
incq %r15
movq (%rbx), %rax
movl 0x68(%rax), %eax
cmpq %rax, %r15
jb 0x79fd
movq $0x0, 0xf8(%rbx)
movl %eax, %edi
movq %rdi, 0x100(%rbx)
testl %eax, %eax
je 0x7a90
shlq $0x3, %rdi
callq 0x4600
jmp 0x7a92
xorl %eax, %eax
movq %rax, 0x58(%rbx)
movq (%rbx), %rax
movl 0x68(%rax), %eax
testl %eax, %eax
je 0x7b13
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x20(%rax)
je 0x7b05
movq 0x100(%rbx), %rsi
cmpq %rsi, 0xf8(%rbx)
jb 0x7ad9
movq 0x58(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x58(%rbx)
shlq 0x100(%rbx)
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x20(%rax), %esi
movq %r14, %rdi
callq 0x4510
movq 0x58(%rbx), %rcx
movq 0xf8(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0xf8(%rbx)
incq %r15
movq (%rbx), %rax
movl 0x68(%rax), %eax
cmpq %rax, %r15
jb 0x7aa3
movq $0x0, 0x108(%rbx)
movl %eax, %edi
movq %rdi, 0x110(%rbx)
testl %eax, %eax
je 0x7b36
shlq $0x3, %rdi
callq 0x4600
jmp 0x7b38
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq (%rbx), %rax
cmpl $0x0, 0x68(%rax)
je 0x7bb8
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x24(%rax)
je 0x7baa
movq 0x110(%rbx), %rsi
cmpq %rsi, 0x108(%rbx)
jb 0x7b7e
movq 0x60(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x60(%rbx)
shlq 0x110(%rbx)
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x24(%rax), %esi
movq %r14, %rdi
callq 0x4730
movq 0x60(%rbx), %rcx
movq 0x108(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x108(%rbx)
incq %r15
movq (%rbx), %rax
movl 0x68(%rax), %eax
cmpq %rax, %r15
jb 0x7b48
movq $0x0, 0x118(%rbx)
movq 0xf8(%rbx), %rdi
movq %rdi, 0x120(%rbx)
testq %rdi, %rdi
je 0x7be1
shlq $0x3, %rdi
callq 0x4600
jmp 0x7be3
xorl %eax, %eax
movq %rax, 0x68(%rbx)
cmpq $0x0, 0xf8(%rbx)
je 0x7da9
xorl %r15d, %r15d
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpb $0x0, (%rax)
jne 0x7d99
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x20(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x4170
testl %eax, %eax
je 0x7cd1
xorl %r12d, %r12d
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x48(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x4170
testl %eax, %eax
je 0x7caf
movq 0x120(%rbx), %rsi
cmpq %rsi, 0x118(%rbx)
jb 0x7c70
movq 0x68(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x68(%rbx)
shlq 0x120(%rbx)
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x48(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x4170
movq %r14, %rdi
movl %eax, %esi
callq 0x4720
movq 0x68(%rbx), %rcx
movq 0x118(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x118(%rbx)
incq %r12
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x20(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x4170
movl %eax, %eax
cmpq %rax, %r12
jb 0x7c28
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x2c(%rax), %rdi
movl 0x34(%rax), %esi
callq 0x4170
testl %eax, %eax
je 0x7d99
xorl %r12d, %r12d
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x50(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x4170
testl %eax, %eax
je 0x7d77
movq 0x120(%rbx), %rsi
cmpq %rsi, 0x118(%rbx)
jb 0x7d38
movq 0x68(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x68(%rbx)
shlq 0x120(%rbx)
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x50(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rdi
movl 0x28(%rax), %esi
callq 0x4170
movq %r14, %rdi
movl %eax, %esi
callq 0x4720
movq 0x68(%rbx), %rcx
movq 0x118(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x118(%rbx)
incq %r12
movq 0x58(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x2c(%rax), %rdi
movl 0x34(%rax), %esi
callq 0x4170
movl %eax, %eax
cmpq %rax, %r12
jb 0x7cf0
incl %r15d
cmpq %r15, 0xf8(%rbx)
ja 0x7bf8
movq $0x0, 0x128(%rbx)
movq 0x118(%rbx), %rdi
movq %rdi, 0x130(%rbx)
testq %rdi, %rdi
je 0x7dd2
shlq $0x3, %rdi
callq 0x4600
jmp 0x7dd4
xorl %eax, %eax
movq %rax, 0x70(%rbx)
cmpq $0x0, 0x118(%rbx)
je 0x7e5a
movl $0x1, %ebp
xorl %r15d, %r15d
movq 0x68(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x10(%rax)
je 0x7e4c
movq 0x130(%rbx), %rsi
cmpq %rsi, 0x128(%rbx)
jb 0x7e20
movq 0x70(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x70(%rbx)
shlq 0x130(%rbx)
movq 0x68(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x45e0
movq 0x70(%rbx), %rcx
movq 0x128(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x128(%rbx)
movl %ebp, %r15d
incl %ebp
cmpq %r15, 0x118(%rbx)
ja 0x7dea
movq $0x0, 0x138(%rbx)
movq 0xe8(%rbx), %rdi
movq %rdi, 0x140(%rbx)
testq %rdi, %rdi
je 0x7e83
shlq $0x3, %rdi
callq 0x4600
jmp 0x7e85
xorl %eax, %eax
movq %rax, 0x78(%rbx)
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x7f10
movl $0x1, %ebp
xorl %r15d, %r15d
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x8(%rax)
je 0x7eff
movq 0x140(%rbx), %rsi
cmpq %rsi, 0x138(%rbx)
jb 0x7ed3
movq 0x78(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x78(%rbx)
shlq 0x140(%rbx)
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x40b0
movq 0x78(%rbx), %rcx
movq 0x138(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x138(%rbx)
movl %ebp, %r15d
movq 0xe8(%rbx), %rdi
incl %ebp
cmpq %r15, %rdi
ja 0x7e9d
movq $0x0, 0x148(%rbx)
movq %rdi, 0x150(%rbx)
testq %rdi, %rdi
je 0x7f32
shlq $0x3, %rdi
callq 0x4600
jmp 0x7f34
xorl %eax, %eax
movq %rax, 0x80(%rbx)
cmpq $0x0, 0xe8(%rbx)
je 0x8130
xorl %r15d, %r15d
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpb $0x0, (%rax)
jne 0x8120
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0xc(%rax)
je 0x7fef
xorl %r12d, %r12d
movq 0x18(%rax), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, 0xc(%rax)
je 0x7fdc
movq 0x140(%rbx), %rsi
cmpq %rsi, 0x138(%rbx)
jb 0x7fa8
movq 0x78(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x78(%rbx)
shlq 0x140(%rbx)
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x18(%rax), %rax
movq (%rax,%r12,8), %rax
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x40b0
movq 0x78(%rbx), %rcx
movq 0x138(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x138(%rbx)
incq %r12
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0xc(%rax), %ecx
cmpq %rcx, %r12
jb 0x7f72
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x10(%rax)
je 0x8081
xorl %r12d, %r12d
movq 0x20(%rax), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, 0xc(%rax)
je 0x806e
movq 0x140(%rbx), %rsi
cmpq %rsi, 0x138(%rbx)
jb 0x803a
movq 0x78(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x78(%rbx)
shlq 0x140(%rbx)
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x20(%rax), %rax
movq (%rax,%r12,8), %rax
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x40b0
movq 0x78(%rbx), %rcx
movq 0x138(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x138(%rbx)
incq %r12
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x10(%rax), %ecx
cmpq %rcx, %r12
jb 0x8004
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x14(%rax)
je 0x8120
xorl %r12d, %r12d
movq 0x28(%rax), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, 0xc(%rax)
je 0x8109
movq 0x150(%rbx), %rsi
cmpq %rsi, 0x148(%rbx)
jb 0x80d2
movq 0x80(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x80(%rbx)
shlq 0x150(%rbx)
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x28(%rax), %rax
movq (%rax,%r12,8), %rax
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x41a0
movq 0x80(%rbx), %rcx
movq 0x148(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x148(%rbx)
incq %r12
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x14(%rax), %ecx
cmpq %rcx, %r12
jb 0x8096
incl %r15d
cmpq %r15, 0xe8(%rbx)
ja 0x7f4c
cmpq $0x0, 0x148(%rbx)
je 0x8204
xorl %r15d, %r15d
movq 0x80(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpb $0x0, (%rax)
jne 0x81f4
movq 0x80(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x8(%rax)
je 0x81f4
xorl %r12d, %r12d
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, 0x8(%rax)
je 0x81da
movq 0x140(%rbx), %rsi
cmpq %rsi, 0x138(%rbx)
jb 0x81a3
movq 0x78(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x78(%rbx)
shlq 0x140(%rbx)
movq 0x80(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x40b0
movq 0x78(%rbx), %rcx
movq 0x138(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x138(%rbx)
incq %r12
movq 0x80(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x8(%rax), %ecx
cmpq %rcx, %r12
jb 0x816d
incl %r15d
cmpq %r15, 0x148(%rbx)
ja 0x8141
movq $0x0, 0x158(%rbx)
movq 0x138(%rbx), %rdi
movq %rdi, 0x160(%rbx)
testq %rdi, %rdi
je 0x822d
shlq $0x3, %rdi
callq 0x4600
jmp 0x822f
xorl %eax, %eax
movq %rax, 0x88(%rbx)
cmpq $0x0, 0x138(%rbx)
je 0x8307
xorl %r15d, %r15d
movq 0x78(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpb $0x0, (%rax)
jne 0x82f7
movq 0x78(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x0, 0x8(%rax)
je 0x82f7
xorl %r12d, %r12d
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, 0x8(%rax)
je 0x82e0
movq 0x160(%rbx), %rsi
cmpq %rsi, 0x158(%rbx)
jb 0x82a9
movq 0x88(%rbx), %rdi
shlq $0x4, %rsi
callq 0x45b0
movq %rax, 0x88(%rbx)
shlq 0x160(%rbx)
movq 0x78(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x4500
movq 0x88(%rbx), %rcx
movq 0x158(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
incq %rdx
movq %rdx, 0x158(%rbx)
incq %r12
movq 0x78(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x8(%rax), %ecx
cmpq %rcx, %r12
jb 0x826d
incl %r15d
cmpq %r15, 0x138(%rbx)
ja 0x8247
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop