// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/linker.c
// Function: linker_join
void linker_join(struct GlobalVars *gv)
/* Join the sections with same name and type, or as defined by a
   linker script. Calculate their virtual address and size. */
{
  struct ObjectUnit *obj;
  struct Section *sec,*nextsec;

  if (gv->trace_file)
    fprintf(gv->trace_file,"Joining selected sections:\n");

  if (gv->use_ldscript) {
    /* Linkage rules are defined by a linker script, which means there */
    /* are predefined LinkedSection structures which can be used. */
    struct LinkedSection *ls,*maxls=NULL;
    char *filepattern,**secpatterns;
    unsigned long maxsize = 0;

    init_secdef_parse(gv);
    /* Handle one section definition after the other from the
       linker script's SECTIONS block. The script parser cares
       for commands, symbol-definitions and address-assignments. */

    while (ls = next_secdef(gv)) {
      /* Phase 1: read file/section patterns and determine which alignment
         and flags are required for the sections to merge with us */
      while (test_pattern(gv,&filepattern,&secpatterns)) {
        for (obj=(struct ObjectUnit *)gv->selobjects.first;
             obj->n.next!=NULL; obj=(struct ObjectUnit *)obj->n.next) {

          if (obj->lnkfile->type != ID_SHAREDOBJ &&
              pattern_match(filepattern,obj->lnkfile->filename)) {
            for (sec=(struct Section *)obj->sections.first;
                 sec->n.next!=NULL; sec=(struct Section *)sec->n.next) {
              if (sec->lnksec==NULL
                  && patternlist_match(secpatterns,sec->name)) {
                /* File name and section name are matching the patterns,
                   so try to merge and check alignments */
                uint8_t f;

                if ((f = cmpsecflags(gv,ls,sec->flags)) == 0xff) {
                  /* no warning, because the linker-script should know... */
                  f = ls->flags ? ls->flags : sec->flags;
                }
                merge_sec_attrs(ls,sec,f&~SF_PORTABLE_MASK);
                sec->lnksec = ls;  /* will be reset for phase 2 */
              }
            }
          }
        }
        free_patterns(filepattern,secpatterns);
      }

      /* align this section to the maximum required alignment */
      align_address(ls->relocmem,ls->destmem,ls->alignment);
      ls->base = ls->relocmem->current;
      ls->copybase = ls->destmem->current;

      /* reset lnksec pointers for phase 2 */
      for (obj=(struct ObjectUnit *)gv->selobjects.first;
           obj->n.next!=NULL; obj=(struct ObjectUnit *)obj->n.next) {
        if (obj->lnkfile->type!=ID_SHAREDOBJ && !listempty(&obj->sections)) {
          for (sec=(struct Section *)obj->sections.first;
               sec->n.next!=NULL; sec=(struct Section *)sec->n.next)
            sec->lnksec = NULL;
        }
      }

      /* Phase 2: read next patterns and merge matching sections for real */
      while (next_pattern(gv,&filepattern,&secpatterns)) {
        for (obj=(struct ObjectUnit *)gv->selobjects.first;
             obj->n.next!=NULL; obj=(struct ObjectUnit *)obj->n.next) {

          if (obj->lnkfile->type != ID_SHAREDOBJ &&
              pattern_match(filepattern,obj->lnkfile->filename)) {
            sec = (struct Section *)obj->sections.first;
            while (nextsec = (struct Section *)sec->n.next) {
              if (sec->lnksec==NULL
                  && patternlist_match(secpatterns,sec->name)) {

                /* File name and section name are matching the patterns,
                   so join it into the current LinkedSection. */
                align_address(ls->relocmem,ls->destmem,sec->alignment);
                sec->filldata = gv->filldata;
                sec->lnksec = ls;
                sec->va = ls->relocmem->current;
                sec->offset = sec->va - ls->base;
                update_address(ls->relocmem,ls->destmem,sec->size);

                /* allocate COMMON symbols, if required */
                if ((!strcmp(sec->name,gv->common_sec_name) ||
                     !strcmp(sec->name,gv->scommon_sec_name)) &&
                    (!gv->dest_object || gv->alloc_common)) {
                  update_address(ls->relocmem,ls->destmem,
                                 allocate_common(gv,sec,
                                                 ls->relocmem->current));
                }

                addtail(&ls->sections,remnode(&sec->n));

                if (!is_ld_script(sec->obj) &&
                    (gv->scriptflags & LDSF_KEEP)) {
                /* @@@ KEEP for one section will prevent all merged
                   sections from being deleted - ok??? */
                  ls->ld_flags |= LSF_PRESERVE;
                  ls->flags |= SF_ALLOC;  /* @@@ keep implies ALLOC? */
                }
              }
              sec = nextsec;
            }
          }
        }
        free_patterns(filepattern,secpatterns);

        /* keep section size up to date */
        ls->size = ls->relocmem->current - ls->base;
        if (sec = last_initialized(ls))
          ls->filesize = (sec->va + sec->size) - ls->base;
        else
          ls->filesize = 0;  /* whole contents is uninitialized */

        if (ls->size>maxsize || maxsize==0) {  /* finds largest section */
          maxsize = ls->size;
          maxls = ls;
        }
      }
    }

    /* Check if there are any sections left, which were not recognized */
    /* by the linker script rules */
    for (obj=(struct ObjectUnit *)gv->selobjects.first;
         obj->n.next!=NULL; obj=(struct ObjectUnit *)obj->n.next) {
      if (obj->lnkfile->type!=ID_SHAREDOBJ && !listempty(&obj->sections)) {
        for (sec=(struct Section *)obj->sections.first; sec->n.next!=NULL;
             sec=(struct Section *)sec->n.next) {
          int i;

          if (sec->size==0 && (*(sec->name)==0 || is_ld_script(sec->obj))) {
            /* @@@ move section without name and contents into biggest
               LinkedSection - might be a dummy or linker script section
               with abs symbols */
            sec->filldata = gv->filldata;
            sec->lnksec = maxls;
            sec->va = maxls->relocmem->current;
            sec->offset = sec->va - maxls->base;
            addtail(&maxls->sections,remnode(&sec->n));
          }
          else {
            /* Section was not recognized by target linker script */
            error(64,getobjname(obj),sec->name);

            /* kill unallocated common symbols */
            for (i=0; i<OBJSYMHTABSIZE; i++) {
              struct Symbol *sym;

              for (sym = sec->obj->objsyms[i]; sym; sym=sym->obj_chain) {
                if (sym->relsect==sec && sym->type==SYM_COMMON)
                  sym->type = SYM_ABS; /* to prevent an internal error */
              }
            }
          }
        }
      }
    }
  }


  else {  /* !gv->use_ldscript */
    /* Default linkage rules. Link all code, all data, all bss. */
    unsigned long va = 0;
    bool baseincr = (fff[gv->dest_format]->flags&FFF_BASEINCR) != 0;
    uint8_t stype;
    struct LinkedSection *ls,*newls;

    /* join sections, beginning with ST_CODE, then ST_DATA and ST_UDATA */
    for (stype=0; stype<=ST_LAST; stype++) {
      struct list seclist;

      /* collect all sections of current type */
      initlist(&seclist);
      for (obj=(struct ObjectUnit *)gv->selobjects.first;
           obj->n.next!=NULL; obj=(struct ObjectUnit *)obj->n.next) {

        if (obj->lnkfile->type != ID_SHAREDOBJ) {
          sec = (struct Section *)obj->sections.first;
          while (nextsec = (struct Section *)sec->n.next) {
            if (sec->type == stype)
              addtail(&seclist,remnode(&sec->n));
            sec = nextsec;
          }
        }
      }

      /* Phase 1: link sec. which fit together, obeying target linking rules*/
      do {
        bool create_allowed = TRUE;

        for (sec=(struct Section *)seclist.first;
             sec->n.next!=NULL; sec=(struct Section *)sec->n.next) {
          ls = get_matching_lnksec(gv,sec,NULL);
          if (!ls && create_allowed) {
            Dprintf("new: %s(%s) -> %s\n",getobjname(sec->obj),
                    sec->name,sec->name);
            ls = create_lnksect(gv,sec->name,sec->type,sec->flags,
                                sec->protection,sec->alignment);
            create_allowed = FALSE;
          }
          if (ls)
            addtail(&ls->sections,remnode(&sec->n));
        }
      }
      while (!(listempty(&seclist)));
    }

    /* Phase 2: resolve dependencies between created LinkedSections */
    do {
      newls = NULL;
      for (ls=(struct LinkedSection *)gv->lnksec.first;
           ls->n.next!=NULL; ls=(struct LinkedSection *)ls->n.next) {
        for (sec=(struct Section *)ls->sections.first;
             sec->n.next!=NULL; sec=(struct Section *)sec->n.next) {
          if (newls = get_matching_lnksec(gv,sec,ls)) {
            /* another LinkedSection matches too - merge them! */
            break;
          }
        }
        if (newls) {
          /* merge with matching LinkedSection, dump the newer one */
          struct Section *firstbss;
          uint8_t tgtfl;

          if (newls->index > ls->index) {
            /* ls is older, so keep it instead of newls */
            struct LinkedSection *dumls = newls;
            newls = ls;
            ls = dumls;
          }
          firstbss = find_first_bss_sec(newls);
          tgtfl = ls->flags & ~SF_PORTABLE_MASK;

          while (sec = (struct Section *)remhead(&ls->sections)) {
            merge_sec_attrs(newls,sec,tgtfl);
            if (!(sec->flags & SF_UNINITIALIZED) && firstbss!=NULL)
              insertbefore(&sec->n,&firstbss->n);
            else
              addtail(&newls->sections,&sec->n);
          }
          remnode(&ls->n);
          free(ls);
          break;
        }
      }
    }
    while (newls);

    /* Phase 3: calculate offsets and sizes for final LinkedSections */
    for (ls=(struct LinkedSection *)gv->lnksec.first;
         ls->n.next!=NULL; ls=(struct LinkedSection *)ls->n.next) {
      ls->base = ls->copybase = va;

      for (sec=(struct Section *)ls->sections.first;
           sec->n.next!=NULL; sec=(struct Section *)sec->n.next) {
        unsigned long abytes = align(ls->base+ls->size,sec->alignment);

        sec->lnksec = ls;
        sec->offset = ls->size + abytes;
        sec->va = ls->base + sec->offset;
        ls->size += sec->size + abytes;
        if (baseincr)
          va += sec->size + abytes;
        if (!(sec->flags & SF_UNINITIALIZED))
          ls->filesize += sec->size + abytes;

        /* allocate COMMON symbols, if required */
        if ((!strcmp(sec->name,gv->common_sec_name) ||
             !strcmp(sec->name,gv->scommon_sec_name)) &&
            (!gv->dest_object || gv->alloc_common)) {
          unsigned long n = allocate_common(gv,sec,ls->base+ls->size);

          ls->size += n;
          if (baseincr)
            va += n;
        }
      }
    }
  }
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
cmpq $0x0, 0xa0(%rax)
je 0xaf7e
movq 0xf0(%rsp), %rax
movq 0xa0(%rax), %rdi
leaq 0x2a2ec(%rip), %rsi     # 0x35263
movb $0x0, %al
callq 0x5150
movq 0xf0(%rsp), %rax
cmpl $0x0, 0x244(%rax)
je 0xb954
movq $0x0, 0xc8(%rsp)
movq $0x0, 0xb0(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x16bf0
movq 0xf0(%rsp), %rdi
callq 0x165d0
movq %rax, 0xd0(%rsp)
cmpq $0x0, %rax
je 0xb6e3
jmp 0xafd9
movq 0xf0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x14c70
cmpl $0x0, %eax
je 0xb1b9
movq 0xf0(%rsp), %rax
movq 0x138(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
cmpq $0x0, (%rax)
je 0xb19f
movq 0xe8(%rsp), %rax
movq 0x10(%rax), %rax
movzbl 0x39(%rax), %eax
cmpl $0x4, %eax
je 0xb185
movq 0xc0(%rsp), %rdi
movq 0xe8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rsi
callq 0x18570
cmpl $0x0, %eax
je 0xb185
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
cmpq $0x0, (%rax)
je 0xb183
movq 0xe0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xb169
movq 0xb8(%rsp), %rdi
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0x185a0
cmpl $0x0, %eax
je 0xb169
movq 0xf0(%rsp), %rdi
movq 0xd0(%rsp), %rsi
movq 0xe0(%rsp), %rax
movzbl 0x2d(%rax), %edx
callq 0xc030
movb %al, 0xaf(%rsp)
movzbl %al, %eax
cmpl $0xff, %eax
jne 0xb132
movq 0xd0(%rsp), %rax
movzbl 0x21(%rax), %eax
cmpl $0x0, %eax
je 0xb117
movq 0xd0(%rsp), %rax
movzbl 0x21(%rax), %eax
movl %eax, 0x34(%rsp)
jmp 0xb127
movq 0xe0(%rsp), %rax
movzbl 0x2d(%rax), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movb %al, 0xaf(%rsp)
movq 0xd0(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movzbl 0xaf(%rsp), %eax
andl $-0x20, %eax
movzbl %al, %edx
callq 0xc100
movq 0xd0(%rsp), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0xb16b
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0xb07b
jmp 0xb185
jmp 0xb187
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
jmp 0xb016
movq 0xc0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
callq 0x14c00
jmp 0xafd9
movq 0xd0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0xd0(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0xd0(%rsp), %rax
movzbl 0x23(%rax), %eax
movl %eax, %edx
callq 0x14bb0
movq 0xd0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x20(%rax), %rcx
movq 0xd0(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0xd0(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rcx
movq 0xd0(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0xf0(%rsp), %rax
movq 0x138(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
cmpq $0x0, (%rax)
je 0xb2cf
movq 0xe8(%rsp), %rax
movq 0x10(%rax), %rax
movzbl 0x39(%rax), %eax
cmpl $0x4, %eax
je 0xb2b5
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, (%rax)
je 0xb2b5
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
cmpq $0x0, (%rax)
je 0xb2b3
movq 0xe0(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0xb280
jmp 0xb2b5
jmp 0xb2b7
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
jmp 0xb233
jmp 0xb2d1
movq 0xf0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x15520
cmpl $0x0, %eax
je 0xb6de
movq 0xf0(%rsp), %rax
movq 0x138(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
cmpq $0x0, (%rax)
je 0xb5fa
movq 0xe8(%rsp), %rax
movq 0x10(%rax), %rax
movzbl 0x39(%rax), %eax
cmpl $0x4, %eax
je 0xb5e0
movq 0xc0(%rsp), %rdi
movq 0xe8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rsi
callq 0x18570
cmpl $0x0, %eax
je 0xb5e0
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xd8(%rsp)
cmpq $0x0, %rax
je 0xb5de
movq 0xe0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xb5c9
movq 0xb8(%rsp), %rdi
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0x185a0
cmpl $0x0, %eax
je 0xb5c9
movq 0xd0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0xd0(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0xe0(%rsp), %rax
movzbl 0x2f(%rax), %eax
movl %eax, %edx
callq 0x14bb0
movq 0xf0(%rsp), %rax
movw 0x200(%rax), %cx
movq 0xe0(%rsp), %rax
movw %cx, 0x94(%rax)
movq 0xd0(%rsp), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0xd0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x20(%rax), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0xe0(%rsp), %rax
movq 0x30(%rax), %rcx
movq 0xd0(%rsp), %rax
subq 0x40(%rax), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0xd0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0xd0(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0xe0(%rsp), %rax
movq 0x48(%rax), %rdx
callq 0x14ab0
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xf0(%rsp), %rax
movq 0x220(%rax), %rsi
callq 0x5130
cmpl $0x0, %eax
je 0xb4d5
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xf0(%rsp), %rax
movq 0x228(%rax), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0xb54a
movq 0xf0(%rsp), %rax
cmpl $0x0, 0x54(%rax)
je 0xb4f1
movq 0xf0(%rsp), %rax
cmpl $0x0, 0x64(%rax)
je 0xb54a
movq 0xd0(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0xd0(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0xd0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x20(%rax), %rdx
callq 0xc2f0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
callq 0x14ab0
movq 0xd0(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x18(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x7530
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x7470
movq 0xe0(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x14a60
cmpl $0x0, %eax
jne 0xb5c7
movq 0xf0(%rsp), %rax
movzbl 0x248(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb5c7
movq 0xd0(%rsp), %rax
movzwl 0x24(%rax), %ecx
orl $0x2, %ecx
movw %cx, 0x24(%rax)
movq 0xd0(%rsp), %rax
movzbl 0x21(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x21(%rax)
jmp 0xb5c9
movq 0xd8(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xb373
jmp 0xb5e0
jmp 0xb5e2
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
jmp 0xb30e
movq 0xc0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
callq 0x14c00
movq 0xd0(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x20(%rax), %rcx
movq 0xd0(%rsp), %rax
subq 0x40(%rax), %rcx
movq 0xd0(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0xd0(%rsp), %rdi
callq 0xc460
movq %rax, 0xe0(%rsp)
cmpq $0x0, %rax
je 0xb684
movq 0xe0(%rsp), %rax
movq 0x30(%rax), %rcx
movq 0xe0(%rsp), %rax
addq 0x48(%rax), %rcx
movq 0xd0(%rsp), %rax
subq 0x40(%rax), %rcx
movq 0xd0(%rsp), %rax
movq %rcx, 0x50(%rax)
jmp 0xb694
movq 0xd0(%rsp), %rax
movq $0x0, 0x50(%rax)
movq 0xd0(%rsp), %rax
movq 0x48(%rax), %rax
cmpq 0xb0(%rsp), %rax
ja 0xb6b5
cmpq $0x0, 0xb0(%rsp)
jne 0xb6d9
movq 0xd0(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0xc8(%rsp)
jmp 0xb2d1
jmp 0xafb8
movq 0xf0(%rsp), %rax
movq 0x138(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
cmpq $0x0, (%rax)
je 0xb94f
movq 0xe8(%rsp), %rax
movq 0x10(%rax), %rax
movzbl 0x39(%rax), %eax
cmpl $0x4, %eax
je 0xb935
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, (%rax)
je 0xb935
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
cmpq $0x0, (%rax)
je 0xb933
movq 0xe0(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0xb844
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xb7a2
movq 0xe0(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x14a60
cmpl $0x0, %eax
je 0xb844
movq 0xf0(%rsp), %rax
movw 0x200(%rax), %cx
movq 0xe0(%rsp), %rax
movw %cx, 0x94(%rax)
movq 0xc8(%rsp), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0xc8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x20(%rax), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0xe0(%rsp), %rax
movq 0x30(%rax), %rcx
movq 0xc8(%rsp), %rax
subq 0x40(%rax), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0xc8(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x7530
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x7470
jmp 0xb919
movq 0xe8(%rsp), %rdi
callq 0x8f00
movq %rax, %rsi
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rdx
movl $0x40, %edi
movb $0x0, %al
callq 0x8c00
movl $0x0, 0xa8(%rsp)
cmpl $0x20, 0xa8(%rsp)
jge 0xb917
movq 0xe0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x48(%rax), %rax
movslq 0xa8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
je 0xb8ff
movq 0xa0(%rsp), %rax
movq 0x38(%rax), %rax
cmpq 0xe0(%rsp), %rax
jne 0xb8e7
movq 0xa0(%rsp), %rax
movzbl 0x40(%rax), %eax
cmpl $0x3, %eax
jne 0xb8e7
movq 0xa0(%rsp), %rax
movb $0x1, 0x40(%rax)
jmp 0xb8e9
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xa0(%rsp)
jmp 0xb8a9
jmp 0xb901
movl 0xa8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa8(%rsp)
jmp 0xb877
jmp 0xb919
jmp 0xb91b
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0xb74f
jmp 0xb935
jmp 0xb937
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
jmp 0xb6fa
jmp 0xc01d
movq $0x0, 0x98(%rsp)
movq 0xf0(%rsp), %rax
movzbl 0x50(%rax), %eax
movl %eax, %ecx
leaq 0x340bb(%rip), %rax     # 0x3fa30
movq (%rax,%rcx,8), %rax
movl 0xac(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x94(%rsp)
movb $0x0, 0x93(%rsp)
movzbl 0x93(%rsp), %eax
cmpl $0x4, %eax
jg 0xbbbf
leaq 0x68(%rsp), %rdi
callq 0x7330
movq 0xf0(%rsp), %rax
movq 0x138(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
cmpq $0x0, (%rax)
je 0xba82
movq 0xe8(%rsp), %rax
movq 0x10(%rax), %rax
movzbl 0x39(%rax), %eax
cmpl $0x4, %eax
je 0xba68
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xd8(%rsp)
cmpq $0x0, %rax
je 0xba66
movq 0xe0(%rsp), %rax
movzbl 0x2c(%rax), %eax
movzbl 0x93(%rsp), %ecx
cmpl %ecx, %eax
jne 0xba54
movq 0xe0(%rsp), %rdi
callq 0x7530
movq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x7470
movq 0xd8(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xba09
jmp 0xba68
jmp 0xba6a
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
jmp 0xb9ce
jmp 0xba84
movl $0x1, 0x64(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
cmpq $0x0, (%rax)
je 0xbb90
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xc4c0
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
jne 0xbb40
cmpl $0x0, 0x64(%rsp)
je 0xbb40
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0xe0(%rsp), %rax
movb 0x2c(%rax), %dl
movq 0xe0(%rsp), %rax
movb 0x2d(%rax), %cl
movq 0xe0(%rsp), %rax
movb 0x2e(%rax), %r8b
movq 0xe0(%rsp), %rax
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %r8b, %r8d
movzbl 0x2f(%rax), %r9d
callq 0x12a60
movq %rax, 0x88(%rsp)
movl $0x0, 0x64(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0xbb76
movq 0x88(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x8(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x7530
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x7470
jmp 0xbb78
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0xba99
jmp 0xbb92
movq 0x68(%rsp), %rax
cmpq $0x0, (%rax)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xba84
jmp 0xbbaa
movb 0x93(%rsp), %al
addb $0x1, %al
movb %al, 0x93(%rsp)
jmp 0xb99c
jmp 0xbbc1
movq $0x0, 0x80(%rsp)
movq 0xf0(%rsp), %rax
movq 0x1c0(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
cmpq $0x0, (%rax)
je 0xbd8f
movq 0x88(%rsp), %rax
movq 0x60(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
cmpq $0x0, (%rax)
je 0xbc5c
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0xc4c0
movq %rax, 0x80(%rsp)
cmpq $0x0, %rax
je 0xbc45
jmp 0xbc5c
jmp 0xbc47
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0xbc0a
cmpq $0x0, 0x80(%rsp)
je 0xbd75
movq 0x80(%rsp), %rax
movl 0x10(%rax), %eax
movq 0x88(%rsp), %rcx
cmpl 0x10(%rcx), %eax
jle 0xbcad
movq 0x80(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rdi
callq 0x120b0
movq %rax, 0x58(%rsp)
movq 0x88(%rsp), %rax
movzbl 0x21(%rax), %eax
andl $-0x20, %eax
movb %al, 0x57(%rsp)
movq 0x88(%rsp), %rdi
addq $0x60, %rdi
callq 0x74d0
movq %rax, 0xe0(%rsp)
cmpq $0x0, %rax
je 0xbd59
movq 0x80(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movzbl 0x57(%rsp), %edx
callq 0xc100
movq 0xe0(%rsp), %rax
movzbl 0x2d(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xbd3b
cmpq $0x0, 0x58(%rsp)
je 0xbd3b
movq 0xe0(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x7370
jmp 0xbd54
movq 0x80(%rsp), %rdi
addq $0x60, %rdi
movq 0xe0(%rsp), %rsi
callq 0x7470
jmp 0xbcd2
movq 0x88(%rsp), %rdi
callq 0x7530
movq 0x88(%rsp), %rdi
callq 0x5030
jmp 0xbd8f
jmp 0xbd77
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x88(%rsp)
jmp 0xbbe4
jmp 0xbd91
cmpq $0x0, 0x80(%rsp)
jne 0xbbc1
movq 0xf0(%rsp), %rax
movq 0x1c0(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
cmpq $0x0, (%rax)
je 0xc01b
movq 0x98(%rsp), %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x88(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x88(%rsp), %rax
movq 0x60(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
cmpq $0x0, (%rax)
je 0xc001
movq 0x88(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x88(%rsp), %rax
addq 0x48(%rax), %rdi
movq 0xe0(%rsp), %rax
movzbl 0x2f(%rax), %eax
movl %eax, %esi
callq 0x87f0
movq %rax, 0x40(%rsp)
movq 0x88(%rsp), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x88(%rsp), %rax
movq 0x48(%rax), %rcx
addq 0x40(%rsp), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x88(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0xe0(%rsp), %rax
addq 0x38(%rax), %rcx
movq 0xe0(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0xe0(%rsp), %rax
movq 0x48(%rax), %rcx
addq 0x40(%rsp), %rcx
movq 0x88(%rsp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
cmpl $0x0, 0x94(%rsp)
je 0xbee0
movq 0xe0(%rsp), %rax
movq 0x48(%rax), %rax
addq 0x40(%rsp), %rax
addq 0x98(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xe0(%rsp), %rax
movzbl 0x2d(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xbf15
movq 0xe0(%rsp), %rax
movq 0x48(%rax), %rcx
addq 0x40(%rsp), %rcx
movq 0x88(%rsp), %rax
addq 0x50(%rax), %rcx
movq %rcx, 0x50(%rax)
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xf0(%rsp), %rax
movq 0x220(%rax), %rsi
callq 0x5130
cmpl $0x0, %eax
je 0xbf63
movq 0xe0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xf0(%rsp), %rax
movq 0x228(%rax), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0xbfe7
movq 0xf0(%rsp), %rax
cmpl $0x0, 0x54(%rax)
je 0xbf7f
movq 0xf0(%rsp), %rax
cmpl $0x0, 0x64(%rax)
je 0xbfe7
movq 0xf0(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0x88(%rsp), %rax
movq 0x40(%rax), %rdx
movq 0x88(%rsp), %rax
addq 0x48(%rax), %rdx
callq 0xc2f0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rcx
movq 0x88(%rsp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
cmpl $0x0, 0x94(%rsp)
je 0xbfe5
movq 0x38(%rsp), %rax
addq 0x98(%rsp), %rax
movq %rax, 0x98(%rsp)
jmp 0xbfe7
jmp 0xbfe9
movq 0xe0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0xbdfd
jmp 0xc003
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x88(%rsp)
jmp 0xbdb7
jmp 0xc01d
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)