// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_parse
void elf32_parse(struct GlobalVars *gv,struct LinkFile *lf,
                 struct Elf32_Ehdr *ehdr,
                 uint8_t (*reloc_elf2vlink)(uint8_t,struct RelocInsert *))
/* parses a complete ELF file and converts into vlink-internal format */
{
  static const char *fn = "elf32_parse(): ";
  bool be = (ehdr->e_ident[EI_DATA] == ELFDATA2MSB);
  struct ObjectUnit *u;
  struct Elf32_Shdr *shdr;
  uint16_t i,num_shdr,dynstr_idx,dynsym_idx;
  char *shstrtab,*dynstrtab;
  struct Elf32_Dyn *dyn;

  shstrtab = elf32_shstrtab(lf,ehdr);
  u = create_objunit(gv,lf,lf->objname);

  switch (read16(be,ehdr->e_type)) {

    case ET_REL:  /* relocatable object file */
      if (read16(be,ehdr->e_phnum) > 0)
        error(47,lf->pathname,lf->objname);  /* ignoring program hdr. tab */
      num_shdr = read16(be,ehdr->e_shnum);

      /* create vlink sections */
      for (i=1; i<num_shdr; i++) {
        shdr = elf32_shdr(lf,ehdr,i);

        switch (read32(be,shdr->sh_type)) {
          case SHT_PROGBITS:
          case SHT_NOBITS:
          case SHT_NOTE:
            /* create a new section */
            elf32_section(gv,ehdr,u,shdr,i,shstrtab);
          default:
            break;
        }
      }

      /* parse the other section headers */
      for (i=1; i<num_shdr; i++) {
        shdr = elf32_shdr(lf,ehdr,i);

        switch (read32(be,shdr->sh_type)) {
          case SHT_NULL:
          case SHT_STRTAB:
          case SHT_NOTE:
          case SHT_PROGBITS:
          case SHT_NOBITS:
            break;
          case SHT_SYMTAB:
            elf32_symbols(gv,ehdr,u,shdr);  /* symbol definitions */
            break;
          case SHT_REL:
          case SHT_RELA:
            elf32_reloc(gv,ehdr,u,shdr,shstrtab,be,reloc_elf2vlink);
            break;
          default:
            /* section header type not needed in relocatable objects */
            error(48,lf->pathname,read32(be,shdr->sh_type),lf->objname);
            break;
        }
      }

      elf32_stabs(gv,lf,ehdr,u);  /* convert .stab into internal format */
      break;


    case ET_DYN:  /* shared object file */
      dynstrtab = NULL;
      dyn = NULL;
      dynstr_idx = dynsym_idx = 0;
      num_shdr = read16(be,ehdr->e_shnum);

      /* create vlink sections */
      for (i=1; i<num_shdr; i++) {
        shdr = elf32_shdr(lf,ehdr,i);

        switch (read32(be,shdr->sh_type)) {
          case SHT_DYNAMIC:
            /* remember pointer to .dynamic section contents */
            dyn = (struct Elf32_Dyn *)((uint8_t *)ehdr
                                       + read32(be,shdr->sh_offset));
            break;
          case SHT_DYNSYM:
            dynsym_idx = i;
            break;
          case SHT_PROGBITS:
          case SHT_NOBITS:
            /* create a new section */
            elf32_section(gv,ehdr,u,shdr,i,shstrtab);
          default:
            break;
        }
      }

      /* parse the other section headers */
      for (i=1; i<num_shdr; i++) {
        shdr = elf32_shdr(lf,ehdr,i);

        switch (read32(be,shdr->sh_type)) {
          case SHT_NULL:
          case SHT_STRTAB:
          case SHT_NOTE:
          case SHT_PROGBITS:
          case SHT_NOBITS:
          case SHT_HASH:
          case SHT_DYNAMIC:
          case SHT_SYMTAB:
            break;
          case SHT_DYNSYM:
            dynstr_idx = read32(be,shdr->sh_link);
            elf32_symbols(gv,ehdr,u,shdr);  /* symbol definitions */
            break;
          case SHT_REL:
          case SHT_RELA:
            if (fff[gv->dest_format]->flags & FFF_DYN_RESOLVE_ALL) {
              /* The dynamic link editor is limited, so we even have to
                 resolve references from the shared object at link time.
                 But only those which are linked to .dynsym. */
              if (read32(be,shdr->sh_link) == dynsym_idx)
                elf32_dynrefs(gv,ehdr,u,shdr,be,reloc_elf2vlink);
            }
            break;
          default:
            /* section header type not needed in shared objects */
            error(60,lf->pathname,read32(be,shdr->sh_type),lf->objname);
            break;
        }
      }

      if (dynstr_idx!=0 && dyn!=NULL) {
        /* set ObjectUnit's objname to the SONAME of the shared object */
        uint32_t tag;

        shdr = elf32_shdr(lf,ehdr,dynstr_idx);  /* .dynstr */
        while (tag = read32(be,dyn->d_tag)) {
          if (tag == DT_SONAME) {
            u->objname = (char *)ehdr + read32(be,shdr->sh_offset)
                         + read32(be,dyn->d_val);
            break;
          }
          dyn++;
        }
      }
      break;


    case ET_EXEC: /* executable file */
      /* @@@ */
      ierror("%s%s: Executables are currently not supported",fn,lf->pathname);
      break;


    default:
      error(41,lf->pathname,lf->objname);  /* illegal fmt./file corrupted */
      break;
  }

  /* add new object unit to the appropriate list */
  add_objunit(gv,u,FALSE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, 0x78(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorl %r13d, %r13d
cmpb $0x2, 0x5(%rdx)
sete %r13b
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x12f9a
movq %rax, 0x88(%rsp)
movq 0x20(%r14), %rdx
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
movq %r14, 0x20(%rsp)
movq %r14, %rsi
callq 0xb87e
movq %rax, 0x18(%rsp)
movq %r15, 0x8(%rsp)
leaq 0x10(%r15), %rsi
movl %r13d, %edi
callq 0x663d
cmpw $0x3, %ax
movl %r13d, 0x14(%rsp)
je 0x13957
movzwl %ax, %eax
cmpl $0x2, %eax
je 0x13934
cmpl $0x1, %eax
jne 0x13db4
movq 0x8(%rsp), %rax
leaq 0x2c(%rax), %rsi
movl %r13d, %edi
callq 0x663d
testw %ax, %ax
je 0x138b8
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rdx
pushq $0x2f
popq %rdi
xorl %eax, %eax
callq 0x6c19
pushq $0x1
popq %rbx
movq 0x8(%rsp), %rax
leaq 0x30(%rax), %rsi
movl %r13d, %edi
callq 0x663d
movw %ax, 0x76(%rsp)
movzwl %ax, %ebp
movl $0x182, %r15d           # imm = 0x182
cmpl %ebp, %ebx
jae 0x13dd0
movzwl %bx, %edx
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13050
movq %rax, %r14
leaq 0x4(%rax), %rsi
movl %r13d, %edi
callq 0x664d
cmpl $0x8, %eax
ja 0x13930
btl %eax, %r15d
jae 0x13930
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rcx
movl %ebx, %r8d
movq 0x88(%rsp), %r9
callq 0x13257
incl %ebx
jmp 0x138da
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdx
leaq 0xdbc5(%rip), %rdi      # 0x21509
leaq 0xdbae(%rip), %rsi      # 0x214f9
xorl %eax, %eax
callq 0x6b2c
jmp 0x145f1
movq 0x8(%rsp), %rax
leaq 0x30(%rax), %rsi
movl %r13d, %edi
callq 0x663d
movw %ax, 0x54(%rsp)
movzwl %ax, %ebp
pushq $0x1
popq %rbx
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpl %ebp, %ebx
jae 0x139f6
movzwl %bx, %edx
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13050
movq %rax, %r14
leaq 0x4(%rax), %rsi
movl %r13d, %edi
callq 0x664d
cmpl $0x1, %eax
je 0x139cb
cmpl $0xb, %eax
je 0x139ef
cmpl $0x8, %eax
je 0x139cb
cmpl $0x6, %eax
jne 0x139f2
addq $0x10, %r14
movl %r13d, %edi
movq %r14, %rsi
callq 0x664d
movl %eax, %r12d
addq 0x8(%rsp), %r12
jmp 0x139f2
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rcx
movl %ebx, %r8d
movq 0x88(%rsp), %r9
callq 0x13257
jmp 0x139f2
movl %ebx, %r15d
incl %ebx
jmp 0x13979
movzwl %r15w, %eax
movl %eax, 0x70(%rsp)
movw $0x1, %bp
movl $0x1ef, %r14d           # imm = 0x1EF
movl $0x0, 0x90(%rsp)
movq %r12, 0x98(%rsp)
cmpw 0x54(%rsp), %bp
jae 0x13d64
movzwl %bp, %edx
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13050
movq %rax, %r12
leaq 0x4(%rax), %rbx
movl %r13d, %edi
movq %rbx, %rsi
callq 0x664d
cmpl $0xb, %eax
ja 0x13d1e
btl %eax, %r14d
jae 0x13a65
incl %ebp
movq 0x98(%rsp), %r12
jmp 0x13a1b
movl $0x210, %ecx            # imm = 0x210
btl %eax, %ecx
jae 0x13ce7
movq 0x28(%rsp), %rax
movzbl 0x50(%rax), %eax
leaq 0x1b70d(%rip), %rcx     # 0x2f190
movq (%rcx,%rax,8), %rax
testb $0x8, 0xac(%rax)
je 0x13a59
leaq 0x18(%r12), %rbx
movl %r13d, %edi
movq %rbx, %rsi
callq 0x664d
cmpl 0x70(%rsp), %eax
jne 0x13a59
movl %ebp, 0x6c(%rsp)
leaq 0x10(%r12), %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, %r15d
addq 0x8(%rsp), %r15
leaq 0x24(%r12), %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, %ebp
movl %r13d, %edi
movq %rbx, %rsi
callq 0x664d
movl %eax, 0x60(%rsp)
addq $0x14, %r12
movl %r13d, %edi
movq %r12, %rsi
callq 0x664d
xorl %edx, %edx
divl %ebp
movl %eax, %ebx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %r15, 0x30(%rsp)
cmpq 0x28(%rax), %r15
movq %rax, %r15
jb 0x13b28
movl %r13d, %edi
movq %r12, %rsi
callq 0x664d
movl %eax, %eax
addq 0x30(%rsp), %rax
movq 0x28(%r15), %rcx
addq 0x30(%r15), %rcx
cmpq %rcx, %rax
jbe 0x13b41
movq 0x10(%r15), %rsi
movq 0x20(%r15), %rcx
pushq $0x33
popq %rdi
leaq 0xe9f7(%rip), %rdx      # 0x22531
xorl %eax, %eax
callq 0x6c19
movl %ebp, %eax
movq %rax, 0x58(%rsp)
movq 0x18(%rsp), %rdi
callq 0xbbcd
movq %rax, %r13
movzwl 0x60(%rsp), %eax
movl %eax, 0x80(%rsp)
movq %r15, 0x40(%rsp)
subl $0x1, %ebx
jb 0x13d50
movl %ebx, 0x48(%rsp)
movq %r15, %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
movl 0x80(%rsp), %edx
callq 0x13050
movq %rax, 0x38(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movl 0x60(%rsp), %edx
callq 0x131aa
movq %rax, %r14
movq 0x30(%rsp), %r12
leaq 0x4(%r12), %r15
movl 0x14(%rsp), %ebp
movl %ebp, %edi
movq %r15, %rsi
callq 0x664d
movl %eax, %ebx
shrl $0x4, %ebx
andl $-0x10, %ebx
movl %ebp, %edi
movq %r12, %rsi
movq %r14, %r12
callq 0x664d
leaq (%r14,%rbx), %rsi
addq $0xe, %rsi
movl %ebp, %edi
callq 0x663d
cmpw $-0xe, %ax
je 0x13bee
movzwl %ax, %eax
testl %eax, %eax
jne 0x13ccf
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movl 0x14(%rsp), %edi
movq %r15, %rsi
callq 0x664d
movzbl %al, %edi
leaq 0xa0(%rsp), %rsi
callq *0x78(%rsp)
testb %al, %al
je 0x13ccf
movl %eax, %r15d
addq %rbx, %r12
movq 0x38(%rsp), %rsi
addq $0x18, %rsi
movl 0x14(%rsp), %ebp
movl %ebp, %edi
callq 0x664d
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %eax, %edx
callq 0x13102
movq %rax, %rbx
movl %ebp, %edi
movq %r12, %r14
movq %r12, %rsi
callq 0x664d
movl %eax, %r12d
addq %rbx, %r12
movl %ebp, %edi
movq 0x30(%rsp), %rsi
callq 0x664d
movl %eax, %r9d
movzbl %r15b, %eax
movq 0x28(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
pushq $0x0
pushq %rax
callq 0xabec
popq %rcx
popq %rdx
movq %rax, %rbx
leaq 0xa0(%rsp), %r15
testq %r15, %r15
je 0x13cc1
movzwl 0x8(%r15), %edx
movzwl 0xa(%r15), %ecx
movq 0x10(%r15), %r8
movq %r13, %rdi
movq %rbx, %rsi
callq 0xac9f
movq (%r15), %r15
jmp 0x13c9e
movb 0xc(%r14), %al
andb $-0x10, %al
cmpb $0x20, %al
jne 0x13ccf
orb $0x1, 0x39(%rbx)
movq 0x58(%rsp), %rax
addq %rax, 0x30(%rsp)
movq 0x40(%rsp), %r15
movl 0x48(%rsp), %ebx
jmp 0x13b66
cmpl $0xb, %eax
jne 0x13d1e
movq %r12, %rsi
addq $0x18, %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, 0x90(%rsp)
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r12, %rcx
callq 0x1344c
jmp 0x13a59
movq 0x20(%rsp), %r15
movq 0x10(%r15), %r14
movl %r13d, %edi
movq %rbx, %rsi
callq 0x664d
movq 0x20(%r15), %rcx
pushq $0x3c
popq %rdi
movq %r14, %rsi
movl $0x1ef, %r14d           # imm = 0x1EF
movl %eax, %edx
xorl %eax, %eax
callq 0x6c19
jmp 0x13a59
movl 0x14(%rsp), %r13d
movl 0x6c(%rsp), %ebp
movl $0x1ef, %r14d           # imm = 0x1EF
jmp 0x13a59
movl 0x90(%rsp), %eax
testw %ax, %ax
je 0x145f1
testq %r12, %r12
je 0x145f1
movzwl %ax, %edx
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13050
movq %rax, %rbx
movl %r13d, %edi
movq %r12, %rsi
callq 0x664d
testl %eax, %eax
je 0x145f1
cmpl $0xe, %eax
je 0x145bb
addq $0x8, %r12
jmp 0x13d92
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rdx
pushq $0x29
popq %rdi
xorl %eax, %eax
callq 0x6c19
jmp 0x145f1
movw $0x1, %ax
cmpw 0x76(%rsp), %ax
jae 0x14323
movl %eax, 0x6c(%rsp)
movzwl %ax, %edx
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13050
movq %rax, %rbx
leaq 0x4(%rax), %r14
movl %r13d, %edi
movq %r14, %rsi
callq 0x664d
cmpl $0x9, %eax
ja 0x142f7
movl $0x18b, %ecx            # imm = 0x18B
btl %eax, %ecx
jae 0x13e22
movl 0x6c(%rsp), %eax
incl %eax
jmp 0x13dd4
movq %rbx, %r15
movl $0x210, %ecx            # imm = 0x210
btl %eax, %ecx
jae 0x142d6
leaq 0x10(%rbx), %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, %ebp
movl %r13d, %edi
movq %r14, %rsi
callq 0x664d
movl %eax, 0x58(%rsp)
leaq 0x24(%rbx), %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, %r12d
leaq 0x18(%rbx), %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, 0x54(%rsp)
leaq 0x14(%rbx), %r14
movl %r13d, %edi
movq %r14, %rsi
callq 0x664d
xorl %edx, %edx
movl %r12d, 0x30(%rsp)
divl %r12d
movl %eax, 0x98(%rsp)
movl %r13d, %edi
movq %r15, %rsi
callq 0x664d
movq 0x18(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x38(%rsp)
movq 0x28(%rsp), %rcx
cmpb $0x0, 0x6c(%rcx)
je 0x13f26
movl %eax, %r12d
addq 0x88(%rsp), %r12
movq %r12, %rdi
leaq 0xd998(%rip), %rsi      # 0x21860
pushq $0xa
popq %rdx
callq 0x5070
testl %eax, %eax
je 0x13e1a
movq %r12, %rdi
leaq 0xd989(%rip), %rsi      # 0x2186b
pushq $0x9
popq %rdx
callq 0x5070
testl %eax, %eax
je 0x13e1a
movq %r12, %rdi
leaq 0xd979(%rip), %rsi      # 0x21875
pushq $0xb
popq %rdx
callq 0x5070
testl %eax, %eax
je 0x13e1a
movq %r12, %rdi
leaq 0xd96b(%rip), %rsi      # 0x21881
pushq $0xa
popq %rdx
callq 0x5070
testl %eax, %eax
je 0x13e1a
movl %ebp, %ebp
addq 0x8(%rsp), %rbp
movq 0x38(%rsp), %r12
cmpq 0x28(%r12), %rbp
jb 0x13f58
movl %r13d, %edi
movq %r14, %rsi
callq 0x664d
movl %eax, %eax
addq %rbp, %rax
movq 0x28(%r12), %rcx
addq 0x30(%r12), %rcx
cmpq %rcx, %rax
jbe 0x13f73
movq 0x10(%r12), %rsi
movq 0x20(%r12), %rcx
pushq $0x33
popq %rdi
leaq 0xe5c5(%rip), %rdx      # 0x22531
xorl %eax, %eax
callq 0x6c19
addq $0x1c, %rbx
movl %r13d, %edi
movq %rbx, %rsi
callq 0x664d
movq 0x18(%rsp), %rdi
movl %eax, %esi
callq 0xb783
movq %rax, %r14
testq %rax, %rax
jne 0x13fe9
movq 0x38(%rsp), %rax
movq 0x10(%rax), %r12
movl %r13d, %edi
movq %r15, %rsi
callq 0x664d
movl %eax, %r15d
addq 0x88(%rsp), %r15
movq 0x18(%rsp), %rdi
callq 0x6e1c
movq %rax, %r13
movl 0x14(%rsp), %edi
movq %rbx, %rsi
callq 0x664d
pushq $0x34
popq %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl 0x14(%rsp), %r13d
movl %eax, %r8d
xorl %eax, %eax
callq 0x6c19
movl 0x30(%rsp), %eax
movq %rax, 0x90(%rsp)
movzwl 0x54(%rsp), %eax
movl %eax, 0x70(%rsp)
subl $0x1, 0x98(%rsp)
jb 0x13e1a
movq 0x38(%rsp), %r15
movq %r15, %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
movl 0x70(%rsp), %edx
callq 0x13050
movq %rax, 0x60(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movl 0x54(%rsp), %edx
callq 0x131aa
movq %rax, %rbx
leaq 0x4(%rbp), %r15
movl %r13d, %edi
movq %r15, %rsi
callq 0x664d
movl %eax, %r12d
shrl $0x4, %r12d
andl $-0x10, %r12d
movl %r13d, %edi
movq %rbp, 0x30(%rsp)
movq %rbp, %rsi
callq 0x664d
movl %eax, %ebp
movq %rbx, 0x48(%rsp)
leaq (%rbx,%r12), %rsi
addq $0xe, %rsi
movl %r13d, %edi
callq 0x663d
movl %eax, %ebx
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movl %r13d, %edi
movq %r15, %rsi
callq 0x664d
movzbl %al, %edi
leaq 0xa0(%rsp), %rsi
callq *0x78(%rsp)
testb %al, %al
je 0x1424e
movl %ebp, %ecx
movzbl %al, %r15d
cmpl $0x4, 0x58(%rsp)
movq %rcx, 0x80(%rsp)
jne 0x140e9
movq 0x30(%rsp), %rax
leaq 0x8(%rax), %rsi
movl 0x14(%rsp), %r13d
movl %r13d, %edi
callq 0x664d
cltq
movq %rax, 0x40(%rsp)
jmp 0x14122
movq 0x40(%r14), %rdx
addq %rcx, %rdx
movzwl 0xa8(%rsp), %ecx
movzwl 0xaa(%rsp), %r8d
movq 0xb0(%rsp), %r9
movq 0x28(%rsp), %rdi
movl %r15d, %esi
callq 0xae9b
cltq
movq %rax, 0x40(%rsp)
movl 0x14(%rsp), %r13d
movq 0x48(%rsp), %rbp
addq %r12, %rbp
movzwl %bx, %esi
cmpl $0xfff2, %esi           # imm = 0xFFF2
je 0x14139
testl %esi, %esi
jne 0x14179
movq 0x60(%rsp), %rsi
addq $0x18, %rsi
movl %r13d, %edi
callq 0x664d
movq 0x38(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %eax, %edx
callq 0x13102
movq %r15, %r12
movq %rax, %r15
movl %r13d, %edi
movq %rbp, %rsi
callq 0x664d
movl %eax, %ebx
addq %r15, %rbx
movq %r12, %r15
xorl %r12d, %r12d
jmp 0x141c3
movb 0xc(%rbp), %al
andb $0xf, %al
cmpb $0x3, %al
jne 0x14191
movq 0x18(%rsp), %rdi
callq 0xb783
movq %rax, %r12
jmp 0x141c1
jae 0x14265
cmpw $-0x10, %bx
ja 0x14265
movq 0x18(%rsp), %rdi
callq 0xb783
movq %rax, %r12
leaq 0x4(%rbp), %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, %eax
addq %rax, 0x40(%rsp)
xorl %ebx, %ebx
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq 0x80(%rsp), %r13
movq %r13, %r9
pushq 0x40(%rsp)
pushq %r15
callq 0xabec
popq %rcx
popq %rdx
movq %rax, %r12
leaq 0xa0(%rsp), %r15
testq %r15, %r15
je 0x1421a
movzwl 0x8(%r15), %edx
movzwl 0xa(%r15), %ecx
movq 0x10(%r15), %r8
movq %r14, %rdi
movq %r12, %rsi
callq 0xac9f
movq (%r15), %r15
jmp 0x141f7
testq %rbx, %rbx
je 0x1422e
movb 0xc(%rbp), %al
andb $-0x10, %al
cmpb $0x20, %al
jne 0x1422e
orb $0x1, 0x39(%r12)
cmpl $0x4, 0x58(%rsp)
jne 0x1424e
addq 0x40(%r14), %r13
movq 0x28(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x40(%rsp), %rcx
callq 0xaf7b
movq 0x30(%rsp), %rbp
addq 0x90(%rsp), %rbp
movl 0x14(%rsp), %r13d
jmp 0x13ffe
movq %r15, %rbx
movq 0x38(%rsp), %r15
movq 0x10(%r15), %rax
movq %rax, 0x48(%rsp)
movq 0x20(%r15), %r12
movq 0x60(%rsp), %rsi
addq $0x18, %rsi
movl %r13d, %edi
callq 0x664d
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movl %eax, %edx
callq 0x13102
movq %rax, %r15
movl %r13d, %edi
movq %rbp, %rsi
callq 0x664d
movl %eax, %ecx
addq %r15, %rcx
movq %rbx, %r15
movzbl 0xc(%rbp), %r8d
andl $0xf, %r8d
leaq 0xd5cc(%rip), %rdi      # 0x2188c
movq 0x48(%rsp), %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x6b2c
xorl %ebx, %ebx
jmp 0x14174
cmpl $0x2, %eax
jne 0x142f7
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rcx
callq 0x1344c
jmp 0x13e1a
movq 0x20(%rsp), %r15
movq 0x10(%r15), %rbx
movl %r13d, %edi
movq %r14, %rsi
callq 0x664d
movq 0x20(%r15), %rcx
pushq $0x30
popq %rdi
movq %rbx, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x6c19
jmp 0x13e1a
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
cmpb $0x2, 0x5(%rax)
sete %bl
leaq 0xd54d(%rip), %rsi      # 0x21886
movq 0x18(%rsp), %rdi
callq 0xb79b
testq %rax, %rax
je 0x145f1
movq %rax, %r14
movb %bl, %r13b
movl 0x90(%rax), %edx
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x13102
movq %rax, 0x60(%rsp)
movq 0x40(%r14), %r12
movq %r14, 0x38(%rsp)
movq 0x48(%r14), %rbx
movl %r13d, 0x40(%rsp)
cmpq $0xc, %rbx
jb 0x1458c
leaq 0x6(%r12), %rsi
movl %r13d, %edi
callq 0x663d
movzwl %ax, %ebp
leaq 0x8(%r12), %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, 0x80(%rsp)
addq $-0xc, %rbx
leaq 0xc(%r12), %rax
addq $0x14, %r12
movq $0x0, 0x58(%rsp)
movq %r12, %r14
movq %rax, %r12
movq $0x0, 0x78(%rsp)
subl $0x1, %ebp
jb 0x1457b
subq $0xc, %rbx
jae 0x143fe
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rcx
pushq $0x76
popq %rdi
leaq 0xd490(%rip), %rdx      # 0x21887
xorl %eax, %eax
callq 0x6c19
cmpl $0x0, (%r12)
je 0x1441e
movl %r13d, %edi
movq %r12, %rsi
callq 0x664d
movl %eax, %eax
addq 0x60(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x14427
movq $0x0, 0x48(%rsp)
movzbl 0x4(%r12), %eax
andl $0x1e, %eax
cmpl $0x8, %eax
movl %ebp, 0x14(%rsp)
movq %r14, 0x30(%rsp)
ja 0x14491
movl $0x150, %ecx            # imm = 0x150
btl %eax, %ecx
jae 0x14491
movq %r14, %rsi
movq 0x38(%rsp), %rdi
subq 0x40(%rdi), %rsi
callq 0xad53
testq %rax, %rax
je 0x14491
movq %rax, %r15
cmpb $0x1, 0x38(%rax)
jne 0x14472
movq 0x30(%r15), %rax
cmpw $0x20, 0xa(%rax)
je 0x14487
leaq 0xd49f(%rip), %rdi      # 0x21918
leaq 0xd48c(%rip), %rsi      # 0x2190c
xorl %eax, %eax
callq 0x6b2c
movq 0x18(%r15), %r14
movl 0x28(%r15), %r15d
jmp 0x144a4
leaq 0x8(%r12), %rsi
movl %r13d, %edi
callq 0x664d
movl %eax, %r15d
xorl %r14d, %r14d
movzbl 0x4(%r12), %ebp
cmpl $0x44, %ebp
movq %rbx, 0x8(%rsp)
je 0x144d7
cmpl $0x24, %ebp
jne 0x14521
cmpl $0x0, (%r12)
je 0x144f5
movb $0x24, %bpl
testq %r14, %r14
je 0x14504
movl %r15d, %eax
movq %rax, 0x58(%rsp)
movq %r14, 0x78(%rsp)
jmp 0x14521
testq %r14, %r14
cmoveq 0x78(%rsp), %r14
movl $0x0, %eax
cmovel 0x58(%rsp), %eax
addl %r15d, %eax
movb $0x44, %bpl
movl %eax, %r15d
jmp 0x14521
addl 0x58(%rsp), %r15d
movb $0x24, %bpl
movq 0x78(%rsp), %r14
jmp 0x14521
leaq 0xd426(%rip), %rdi      # 0x21931
leaq 0xd3fa(%rip), %rsi      # 0x2190c
xorl %eax, %eax
callq 0x6b2c
movb 0x4(%r12), %bpl
xorl %r14d, %r14d
movsbl 0x5(%r12), %ebx
leaq 0x6(%r12), %rsi
movl 0x40(%rsp), %r13d
movl %r13d, %edi
callq 0x663d
subq $0x8, %rsp
movswl %ax, %r9d
movzbl %bpl, %ecx
movq 0x20(%rsp), %rdi
movq %r14, %rsi
movq 0x50(%rsp), %rdx
movl %ebx, %r8d
pushq %r15
callq 0xad71
addq $0x10, %rsp
addq $0xc, %r12
movq 0x30(%rsp), %r14
addq $0xc, %r14
movq 0x8(%rsp), %rbx
movl 0x14(%rsp), %ebp
jmp 0x143d1
movl 0x80(%rsp), %eax
addq %rax, 0x60(%rsp)
jmp 0x1437e
testq %rbx, %rbx
je 0x145af
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rcx
leaq 0xd2e2(%rip), %rdx      # 0x21887
pushq $0x76
popq %rdi
xorl %eax, %eax
callq 0x6c19
movq 0x38(%rsp), %rdi
callq 0x6444
jmp 0x145f1
addq $0x10, %rbx
movl %r13d, %edi
movq %rbx, %rsi
callq 0x664d
movl %eax, %eax
movq 0x8(%rsp), %rbx
addq %rax, %rbx
addq $0x4, %r12
movl %r13d, %edi
movq %r12, %rsi
callq 0x664d
movl %eax, %eax
addq %rbx, %rax
movq 0x18(%rsp), %rcx
movq %rax, 0x18(%rcx)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0xb95b
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq