LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: readsection
lword readsection(struct GlobalVars *gv,uint8_t rtype,uint8_t *p,
                  uint16_t bpos,uint16_t bsiz,lword mask)
/* Read data from section at 'p', using bit-offset 'bpos' and a field-size
   of 'bsiz' bits. The result is denormalized using the supplied mask.
   Complex RelocInsert scenarios are not supported, but this doesn't
   matter as those relocations have their addend information available
   anyway (ELF: .rela section) and don't need to read it from a section. */
{
  lword v = 0;
  int n;

  p += bpos >> 3;
  bpos &= 7;

  if (n = (bpos + bsiz + 7) >> 3) {
    if (gv->endianess == _LITTLE_ENDIAN_) {
      p += n;
      while (n--) {
        v <<= 8;
        v |= (lword)*(--p);
      }
      v >>= bpos;  /* normalize extracted bit-field */
    }
    else {  /* _BIG_ENDIAN_ or undefined */
      while (n--) {
        v <<= 8;
        v |= (lword)*p++;
      }
      v >>= (8 - ((bpos + bsiz) & 7)) & 7; /* normalize extracted bit-field */
    }
    v &= makemask(bsiz);

    /* mask and denormalize the read value using 'mask' */
    n = lshiftcnt(mask);
    mask >>= n;
    v &= mask;
    if (rtype==R_SD || rtype==R_SD2 || rtype==R_SD21)
      v <<= n;
    else
      v = sign_extend(v,(int)bsiz) << n;  /* sign-extend */
  }

  return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r14d
movl %ecx, %r8d
movl %ecx, %eax
andl $0x7, %eax
movl %eax, %ecx
addl %r14d, %ecx
je 0xaef6
movq %r9, %rbx
movl %esi, %ebp
shrl $0x3, %r8d
leal (%rax,%r14), %r9d
addl $0x7, %r9d
shrl $0x3, %r9d
cmpb $0x0, 0x202(%rdi)
je 0xaefa
addq %r8, %rdx
xorl %eax, %eax
xorl %esi, %esi
cmpl %eax, %r9d
je 0xaeef
shlq $0x8, %rsi
movzbl (%rdx,%rax), %edi
orq %rdi, %rsi
incq %rax
jmp 0xaeda
negb %cl
andb $0x7, %cl
jmp 0xaf1b
xorl %ebx, %ebx
jmp 0xaf6f
movl %r9d, %ecx
addq %r8, %rdx
decq %rdx
xorl %esi, %esi
testl %ecx, %ecx
je 0xaf19
shlq $0x8, %rsi
movzbl (%rdx,%rcx), %edi
orq %rdi, %rsi
decq %rcx
jmp 0xaf05
movl %eax, %ecx
sarq %cl, %rsi
pushq $-0x1
popq %r12
movl %r14d, %ecx
shlq %cl, %r12
notq %r12
andq %rsi, %r12
movq %rbx, %rdi
callq 0x6a69
movl %eax, %ecx
sarq %cl, %rbx
movl %eax, %r15d
andq %r12, %rbx
cmpb $0x21, %bpl
ja 0xaf5b
movzbl %bpl, %eax
movabsq $0x300000400, %rcx      # imm = 0x300000400
btq %rax, %rcx
jb 0xaf69
movq %rbx, %rdi
movl %r14d, %esi
callq 0x6ad8
movq %rax, %rbx
movl %r15d, %ecx
shlq %cl, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: sort_relocs
void sort_relocs(struct list *rlist)
/* sorts a section's relocation list by their section offsets */
{
  struct Reloc *rel,**rel_ptr_array,**p;
  int cnt = 0;

  /* count relocs and make a pointer array */
  for (rel=(struct Reloc *)rlist->first; rel->n.next!=NULL;
       rel=(struct Reloc *)rel->n.next)
    cnt++;
  if (cnt > 1) {
    rel_ptr_array = alloc(cnt * sizeof(void *));
    for (rel=(struct Reloc *)rlist->first,p=rel_ptr_array;
         rel->n.next!=NULL; rel=(struct Reloc *)rel->n.next)
      *p++ = rel;

    /* sort pointer array */
    qsort(rel_ptr_array,cnt,sizeof(void *),reloc_offset_cmp);

    /* rebuild reloc list from sorted pointer array, then free it */
    initlist(rlist);
    for (p=rel_ptr_array; cnt; cnt--) {
      rel = *p++;
      addtail(rlist,&rel->n);
    }
    free(rel_ptr_array);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
pushq $0x1
popq %r12
pushq $-0x8
popq %rdi
movq (%rax), %rax
decq %r12
addq $0x8, %rdi
testq %rax, %rax
jne 0xb2dd
movl %r12d, %eax
negl %eax
cmpl $0x2, %eax
jb 0xb31c
movq %r12, %r15
negq %r15
callq 0x6340
movq %rax, %r14
movq %rbx, %rax
movq %r14, %rcx
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0xb328
movq %rax, (%rcx)
addq $0x8, %rcx
jmp 0xb30a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x45(%rip), %rcx        # 0xb374
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x50a0
movq %rbx, %rdi
callq 0x63c8
movq %r14, %r15
testl %r12d, %r12d
je 0xb361
movq (%r15), %rsi
addq $0x8, %r15
movq %rbx, %rdi
callq 0x6414
incl %r12d
jmp 0xb348
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5040
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: add_priptrs
void add_priptrs(struct GlobalVars *gv,struct ObjectUnit *ou)
/* Inserts all PriPointer nodes of an object into the global list. */
/* The node's position depends on 1. section name, 2. list name, */
/* 3. priority. */
{
  struct PriPointer *newpp,*nextpp,*pp;

  while (newpp = (struct PriPointer *)remhead(&ou->pripointers)) {
    pp = (struct PriPointer *)gv->pripointers.first;

    while (nextpp = (struct PriPointer *)pp->n.next) {
      int c;

      if ((c = strcmp(newpp->secname,pp->secname)) > 0)
        break;
      if (!c) {
        if ((c = strcmp(newpp->listname,pp->listname)) > 0)
          break;
        if (!c && newpp->priority < pp->priority)
          break;
      }
      pp = nextpp;
    }

    if (pp->n.pred)
      insertbefore(&newpp->n,&pp->n);
    else
      addhead(&gv->pripointers,&newpp->n);  /* first node in list */
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %rbx
addq $0x1a8, %r14            # imm = 0x1A8
movq %rbx, %rdi
callq 0x642a
testq %rax, %rax
je 0xb41c
movq %rax, %r15
movq (%r14), %r13
movq %r13, %r12
movq (%r13), %r13
testq %r13, %r13
je 0xb3fa
movq 0x10(%r15), %rdi
movq 0x10(%r12), %rsi
callq 0x5160
testl %eax, %eax
jg 0xb3fa
jne 0xb3bb
movq 0x18(%r15), %rdi
movq 0x18(%r12), %rsi
callq 0x5160
testl %eax, %eax
jg 0xb3fa
jne 0xb3bb
movl 0x20(%r15), %eax
cmpl 0x20(%r12), %eax
jge 0xb3bb
cmpq $0x0, 0x8(%r12)
je 0xb40f
movq %r15, %rdi
movq %r12, %rsi
callq 0x63d9
jmp 0xb3a8
movq %r14, %rdi
movq %r15, %rsi
callq 0x63fe
jmp 0xb3a8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: collect_constructors
void collect_constructors(struct GlobalVars *gv)
/* Scan all selected and unselected object modules for constructor-
   and destructor functions of the required type. */
{
  if (!gv->dest_object) {
    const char *vbcc_ctor = "__INIT";
    const char *vbcc_dtor = "__EXIT";
    const char *ctor_label = "___CTOR_LIST__";
    const char *dtor_label = "___DTOR_LIST__";
    const char *csec = xtors_secname(gv,ctors_name);
    const char *dsec = xtors_secname(gv,dtors_name);

    switch (gv->collect_ctors_type) {

      case CCDT_NONE:
        break;

      case CCDT_GNU:
        break;  /* @@@ already put into .ctors/.dtors anyway? */

      case CCDT_VBCC_ELF:  /* no leading underscores */
        vbcc_ctor++;
        vbcc_dtor++;
        ctor_label++;
        dtor_label++;
      case CCDT_VBCC:
        add_xtor_sym(gv,1,ctor_label);  /* define __CTOR_LIST__ */
        add_vbcc_xtors(gv,&gv->selobjects,
                       vbcc_ctor,vbcc_dtor,csec,dsec,ctor_label,dtor_label);
        add_xtor_sym(gv,0,dtor_label);  /* define __DTOR_LIST__ */
        add_vbcc_xtors(gv,&gv->libobjects,
                       vbcc_ctor,vbcc_dtor,csec,dsec,ctor_label,dtor_label);
        break;

      default:
        ierror("collect_constructors(): Unsupported type: %u\n",
               gv->collect_ctors_type);
        break;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x54(%rdi)
je 0xb449
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
leaq 0x1517a(%rip), %rsi     # 0x205cd
callq 0xb557
movq %rax, %r15
leaq 0x15172(%rip), %rsi     # 0x205d4
movq %rbx, %rdi
callq 0xb557
movzbl 0x203(%rbx), %esi
cmpl $0x2, %esi
jb 0xb43a
je 0xb4a7
cmpl $0x3, %esi
jne 0xb53b
movq %rax, %r12
leaq 0x153dd(%rip), %rbp     # 0x20868
leaq 0x153dd(%rip), %r14     # 0x2086f
leaq 0x153ec(%rip), %rax     # 0x20885
movq %rax, 0x8(%rsp)
leaq 0x153d1(%rip), %r13     # 0x20876
jmp 0xb4cb
movq %rax, %r12
leaq 0x153b6(%rip), %rbp     # 0x20867
leaq 0x153b6(%rip), %r14     # 0x2086e
leaq 0x153c5(%rip), %rax     # 0x20884
movq %rax, 0x8(%rsp)
leaq 0x153aa(%rip), %r13     # 0x20875
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0xb59d
leaq 0x138(%rbx), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq %r14, %rcx
movq %r14, 0x10(%rsp)
movq %r15, %r8
movq %r12, %r9
movq 0x8(%rsp), %r14
pushq %r14
pushq %r13
callq 0xb620
popq %rax
popq %rcx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xb59d
leaq 0x150(%rbx), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq 0x10(%rsp), %rcx
movq %r15, %r8
movq %r12, %r9
pushq %r14
pushq %r13
callq 0xb620
addq $0x28, %rsp
jmp 0xb43e
leaq 0x15351(%rip), %rdi     # 0x20893
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6b2c
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: xtors_secname
static const char *xtors_secname(struct GlobalVars *gv,const char *defname)
{
  const char *name = defname;

  if (gv->collect_ctors_secname) {
    /* required to put constructors/destructors in non-default sections? */
    if (strcmp(gv->collect_ctors_secname,ctors_name) &&
        strcmp(gv->collect_ctors_secname,dtors_name))
      name = gv->collect_ctors_secname;
  }
  return name;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x208(%rdi), %r14
testq %r14, %r14
je 0xb592
leaq 0x1505c(%rip), %rsi     # 0x205cd
movq %r14, %rdi
callq 0x5160
testl %eax, %eax
je 0xb592
leaq 0x15050(%rip), %rsi     # 0x205d4
movq %r14, %rdi
callq 0x5160
testl %eax, %eax
cmovneq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: add_xtor_sym
static void add_xtor_sym(struct GlobalVars *gv,int ctor,const char *name)
/* adds a constructor/destructor dummy symbol for linker_resolve() */
{
  if (ctor ? gv->ctor_symbol==NULL : gv->dtor_symbol==NULL) {
    struct Symbol *sym;

    if (sym = addlnksymbol(gv,name,0,SYM_ABS,0,SYMI_OBJECT,SYMB_GLOBAL,0)) {
      if (ctor)
        gv->ctor_symbol = sym;
      else
        gv->dtor_symbol = sym;
    }
    else
      error(59,name);  /* Can't define symbol as ctors/dtors label */
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
je 0xb5bd
cmpq $0x0, 0x210(%rbx)
jne 0xb617
jmp 0xb5c7
cmpq $0x0, 0x218(%rbx)
jne 0xb617
andl $0x0, 0x8(%rsp)
movl $0x2, (%rsp)
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movl %ecx, %r9d
callq 0xa880
testq %rax, %rax
je 0xb5fb
testl %ebp, %ebp
je 0xb610
movq %rax, 0x210(%rbx)
jmp 0xb617
pushq $0x3b
popq %rdi
movq %r14, %rsi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x6c19
movq %rax, 0x218(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: add_vbcc_xtors
static void add_vbcc_xtors(struct GlobalVars *gv,struct list *objlist,
                           const char *cname,const char *dname,
                           const char *csecname,const char *dsecname,
                           const char *clabel,const char *dlabel)
{
  struct ObjectUnit *obj;
  int clen = strlen(cname);
  int dlen = strlen(dname);
  int i;

  for (obj=(struct ObjectUnit *)objlist->first;
       obj->n.next!=NULL; obj=(struct ObjectUnit *)obj->n.next) {
    for (i=0; i<OBJSYMHTABSIZE; i++) {
      struct Symbol *sym = obj->objsyms[i];

      while (sym) {
        if (sym->bind==SYMB_GLOBAL) {
          if (!strncmp(sym->name,cname,clen)) {
            new_priptr(obj,csecname,clabel,vbcc_xtors_pri(sym->name+clen),
                       sym->name,0);
          }
          else if (!strncmp(sym->name,dname,dlen))
            new_priptr(obj,dsecname,dlabel,vbcc_xtors_pri(sym->name+dlen),
                       sym->name,0);
        }
        sym = sym->obj_chain;
      }
    }

    if (objlist == &gv->selobjects)
      add_priptrs(gv,obj);  /* con-/destructors are already known */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x20(%rsp)
movq %r8, 0x28(%rsp)
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x50e0
movq %rax, %r13
movq %r14, 0x30(%rsp)
movq %r14, %rdi
callq 0x50e0
movslq %r13d, %rbp
movslq %eax, %r13
movq %rbx, (%rsp)
leaq 0x138(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %r15, %rbx
movq (%rbx), %rbx
cmpq $0x0, (%rbx)
je 0xb749
xorl %eax, %eax
cmpq $0x20, %rax
je 0xb728
movq %rax, 0x18(%rsp)
leaq (,%rax,8), %r15
addq 0x48(%rbx), %r15
movq (%r15), %r15
testq %r15, %r15
je 0xb71b
cmpb $0x2, 0x43(%r15)
jne 0xb715
movq 0x20(%r15), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x5070
testl %eax, %eax
je 0xb6f5
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq %r13, %rdx
callq 0x5070
testl %eax, %eax
jne 0xb715
leaq (%r14,%r13), %rdi
callq 0xc6b2
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq 0x78(%rsp), %rdx
jmp 0xb70b
leaq (%r14,%rbp), %rdi
callq 0xc6b2
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq 0x70(%rsp), %rdx
movl %eax, %ecx
movq %r14, %r8
callq 0xc669
addq $0x18, %r15
jmp 0xb6a4
movq 0x18(%rsp), %rax
incq %rax
jmp 0xb689
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0xb67a
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0xb38e
jmp 0xb67a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: find_sect_type
struct Section *find_sect_type(struct ObjectUnit *ou,uint8_t type,uint8_t prot)
/* find a section in current object unit with approp. type and protection */
{
  struct Section *sec;

  for (sec=(struct Section *)ou->sections.first;
       sec->n.next!=NULL; sec=(struct Section *)sec->n.next) {
    if (sec->type==type && (sec->protection&prot)==prot
        && (sec->flags & SF_ALLOC))
      return sec;
  }
  return NULL;
}

// Assembly:
movq 0x20(%rdi), %rcx
movq %rcx, %rax
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xb780
cmpb %sil, 0x2c(%rax)
jne 0xb75c
movb 0x2e(%rax), %dil
notb %dil
testb %dil, %dl
jne 0xb75c
testb $0x1, 0x2d(%rax)
je 0xb75c
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: find_sect_name
struct Section *find_sect_name(struct ObjectUnit *ou,const char *name)
/* find a section by its name */
{
  struct Section *sec;

  for (sec=(struct Section *)ou->sections.first;
       sec->n.next!=NULL; sec=(struct Section *)sec->n.next) {
    if (!strcmp(name,sec->name))
      return sec;
  }
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x20(%rdi), %r15
movq %r15, %r14
movq (%r15), %r15
testq %r15, %r15
je 0xb7c4
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x5160
testl %eax, %eax
jne 0xb7a7
jmp 0xb7c7
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: find_lnksec
struct LinkedSection *find_lnksec(struct GlobalVars *gv,const char *name,
                                  uint8_t type,uint8_t flags,uint8_t fmask,
                                  uint8_t prot)
/* Return pointer to the first section which fits the passed */
/* name-, type- and flags-conditions. If a condition is 0, then */
/* it is ignored. If no appropriate section was found, return NULL. */
{
  struct LinkedSection *ls = (struct LinkedSection *)gv->lnksec.first;
  struct LinkedSection *nextls;

  while (nextls = (struct LinkedSection *)ls->n.next) {
    bool found = TRUE;

    if (name)
      if (strcmp(ls->name,name))
        found = FALSE;
    if (type)
      if (ls->type != type)
        found = FALSE;
    if (fmask)
      if ((ls->flags&fmask) != (flags&fmask))
        found = FALSE;
    if (prot)
      if ((ls->protection & prot) != prot)
        found = FALSE;
    if (found)
      return ls;
    ls = nextls;
  }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, 0x4(%rsp)
movl %edx, %r15d
movq %rsi, %r12
movq 0x1c0(%rdi), %r14
xorl %edx, %edx
movq %r14, %r13
movq (%r14), %r14
testq %r14, %r14
je 0xb869
pushq $0x1
popq %rcx
testq %r12, %r12
je 0xb835
movq 0x18(%r13), %rdi
movq %r12, %rsi
callq 0x5160
xorl %edx, %edx
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
testb %r15b, %r15b
je 0xb841
cmpb %r15b, 0x20(%r13)
cmovnel %edx, %ecx
testb %bpl, %bpl
je 0xb854
movb 0x21(%r13), %al
xorb 0x4(%rsp), %al
testb %bpl, %al
cmovnel %edx, %ecx
testb %bl, %bl
je 0xb863
movb 0x22(%r13), %al
notb %al
testb %al, %bl
cmovnel %edx, %ecx
testl %ecx, %ecx
je 0xb80d
jmp 0xb86c
xorl %r13d, %r13d
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: create_objunit
struct ObjectUnit *create_objunit(struct GlobalVars *gv,
                                  struct LinkFile *lf,const char *objname)
/* creates and initializes an ObjectUnit node */
{
  struct ObjectUnit *ou = alloc(sizeof(struct ObjectUnit));

  ou->lnkfile = lf;
  if (objname)
    ou->objname = objname;
  else
    ou->objname = noname;
  initlist(&ou->sections);  /* empty section list */
  ou->common = ou->scommon = NULL;
  ou->objsyms = alloc_hashtable(OBJSYMHTABSIZE);
  initlist(&ou->stabs);  /* empty stabs list */
  initlist(&ou->pripointers);  /* empty PriPointer list */
  ou->flags = 0;
  ou->min_alignment = gv->min_alignment;
  return ou;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl $0x88, %edi
callq 0x6340
movq %rax, %r14
movq %r12, 0x10(%rax)
testq %r15, %r15
leaq 0x14da6(%rip), %rax     # 0x20650
cmovneq %r15, %rax
movq %rax, 0x18(%r14)
leaq 0x20(%r14), %rdi
callq 0x63c8
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r14)
pushq $0x20
popq %rdi
callq 0x63bf
movq %rax, 0x48(%r14)
leaq 0x50(%r14), %rdi
callq 0x63c8
leaq 0x68(%r14), %rdi
callq 0x63c8
andw $0x0, 0x80(%r14)
movb 0x88(%rbx), %al
movb %al, 0x82(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: art_objunit
struct ObjectUnit *art_objunit(struct GlobalVars *gv,const char *n,
                               uint8_t *d,unsigned long len)
/* creates and initializes an artificial linker-object */
{
  struct LinkFile *lf = alloczero(sizeof(struct LinkFile));

  lf->pathname = lf->filename = lf->objname = n;
  lf->data = d;
  lf->length = len;
  lf->format = gv->dest_format;
  lf->type = ID_ARTIFICIAL;
  return create_objunit(gv,lf,n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x40
popq %rdi
callq 0x638a
movq %r15, 0x20(%rax)
movq %r15, 0x18(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x28(%rax)
movq %rbx, 0x30(%rax)
movb 0x50(%r12), %cl
movb %cl, 0x38(%rax)
movb $0x3, 0x39(%rax)
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb87e
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: add_objunit
void add_objunit(struct GlobalVars *gv,struct ObjectUnit *ou,bool fixrelocs)
/* adds an ObjectUnit to the approriate list */
{
  if (ou) {
    uint8_t t = ou->lnkfile->type;

    if (t==ID_LIBARCH && gv->whole_archive)
      t = ID_OBJECT;  /* force linking of a whole archive */

    switch (t) {
      case ID_OBJECT:
      case ID_EXECUTABLE:
        ou->flags |= OUF_LINKED;  /* objects are always linked */
        addtail(&gv->selobjects,&ou->n);
        break;
      case ID_LIBARCH:
        addtail(&gv->libobjects,&ou->n);
        break;
      case ID_SHAREDOBJ:
        addtail(&gv->sharedobjects,&ou->n);
        break;
      default:
        ierror("add_objunit(): Link File type = %d",
               (int)ou->lnkfile->type);
    }

    if (fixrelocs) {  /* convert section index into address */
      struct Section *sec;
      struct Reloc *r;
      uint32_t idx;

      for (sec=(struct Section *)ou->sections.first;
           sec->n.next!=NULL; sec=(struct Section *)sec->n.next) {
        for (r=(struct Reloc *)sec->relocs.first;
             r->n.next!=NULL; r=(struct Reloc *)r->n.next) {
          idx = r->relocsect.id;
          if ((r->relocsect.ptr = find_sect_id(ou,idx)) == NULL) {
            /* section with this index doesn't exist */
            error(52,ou->lnkfile->pathname,sec->name,getobjname(ou),(int)idx);
          }
        }
      }
    }
  }
}

// Assembly:
testq %rsi, %rsi
je 0xba40
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq 0x10(%rsi), %rax
movzbl 0x39(%rax), %esi
leal -0x1(%rsi), %eax
cmpl $0x2, %eax
jb 0xb994
cmpl $0x4, %esi
je 0xb9a4
cmpl $0x8, %esi
jne 0xb9ad
cmpl $0x0, 0x68(%rdi)
je 0xb9bd
orb $0x1, 0x80(%rbx)
addq $0x138, %rdi            # imm = 0x138
jmp 0xb9c4
addq $0x168, %rdi            # imm = 0x168
jmp 0xb9c4
leaq 0x14f0d(%rip), %rdi     # 0x208c1
xorl %eax, %eax
callq 0x6b2c
jmp 0xb9cc
addq $0x150, %rdi            # imm = 0x150
movq %rbx, %rsi
callq 0x6414
testl %ebp, %ebp
je 0xba32
leaq 0x20(%rbx), %r13
movq (%r13), %r13
cmpq $0x0, (%r13)
je 0xba32
leaq 0x50(%r13), %rbp
movq (%rbp), %rbp
cmpq $0x0, (%rbp)
je 0xb9d4
movl 0x18(%rbp), %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0xb783
movq %rax, 0x18(%rbp)
testq %rax, %rax
jne 0xb9e3
movq 0x10(%rbx), %rax
movq 0x10(%rax), %r15
movq 0x20(%r13), %r12
movq %rbx, %rdi
callq 0x6e1c
pushq $0x34
popq %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rax, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x6c19
jmp 0xb9e3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: create_section
struct Section *create_section(struct ObjectUnit *ou,const char *name,
                               uint8_t *data,unsigned long size)
/* creates and initializes a Section node */
{
  static uint32_t idcnt = 0;
  struct Section *s = alloczero(sizeof(struct Section));

  if (name)
    s->name = name;
  else
    s->name = noname;
  s->data = data;
  s->size = size;
  s->obj = ou;
  s->id = idcnt++;       /* target dependant - ELF replaces this with shndx */
  initlist(&s->relocs);  /* empty relocation list */
  initlist(&s->xrefs);   /* empty xref list */
  return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x98, %edi
callq 0x638a
movq %rax, %r13
testq %r15, %r15
leaq 0x14be3(%rip), %rax     # 0x20650
cmovneq %r15, %rax
movq %rax, 0x20(%r13)
movq %r14, 0x40(%r13)
movq %rbx, 0x48(%r13)
movq %r12, 0x10(%r13)
movl 0x27f6d(%rip), %eax     # 0x339f4
leal 0x1(%rax), %ecx
movl %ecx, 0x27f64(%rip)     # 0x339f4
movl %eax, 0x28(%r13)
leaq 0x50(%r13), %rdi
callq 0x63c8
leaq 0x68(%r13), %rdi
callq 0x63c8
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: add_section
struct Section *add_section(struct ObjectUnit *ou,const char *name,
                            uint8_t *data,unsigned long size,
                            uint8_t type,uint8_t flags,uint8_t protection,
                            uint8_t align,bool inv)
/* create a new section and add it to the object ou */
{
  struct Section *sec = create_section(ou,name,data,size);

  sec->type = type;
  sec->flags = flags;
  sec->protection = protection;
  sec->alignment = ou->min_alignment>align ? ou->min_alignment : align;
  if (inv)
    sec->id = INVALID;
  if (type != ST_TMP)  /* TMP sections must not be part of the link process */
    addtail(&ou->sections,&sec->n);
  return sec;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r15d
movl %r8d, %ebp
movq %rdi, %rbx
movl 0x48(%rsp), %r12d
movb 0x40(%rsp), %r13b
callq 0xba41
movq %rax, %r14
movb %bpl, 0x2c(%rax)
movb %r15b, 0x2d(%rax)
movb %r13b, 0x2e(%rax)
movzbl 0x82(%rbx), %eax
cmpb %r12b, %al
cmoval %eax, %r12d
movb %r12b, 0x2f(%r14)
cmpl $0x0, 0x50(%rsp)
je 0xbb03
orl $-0x1, 0x28(%r14)
cmpb $0x4, %bpl
je 0xbb18
addq $0x20, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6414
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: common_section
struct Section *common_section(struct GlobalVars *gv,struct ObjectUnit *ou)
/* returns the dummy section for COMMON symbols, or creates it */
{
  struct Section *s;

  if (!(s = ou->common)) {
    s = add_section(ou,gv->common_sec_name,NULL,0,ST_UDATA,
                    SF_ALLOC|SF_UNINITIALIZED,SP_READ|SP_WRITE,0,TRUE);
    ou->common = s;
  }
  return s;
}

// Assembly:
movq 0x38(%rsi), %rax
testq %rax, %rax
je 0xbb34
retq
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq 0x220(%rdi), %rsi
movl $0x1, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
movl $0x3, (%rsp)
pushq $0x3
popq %r8
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r8d, %r9d
callq 0xbab3
movq %rax, 0x38(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: scommon_section
struct Section *scommon_section(struct GlobalVars *gv,struct ObjectUnit *ou)
/* returns the dummy section for small-data COMMON symbols, or creates it */
{
  struct Section *s;

  if (!(s = ou->scommon)) {
    s = add_section(ou,gv->scommon_sec_name,NULL,0,ST_UDATA,
                    SF_ALLOC|SF_UNINITIALIZED,SP_READ|SP_WRITE,0,TRUE);
    if (ou->common)
      s->alignment = ou->common->alignment;  /* inherit .common alignment */
    ou->scommon = s;
  }
  return s;
}

// Assembly:
movq 0x40(%rsi), %rax
testq %rax, %rax
je 0xbb7e
retq
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq 0x228(%rdi), %rsi
movl $0x1, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
movl $0x3, (%rsp)
pushq $0x3
popq %r8
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r8d, %r9d
callq 0xbab3
movq 0x38(%rbx), %rcx
testq %rcx, %rcx
je 0xbbc3
movb 0x2f(%rcx), %cl
movb %cl, 0x2f(%rax)
movq %rax, 0x40(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: abs_section
struct Section *abs_section(struct ObjectUnit *ou)
/* return first section available or create a new one */
{
  struct Section *s;

  if (listempty(&ou->sections))
    s = add_section(ou,noname,NULL,0,ST_UDATA,
                    SF_ALLOC|SF_UNINITIALIZED,SP_READ|SP_WRITE,0,TRUE);
  else
    s = (struct Section *)ou->sections.first;

  return s;
}

// Assembly:
movq 0x20(%rdi), %rax
cmpq $0x0, (%rax)
je 0xbbd8
retq
subq $0x18, %rsp
movl $0x1, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
movl $0x3, (%rsp)
leaq 0x14a59(%rip), %rsi     # 0x20650
pushq $0x3
popq %r8
xorl %edx, %edx
xorl %ecx, %ecx
movl %r8d, %r9d
callq 0xbab3
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: dummy_section
struct Section *dummy_section(struct GlobalVars *gv,struct ObjectUnit *ou)
/* Make a dummy section already attached to a dummy-LinkedSection, which
   won't appear in any section lists.
   Can be used for relocatable linker symbols, which need a specific value. */
{
  struct Section *s;

  if (!(s = gv->dummysec)) {
    struct LinkedSection *ls = alloczero(sizeof(struct LinkedSection));

    s = add_section(ou,"*linker*",NULL,0,ST_TMP,
                    SF_ALLOC|SF_UNINITIALIZED,SP_READ|SP_WRITE,0,TRUE);
    s->lnksec = ls;
    ls->name = s->name;
    ls->type = s->type;
    ls->flags = s->flags;
    ls->protection = s->protection;
    ls->index = INVALID;
    initlist(&ls->sections);
    initlist(&ls->relocs);
    initlist(&ls->xrefs);
    initlist(&ls->symbols);
    gv->dummysec = s;
  }
  return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x1f0(%rdi), %r15
testq %r15, %r15
jne 0xbccc
movq %rsi, %r12
movq %rdi, %rbx
movl $0xc8, %edi
callq 0x638a
movq %rax, %r14
andl $0x0, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movl $0x3, (%rsp)
leaq 0x14c8f(%rip), %rsi     # 0x208e4
pushq $0x4
popq %r8
pushq $0x3
popq %r9
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xbab3
movq %rax, %r15
movq %r14, 0x18(%rax)
movq 0x20(%rax), %rax
movq %rax, 0x18(%r14)
movb 0x2c(%r15), %al
movb %al, 0x20(%r14)
movb 0x2d(%r15), %al
movb %al, 0x21(%r14)
movb 0x2e(%r15), %al
movb %al, 0x22(%r14)
orl $-0x1, 0x10(%r14)
leaq 0x60(%r14), %rdi
callq 0x63c8
leaq 0x80(%r14), %rdi
callq 0x63c8
leaq 0x98(%r14), %rdi
callq 0x63c8
addq $0xb0, %r14
movq %r14, %rdi
callq 0x63c8
movq %r15, 0x1f0(%rbx)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: create_lnksect
struct LinkedSection *create_lnksect(struct GlobalVars *gv,const char *name,
                                     uint8_t type,uint8_t flags,
                                     uint8_t protection,uint8_t alignment)
/* create and initialize a LinkedSection node and include */
/* it in the global list */
{
  struct LinkedSection *ls = alloczero(sizeof(struct LinkedSection));

  ls->index = gv->nsecs++;
  ls->name = name;
  ls->type = type;
  ls->flags = flags;
  ls->protection = protection;
  ls->alignment = alignment;
  initlist(&ls->sections);
  initlist(&ls->relocs);
  initlist(&ls->xrefs);
  initlist(&ls->symbols);
  addtail(&gv->lnksec,&ls->n);
  return ls;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %r15d
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %rbp
movq %rdi, %rbx
movl $0xc8, %edi
callq 0x638a
movq %rax, %r14
movl 0x1d8(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x1d8(%rbx)
movl %eax, 0x10(%r14)
movq %rbp, 0x18(%r14)
movb %r13b, 0x20(%r14)
movb %r12b, 0x21(%r14)
movb %r15b, 0x22(%r14)
movl 0x4(%rsp), %eax
movb %al, 0x23(%r14)
leaq 0x60(%r14), %rdi
callq 0x63c8
leaq 0x80(%r14), %rdi
callq 0x63c8
leaq 0x98(%r14), %rdi
callq 0x63c8
leaq 0xb0(%r14), %rdi
callq 0x63c8
addq $0x1c0, %rbx            # imm = 0x1C0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6414
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: smalldata_section
struct LinkedSection *smalldata_section(struct GlobalVars *gv)
/* Return pointer to first small data LinkedSection. If not existing, */
/* return first data/bss section or the first section. */
{
  struct LinkedSection *ls = (struct LinkedSection *)gv->lnksec.first;
  struct LinkedSection *ldls=NULL,*firstls=NULL,*nextls;

  while (nextls = (struct LinkedSection *)ls->n.next) {
    if ((ls->flags & SF_ALLOC) && ls->size!=0) {
      if (firstls == NULL)
        firstls = ls;
      if (ls->type==ST_DATA || ls->type==ST_UDATA && ldls==NULL)
        ldls = ls;
      if (ls->flags & SF_SMALLDATA)  /* first SD section found! */
        return ls;
    }
    ls = nextls;
  }
  return ldls ? ldls : firstls;
}

// Assembly:
movq 0x1c0(%rdi), %rsi
xorl %ecx, %ecx
xorl %edx, %edx
movq %rsi, %rax
movq (%rsi), %rsi
testq %rsi, %rsi
je 0xc2b5
movb 0x21(%rax), %dil
testb $0x1, %dil
je 0xc265
cmpq $0x0, 0x48(%rax)
je 0xc265
testq %rdx, %rdx
cmoveq %rax, %rdx
movb 0x20(%rax), %r8b
cmpb $0x2, %r8b
je 0xc2aa
cmpb $0x3, %r8b
sete %r8b
testq %rcx, %rcx
sete %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0xc2ad
movq %rax, %rcx
testb $0x4, %dil
je 0xc265
jmp 0xc2bf
testq %rcx, %rcx
cmovneq %rcx, %rdx
movq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: get_text_data_bss
void get_text_data_bss(struct GlobalVars *gv,struct LinkedSection **sections)
/* find exactly one ST_CODE, ST_DATA and ST_UDATA section, which
   will become .text, .data and .bss */
{
  static const char *fn = "get_text_data_bss(): ";
  struct LinkedSection *ls;

  sections[0] = sections[1] = sections[2] = NULL;
  for (ls=(struct LinkedSection *)gv->lnksec.first;
       ls->n.next!=NULL; ls=(struct LinkedSection *)ls->n.next) {
    if (ls->flags & SF_ALLOC) {
      switch (ls->type) {
        case ST_UNDEFINED:
          /* @@@ discard undefined sections - they are empty anyway */
          ls->flags &= ~SF_ALLOC;
          break;
        case ST_CODE:
          if (sections[0]==NULL)
            sections[0] = ls;
          else
            ierror("%sMultiple code sections (%s)",fn,ls->name);
          break;
        case ST_DATA:
          if (sections[1]==NULL)
            sections[1] = ls;
          else
            ierror("%sMultiple data sections (%s)",fn,ls->name);
          break;
        case ST_UDATA:
          if (sections[2]==NULL)
            sections[2] = ls;
          else
            ierror("%sMultiple bss sections (%s)",fn,ls->name);
          break;
        default:
          ierror("%sIllegal section type %d (%s)",fn,(int)ls->type,ls->name);
          break;
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x1c0, %r14            # imm = 0x1C0
andq $0x0, 0x10(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
leaq 0x1467b(%rip), %r15     # 0x20965
leaq 0x14605(%rip), %r12     # 0x208f6
leaq 0x14298(%rip), %rbp     # 0x20590
leaq 0x14649(%rip), %r13     # 0x20948
movq (%r14), %r14
cmpq $0x0, (%r14)
je 0xc3a2
movb 0x21(%r14), %al
testb $0x1, %al
je 0xc2ff
movzbl 0x20(%r14), %edx
cmpq $0x3, %rdx
ja 0xc372
movslq (%rbp,%rdx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
andb $-0x2, %al
movb %al, 0x21(%r14)
jmp 0xc2ff
cmpq $0x0, 0x8(%rbx)
je 0xc388
movq 0x18(%r14), %rdx
leaq 0x145e7(%rip), %rdi     # 0x2092a
jmp 0xc366
cmpq $0x0, 0x10(%rbx)
je 0xc391
movq 0x18(%r14), %rdx
movq %r13, %rdi
jmp 0xc366
cmpq $0x0, (%rbx)
je 0xc39a
movq 0x18(%r14), %rdx
leaq 0x145a6(%rip), %rdi     # 0x2090c
movq %r12, %rsi
xorl %eax, %eax
callq 0x6b2c
jmp 0xc2ff
movq 0x18(%r14), %rcx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x6b2c
jmp 0xc2ff
movq %r14, 0x8(%rbx)
jmp 0xc2ff
movq %r14, 0x10(%rbx)
jmp 0xc2ff
movq %r14, (%rbx)
jmp 0xc2ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: text_data_bss_gaps
void text_data_bss_gaps(struct LinkedSection **sections)
/* calculate gap size between text-data and data-bss */
{
  if (sections[0]) {
    unsigned long nextsecbase = sections[1] ? sections[1]->base :
                                (sections[2] ? sections[2]->base : 0);
    if (nextsecbase) {
      sections[0]->gapsize = nextsecbase -
                             (sections[0]->base + sections[0]->size);
    }
  }
  if (sections[1] && sections[2]) {
    sections[1]->gapsize = sections[2]->base -
                           (sections[1]->base + sections[1]->filesize);
  }
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
testq %rcx, %rcx
je 0xc3e6
movq %rax, %rdx
testq %rax, %rax
jne 0xc3ce
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xc407
movq 0x40(%rdx), %rdx
testq %rdx, %rdx
je 0xc3e6
movq 0x40(%rcx), %rsi
addq 0x48(%rcx), %rsi
subq %rsi, %rdx
movq %rdx, 0x58(%rcx)
testq %rax, %rax
je 0xc407
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0xc407
movq 0x40(%rcx), %rcx
movq 0x40(%rax), %rdx
addq 0x50(%rax), %rdx
subq %rdx, %rcx
movq %rcx, 0x58(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: discard_symbol
bool discard_symbol(struct GlobalVars *gv,struct Symbol *sym)
/* checks if symbol can be discarded and excluded from the output file */
{
  if (sym->flags & SYMF_PROTECTED)
    return FALSE;

  if (gv->strip_symbols < STRIP_ALL) {
    if (sym->bind!=SYMB_LOCAL || gv->discard_local==DISLOC_NONE)
      return FALSE;

    if (gv->discard_local==DISLOC_TMP) {
      char c = sym->name[0];

      if (!((c=='L' || c=='l' || c=='.') && isdigit((unsigned)sym->name[1])))
        return FALSE;
    }
  }
  return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testb $0x4, 0x41(%rsi)
jne 0xc464
cmpb $0x1, 0x6c(%rdi)
ja 0xc461
cmpb $0x1, 0x43(%rsi)
jne 0xc464
movzbl 0x6d(%rdi), %eax
testl %eax, %eax
je 0xc46e
cmpl $0x1, %eax
jne 0xc461
movq 0x20(%rsi), %r14
movzbl (%r14), %eax
addl $-0x2e, %eax
cmpl $0x3e, %eax
ja 0xc464
movabsq $0x4000000040000001, %rcx # imm = 0x4000000040000001
btq %rax, %rcx
jae 0xc464
callq 0x52a0
movq (%rax), %rax
movsbq 0x1(%r14), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0xc464
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %eax, %ebx
jmp 0xc464
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: entry_address
lword entry_address(struct GlobalVars *gv)
/* returns address of entry point for executables */
{
  struct Symbol *sym;
  struct LinkedSection *ls;

  if (gv->entry_name) {
    lword entry = 0;

    if (sym = findsymbol(gv,NULL,gv->entry_name)) {
      return (lword)sym->value;
    }
    else if (isdigit((unsigned char)*gv->entry_name)) {
      if (sscanf(gv->entry_name,"%lli",&entry) == 1)
        return entry;
    }
  }

  /* plan b: search for _start symbol: */
  if (sym = findsymbol(gv,NULL,"_start"))
      return (lword)sym->value;

  /* plan c: search for first executable section */
  if (ls = find_lnksec(gv,NULL,ST_CODE,SF_ALLOC,SF_ALLOC|SF_UNINITIALIZED,
                       SP_READ|SP_EXEC))
    return (lword)ls->base;

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xd0(%rdi), %rdx
testq %rdx, %rdx
je 0xc4ce
andq $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa220
testq %rax, %rax
jne 0xc4e4
callq 0x52a0
movq (%rax), %rax
movq 0xd0(%rbx), %rdi
movzbl (%rdi), %ecx
testb $0x8, 0x1(%rax,%rcx,2)
je 0xc4ce
leaq 0x11d90(%rip), %rsi     # 0x1e249
movq %rsp, %rdx
xorl %eax, %eax
callq 0x51e0
cmpl $0x1, %eax
jne 0xc4ce
movq (%rsp), %r14
jmp 0xc4e8
leaq 0x144af(%rip), %rdx     # 0x20984
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa220
testq %rax, %rax
je 0xc4f3
movq 0x30(%rax), %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %r14d, %r14d
pushq $0x1
popq %rcx
pushq $0x3
popq %r8
pushq $0x5
popq %r9
movq %rbx, %rdi
xorl %esi, %esi
movl %ecx, %edx
callq 0xb7e9
testq %rax, %rax
je 0xc4e8
movq 0x40(%rax), %r14
jmp 0xc4e8
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: bss_entry
struct Symbol *bss_entry(struct ObjectUnit *ou,const char *secname,
                         struct Symbol *xdef)
/* Create a BSS section in the object ou with space for xdef's size. 
   The symbol will be changed to the base address of this section and
   enqueued in the section's object symbol list.
   A size of 0 will leave the symbol untouched (no need to copy), which
   is indicated by returning NULL.
   This function is called for R_COPY objects, used for dynamic linking. */
{
  if (xdef->size) {
    /* change xdef to point to our new object in sec */
    unlink_objsymbol(xdef);
    xdef->value = 0;
    xdef->relsect = add_section(ou,secname,NULL,xdef->size,ST_UDATA,
                                SF_ALLOC|SF_UNINITIALIZED,
                                SP_READ|SP_WRITE,2,TRUE);
    add_objsymbol(ou,xdef);
    return xdef;
  }

  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, 0x44(%rdx)
je 0xc56f
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0xc57a
andq $0x0, 0x30(%rbx)
movl 0x44(%rbx), %ecx
subq $0x8, %rsp
pushq $0x3
popq %r8
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %r8d, %r9d
pushq $0x1
pushq $0x2
pushq $0x3
callq 0xbab3
addq $0x20, %rsp
movq %rax, 0x38(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc601
jmp 0xc571
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: unlink_objsymbol
static void unlink_objsymbol(struct Symbol *delsym)
/* unlink a symbol from an object unit's hash chain */
{
  const char *fn = "unlink_objsymbol():";
  struct ObjectUnit *ou = delsym->relsect ? delsym->relsect->obj : NULL;

  if (ou) {
    struct Symbol **chain = &ou->objsyms[elf_hash(delsym->name)%OBJSYMHTABSIZE];
    struct Symbol *sym;

    while (sym = *chain) {
      if (sym == delsym)
        break;
      chain = &sym->obj_chain;
    }
    if (sym) {
      /* unlink the symbol node from the chain */
      *chain = delsym->obj_chain;
      delsym->obj_chain = NULL;
    }
    else
      ierror("%s %s could not be found in any object",fn,delsym->name);
  }
  else
    ierror("%s %s has no object or section",fn,delsym->name);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0xc5d4
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xc5d4
movq 0x48(%rax), %r14
movq 0x20(%rbx), %rdi
callq 0x69ee
andl $0x1f, %eax
leaq (%r14,%rax,8), %rdx
movq %rdx, %rax
movq (%rdx), %rcx
testq %rcx, %rcx
je 0xc5bb
leaq 0x18(%rcx), %rdx
cmpq %rbx, %rcx
jne 0xc5a7
testq %rcx, %rcx
je 0xc5f4
movq 0x18(%rbx), %rcx
movq %rcx, (%rax)
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x20(%rbx), %rdx
leaq 0x1443b(%rip), %rdi     # 0x20a1a
leaq 0x143f9(%rip), %rsi     # 0x209df
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6b2c
movq 0x20(%rbx), %rdx
leaq 0x143f4(%rip), %rdi     # 0x209f3
jmp 0xc5df
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: add_objsymbol
static void add_objsymbol(struct ObjectUnit *ou,struct Symbol *newsym)
/* Add a symbol to an object unit's symbol table. The symbol name
   must be unique within the object, otherwise an internal error
   will occur! */
{
  struct Symbol *sym;
  struct Symbol **chain = &ou->objsyms[elf_hash(newsym->name)%OBJSYMHTABSIZE];

  while (sym = *chain) {
    if (!strcmp(newsym->name,sym->name))
      ierror("add_objsymbol(): %s defined twice",newsym->name);
    chain = &sym->obj_chain;
  }
  *chain = newsym;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x48(%rdi), %r14
movq 0x20(%rsi), %rdi
callq 0x69ee
andl $0x1f, %eax
leaq (%r14,%rax,8), %rax
leaq 0x14412(%rip), %r14     # 0x20a39
movq (%rax), %r12
testq %r12, %r12
je 0xc65a
movq 0x20(%rbx), %r15
movq 0x20(%r12), %rsi
movq %r15, %rdi
callq 0x5160
testl %eax, %eax
jne 0xc651
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x6b2c
addq $0x18, %r12
movq %r12, %rax
jmp 0xc627
movq %rbx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/targets.c
// Function: new_priptr
static void new_priptr(struct ObjectUnit *ou,const char *sec,const char *label,
                       int pri,const char *xref,lword addend)
/* Inserts a new longword into the object's PriPointers list. */
{
  struct PriPointer *newpp = alloc(sizeof(struct PriPointer));

  newpp->secname = sec;
  newpp->listname = label;
  newpp->priority = pri;
  newpp->xrefname = xref;
  newpp->addend = addend;
  addtail(&ou->pripointers,&newpp->n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x38
popq %rdi
callq 0x6340
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movl %ebp, 0x20(%rax)
movq %rbx, 0x28(%rax)
andq $0x0, 0x30(%rax)
addq $0x68, %r12
movq %r12, %rdi
movq %rax, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6414
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/ar.c
// Function: ar_init
bool ar_init(struct ar_info *ai,char *p,unsigned long plen,const char *name)
/* check for valid archive header and initialize ar_info, if successful */
{
  /* check for "!<arch>\n" id */
  if (plen<SARMAG || strncmp(p,ARMAG,SARMAG))
    return FALSE;

  memset(ai,0,sizeof(struct ar_hdr));
  ai->arname = (char *)name;
  ai->next = (struct ar_hdr *)(p+SARMAG);
  ai->arlen = plen - SARMAG;
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebp, %ebp
cmpq $0x8, %rdx
jb 0xc73a
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x14358(%rip), %rsi     # 0x20a5b
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x5070
testl %eax, %eax
jne 0xc73a
xorps %xmm0, %xmm0
andl $0x0, 0x38(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movq %r12, (%r14)
addq $0x8, %r15
movq %r15, 0x8(%r14)
addq $-0x8, %rbx
movq %rbx, 0x10(%r14)
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/ldscript.c
// Function: sf_addr
static int sf_addr(struct GlobalVars *gv,lword addr,lword *res)
{
  struct LinkedSection *ls;

  if (startofblock('(')) {
    if (ls = getsection(gv))
      *res = ls->base;
    endofblock('(',')');
  }
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
pushq $0x28
popq %rdi
callq 0xef1d
testl %eax, %eax
je 0xc9f1
movq %r14, %rdi
callq 0xef62
testq %rax, %rax
je 0xc9e6
movq 0x40(%rax), %rax
movq %rax, (%rbx)
pushq $0x28
popq %rdi
pushq $0x29
popq %rsi
callq 0xefde
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/ldscript.c
// Function: sf_align
static int sf_align(struct GlobalVars *gv,lword addr,lword *res)
{
  lword a = term_absexp();

  addr += a - 1;
  *res = addr - addr % a;
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
callq 0xf037
movq %rax, %rcx
leaq (%r14,%rax), %rsi
decq %rsi
movq %rsi, %rax
cqto
idivq %rcx
subq %rdx, %rsi
movq %rsi, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/ldscript.c
// Function: sf_loadaddr
static int sf_loadaddr(struct GlobalVars *gv,lword addr,lword *res)
{
  struct LinkedSection *ls;

  if (startofblock('(')) {
    if (ls = getsection(gv))
      *res = ls->copybase;
    endofblock('(',')');
  }
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
pushq $0x28
popq %rdi
callq 0xef1d
testl %eax, %eax
je 0xca62
movq %r14, %rdi
callq 0xef62
testq %rax, %rax
je 0xca57
movq 0x38(%rax), %rax
movq %rax, (%rbx)
pushq $0x28
popq %rdi
pushq $0x29
popq %rsi
callq 0xefde
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/ldscript.c
// Function: sf_sizeof
static int sf_sizeof(struct GlobalVars *gv,lword addr,lword *res)
{
  struct LinkedSection *ls;

  if (startofblock('(')) {
    if (ls = getsection(gv))
      *res = ls->size;
    endofblock('(',')');
  }
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
pushq $0x28
popq %rdi
callq 0xef1d
testl %eax, %eax
je 0xcaa2
movq %r14, %rdi
callq 0xef62
testq %rax, %rax
je 0xca97
movq 0x48(%rax), %rax
movq %rax, (%rbx)
pushq $0x28
popq %rdi
pushq $0x29
popq %rsi
callq 0xefde
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/ldscript.c
// Function: sf_sizeofheaders
static int sf_sizeofheaders(struct GlobalVars *gv,lword addr,lword *res)
{
  /* SIZEOF_HEADERS means that we want to include File- and PHDR in
     the first ELF segment */
  if (!find_phdr(gv,defhdr,defmem,defmem))
    add_phdr(gv,defhdr,PT_PHDR,PHDR_PHDRS,ADDR_NONE,defmem,defmem);

  *res = fff[gv->dest_format]->headersize(gv);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x26f5d(%rip), %r15     # 0x33a20
leaq 0x14121(%rip), %rsi     # 0x20beb
movq %r15, %rdx
movq %r15, %rcx
callq 0xdee8
testq %rax, %rax
jne 0xcafc
movq %r15, (%rsp)
leaq 0x14106(%rip), %rsi     # 0x20beb
pushq $0x6
popq %rdx
pushq $-0x1
popq %r8
movq %r14, %rdi
movl $0x400, %ecx            # imm = 0x400
movq %r15, %r9
callq 0xedf9
movzbl 0x50(%r14), %eax
leaq 0x22688(%rip), %rcx     # 0x2f190
movq (%rcx,%rax,8), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq %rax, (%rbx)
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq