LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0xba04
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
movq 0x208(%rdi), %r15
leaq 0x16ba8(%rip), %rsi     # 0x225bd
movq %r15, %rdi
callq 0xbb26
movq %rax, %r14
leaq 0x16b9d(%rip), %rsi     # 0x225c4
movq %r15, %rdi
callq 0xbb26
movzbl 0x203(%rbx), %esi
cmpl $0x2, %esi
jb 0xb9f5
je 0xba6f
cmpl $0x3, %esi
jne 0xbb0a
movq %rax, %r12
movq %r14, %r15
leaq 0x16e05(%rip), %rbp     # 0x22858
leaq 0x16e05(%rip), %r14     # 0x2285f
leaq 0x16e14(%rip), %rax     # 0x22875
movq %rax, 0x8(%rsp)
leaq 0x16df9(%rip), %r13     # 0x22866
jmp 0xba96
movq %rax, %r12
movq %r14, %r15
leaq 0x16ddb(%rip), %rbp     # 0x22857
leaq 0x16ddb(%rip), %r14     # 0x2285e
leaq 0x16dea(%rip), %rax     # 0x22874
movq %rax, 0x8(%rsp)
leaq 0x16dcf(%rip), %r13     # 0x22865
movq %rbx, %rdi
movl $0x1, %esi
movq %r13, %rdx
callq 0xbb65
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 0xbc05
addq $0x10, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xbb65
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 0xbc05
addq $0x28, %rsp
jmp 0xb9f9
leaq 0x16d72(%rip), %rdi     # 0x22883
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x52b0
// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
je 0xbb5a
movq %rdi, %r14
leaq 0x16a81(%rip), %rsi     # 0x225bd
callq 0x5160
testl %eax, %eax
je 0xbb5a
leaq 0x16a78(%rip), %rsi     # 0x225c4
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_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testl %esi, %esi
je 0xbbae
cmpq $0x0, 0x210(%r14)
jne 0xbbe7
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
callq 0xadaf
addq $0x10, %rsp
testq %rax, %rax
je 0xbbef
movq %rax, 0x210(%r14)
jmp 0xbbe7
cmpq $0x0, 0x218(%r14)
jne 0xbbe7
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
callq 0xadaf
addq $0x10, %rsp
testq %rax, %rax
je 0xbbef
movq %rax, 0x218(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x3b, %edi
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6f14
// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq %r9, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, (%rsp)
movq %rsi, 0x20(%rsp)
movq (%rsi), %r14
cmpq $0x0, (%r14)
je 0xbd70
movq 0x8(%rsp), %rdi
callq 0x50e0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x50e0
movslq %eax, %r13
movslq %ebx, %rax
movq %rax, 0x40(%rsp)
movq (%rsp), %rax
addq $0x138, %rax            # imm = 0x138
movq %rax, 0x18(%rsp)
leaq 0x68(%r14), %rax
movq %rax, 0x38(%rsp)
xorl %ecx, %ecx
movq %r14, 0x28(%rsp)
movq 0x48(%r14), %rax
movq %rcx, 0x30(%rsp)
movq (%rax,%rcx,8), %r12
testq %r12, %r12
je 0xbd34
cmpb $0x2, 0x43(%r12)
jne 0xbd2a
movq 0x20(%r12), %r15
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x5070
movq %r13, %rbx
movq 0x50(%rsp), %r14
movq 0x90(%rsp), %rbp
testl %eax, %eax
je 0xbcef
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rbx
movq %rbx, %rdx
callq 0x5070
movq 0x48(%rsp), %r14
movq 0x98(%rsp), %rbp
testl %eax, %eax
jne 0xbd2a
addq %r15, %rbx
movq %rbx, %rdi
callq 0xce28
movl %eax, %ebx
movl $0x38, %edi
callq 0x6638
movq %r14, 0x10(%rax)
movq %rbp, 0x18(%rax)
movl %ebx, 0x20(%rax)
movq %r15, 0x28(%rax)
movq $0x0, 0x30(%rax)
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x6729
movq 0x18(%r12), %r12
jmp 0xbc8b
movq 0x30(%rsp), %rcx
incq %rcx
cmpq $0x20, %rcx
movq 0x28(%rsp), %r14
jne 0xbc7e
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0xbd63
movq (%rsp), %rdi
movq %r14, %rsi
callq 0xb915
movq (%r14), %r14
cmpq $0x0, (%r14)
jne 0xbc6e
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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), %rdi
testq %rdi, %rdi
je 0xbdaa
movq %rcx, %rax
movq %rdi, %rcx
cmpb %sil, 0x2c(%rax)
jne 0xbd83
movb 0x2e(%rax), %dil
notb %dil
testb %dil, %dl
jne 0xbd83
testb $0x1, 0x2d(%rax)
je 0xbd83
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbdee
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x5160
testl %eax, %eax
jne 0xbdd1
jmp 0xbdf1
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbe97
testq %r12, %r12
je 0xbe5e
movq 0x18(%r13), %rdi
movq %r12, %rsi
callq 0x5160
xorl %edx, %edx
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
jmp 0xbe63
movl $0x1, %ecx
testb %r15b, %r15b
je 0xbe6f
cmpb %r15b, 0x20(%r13)
cmovnel %edx, %ecx
testb %bpl, %bpl
je 0xbe82
movb 0x21(%r13), %al
xorb 0x4(%rsp), %al
testb %bpl, %al
cmovnel %edx, %ecx
testb %bl, %bl
je 0xbe91
movb 0x22(%r13), %al
notb %al
testb %al, %bl
cmovnel %edx, %ecx
testl %ecx, %ecx
je 0xbe37
jmp 0xbe9a
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_O3/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 0x6638
movq %rax, %r14
movq %r12, 0x10(%rax)
testq %r15, %r15
leaq 0x16768(%rip), %rax     # 0x22640
cmovneq %r15, %rax
movq %rax, 0x18(%r14)
leaq 0x20(%r14), %rdi
callq 0x66da
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r14)
movl $0x20, %edi
callq 0x66bb
movq %rax, 0x48(%r14)
leaq 0x50(%r14), %rdi
callq 0x66da
leaq 0x68(%r14), %rdi
callq 0x66da
movw $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_O3/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
movl $0x40, %edi
callq 0x6686
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 0xbeac
// File: /workspace/github_c_makefile_star2_O3/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 0xc0a8
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 0xbfc7
cmpl $0x4, %esi
je 0xbfd7
cmpl $0x8, %esi
jne 0xbfe0
cmpl $0x0, 0x68(%rdi)
je 0xbff0
orb $0x1, 0x80(%rbx)
addq $0x138, %rdi            # imm = 0x138
jmp 0xbff7
addq $0x168, %rdi            # imm = 0x168
jmp 0xbff7
leaq 0x168ca(%rip), %rdi     # 0x228b1
xorl %eax, %eax
callq 0x52b0
jmp 0xbfff
addq $0x150, %rdi            # imm = 0x150
movq %rbx, %rsi
callq 0x6729
testl %ebp, %ebp
je 0xc09a
movq 0x20(%rbx), %r12
movq (%r12), %rcx
testq %rcx, %rcx
je 0xc09a
movq 0x50(%r12), %r13
movq (%r13), %rax
movq %rcx, %rdx
testq %rax, %rax
je 0xc08f
movl 0x18(%r13), %ebp
movq 0x20(%rbx), %rcx
movq %rcx, %rdx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xc047
cmpl %ebp, 0x28(%rdx)
jne 0xc031
movq %rdx, 0x18(%r13)
jmp 0xc080
movq $0x0, 0x18(%r13)
movq 0x10(%rbx), %rax
movq 0x10(%rax), %r14
movq 0x20(%r12), %r15
movq %rbx, %rdi
callq 0x7104
movl $0x34, %edi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x6f14
movq (%r13), %rax
movq %rax, %r13
movq (%rax), %rax
testq %rax, %rax
jne 0xc029
movq (%r12), %rdx
movq (%rdx), %rcx
movq %rdx, %r12
jmp 0xc00f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6686
movq %rax, %r13
testq %r15, %r15
leaq 0x1656b(%rip), %rax     # 0x22640
cmovneq %r15, %rax
movq %rax, 0x20(%r13)
movq %r14, 0x40(%r13)
movq %rbx, 0x48(%r13)
movq %r12, 0x10(%r13)
movl 0x27515(%rip), %eax     # 0x33604
leal 0x1(%rax), %ecx
movl %ecx, 0x2750c(%rip)     # 0x33604
movl %eax, 0x28(%r13)
leaq 0x50(%r13), %rdi
callq 0x66da
leaq 0x68(%r13), %rdi
callq 0x66da
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xc0a9
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 0xc16e
movl $0xffffffff, 0x28(%r14) # imm = 0xFFFFFFFF
cmpb $0x4, %bpl
je 0xc183
addq $0x20, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6729
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_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq 0x38(%rsi), %r14
testq %r14, %r14
jne 0xc1e7
movq %rsi, %rbx
movq 0x220(%rdi), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xc0a9
movq %rax, %r14
movw $0x303, 0x2c(%rax)      # imm = 0x303
movb $0x3, 0x2e(%rax)
movb 0x82(%rbx), %al
movb %al, 0x2f(%r14)
movl $0xffffffff, 0x28(%r14) # imm = 0xFFFFFFFF
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x6729
movq %r14, 0x38(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq 0x40(%rsi), %r14
testq %r14, %r14
jne 0xc254
movq %rsi, %rbx
movq 0x228(%rdi), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xc0a9
movq %rax, %r14
movw $0x303, 0x2c(%rax)      # imm = 0x303
movb $0x3, 0x2e(%rax)
movb 0x82(%rbx), %al
movb %al, 0x2f(%r14)
movl $0xffffffff, 0x28(%r14) # imm = 0xFFFFFFFF
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x6729
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0xc250
movb 0x2f(%rax), %al
movb %al, 0x2f(%r14)
movq %r14, 0x40(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
movq 0x20(%rdi), %r14
cmpq $0x0, (%r14)
jne 0xc2af
movq %rdi, %rbx
leaq 0x20(%rdi), %r15
leaq 0x163c4(%rip), %rsi     # 0x22640
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xc0a9
movq %rax, %r14
movw $0x303, 0x2c(%rax)      # imm = 0x303
movb $0x3, 0x2e(%rax)
movb 0x82(%rbx), %al
movb %al, 0x2f(%r14)
movl $0xffffffff, 0x28(%r14) # imm = 0xFFFFFFFF
movq %r15, %rdi
movq %r14, %rsi
callq 0x6729
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq 0x1f0(%rdi), %r14
testq %r14, %r14
jne 0xc36d
movq %rsi, %r12
movq %rdi, %rbx
movl $0xc8, %edi
callq 0x6686
movq %rax, %r15
leaq 0x165ea(%rip), %rsi     # 0x228d4
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xc0a9
movq %rax, %r14
movw $0x304, %ax             # imm = 0x304
movw %ax, 0x2c(%r14)
movb $0x3, %cl
movb %cl, 0x2e(%r14)
movb 0x82(%r12), %dl
movb %dl, 0x2f(%r14)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, 0x28(%r14)
movq %r15, 0x18(%r14)
movq 0x20(%r14), %rsi
movq %rsi, 0x18(%r15)
movw %ax, 0x20(%r15)
movb %cl, 0x22(%r15)
movl %edx, 0x10(%r15)
leaq 0x60(%r15), %rdi
callq 0x66da
leaq 0x80(%r15), %rdi
callq 0x66da
leaq 0x98(%r15), %rdi
callq 0x66da
addq $0xb0, %r15
movq %r15, %rdi
callq 0x66da
movq %r14, 0x1f0(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6686
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 0x66da
leaq 0x80(%r14), %rdi
callq 0x66da
leaq 0x98(%r14), %rdi
callq 0x66da
leaq 0xb0(%r14), %rdi
callq 0x66da
addq $0x1c0, %rbx            # imm = 0x1C0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6729
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_O3/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
movq (%rsi), %rdi
testq %rdi, %rdi
je 0xca18
xorl %ecx, %ecx
xorl %edx, %edx
movq %rsi, %rax
movq %rdi, %rsi
movb 0x21(%rax), %dil
testb $0x1, %dil
je 0xca0e
cmpq $0x0, 0x48(%rax)
je 0xca0e
testq %rcx, %rcx
cmoveq %rax, %rcx
movb 0x20(%rax), %r8b
cmpb $0x2, %r8b
je 0xca05
cmpb $0x3, %r8b
sete %r8b
testq %rdx, %rdx
sete %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0xca08
movq %rax, %rdx
testb $0x4, %dil
jne 0xca26
movq (%rsi), %rdi
testq %rdi, %rdi
jne 0xc9c5
jmp 0xca1c
xorl %edx, %edx
xorl %ecx, %ecx
testq %rdx, %rdx
cmovneq %rdx, %rcx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq 0x1c0(%rdi), %r12
cmpq $0x0, (%r12)
je 0xcb13
movq %rsi, %rbx
leaq 0x15ef9(%rip), %r14     # 0x22955
leaq 0x15e83(%rip), %r15     # 0x228e6
leaq 0x15b16(%rip), %r13     # 0x22580
leaq 0x15ec7(%rip), %rbp     # 0x22938
movb 0x21(%r12), %al
testb $0x1, %al
je 0xcb04
movzbl 0x20(%r12), %edx
cmpq $0x3, %rdx
ja 0xcae1
movslq (%r13,%rdx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
andb $-0x2, %al
movb %al, 0x21(%r12)
jmp 0xcb04
cmpq $0x0, 0x8(%rbx)
je 0xcaf5
movq 0x18(%r12), %rdx
leaq 0x15e6a(%rip), %rdi     # 0x2291a
jmp 0xcad5
cmpq $0x0, 0x10(%rbx)
je 0xcafb
movq 0x18(%r12), %rdx
movq %rbp, %rdi
jmp 0xcad5
cmpq $0x0, (%rbx)
je 0xcb01
movq 0x18(%r12), %rdx
leaq 0x15e27(%rip), %rdi     # 0x228fc
movq %r15, %rsi
xorl %eax, %eax
callq 0x52b0
jmp 0xcb04
movq 0x18(%r12), %rcx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x52b0
jmp 0xcb04
movq %r12, 0x8(%rbx)
jmp 0xcb04
movq %r12, 0x10(%rbx)
jmp 0xcb04
movq %r12, (%rbx)
movq (%r12), %r12
cmpq $0x0, (%r12)
jne 0xca71
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xcb57
movq %rax, %rdx
testq %rax, %rax
jne 0xcb3f
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xcb78
movq 0x40(%rdx), %rdx
testq %rdx, %rdx
je 0xcb57
movq 0x40(%rcx), %rsi
addq 0x48(%rcx), %rsi
subq %rsi, %rdx
movq %rdx, 0x58(%rcx)
testq %rax, %rax
je 0xcb78
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0xcb78
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_O3/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 0xcbd7
cmpb $0x1, 0x6c(%rdi)
ja 0xcbd2
cmpb $0x1, 0x43(%rsi)
jne 0xcbd7
movzbl 0x6d(%rdi), %eax
testl %eax, %eax
je 0xcbe1
cmpl $0x1, %eax
jne 0xcbd2
movq 0x20(%rsi), %r14
movzbl (%r14), %eax
addl $-0x2e, %eax
cmpl $0x3e, %eax
ja 0xcbd7
movabsq $0x4000000040000001, %rcx # imm = 0x4000000040000001
btq %rax, %rcx
jae 0xcbd7
callq 0x5290
movq (%rax), %rax
movsbq 0x1(%r14), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0xcbd7
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %eax, %ebx
jmp 0xcbd7
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xd0(%rdi), %rdx
testq %rdx, %rdx
je 0xcc49
movq $0x0, 0x8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa728
testq %rax, %rax
jne 0xcc5f
callq 0x5290
movq (%rax), %rax
movq 0xd0(%rbx), %rdi
movzbl (%rdi), %ecx
testb $0x8, 0x1(%rax,%rcx,2)
je 0xcc49
leaq 0x13618(%rip), %rsi     # 0x20249
leaq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x51e0
cmpl $0x1, %eax
jne 0xcc49
movq 0x8(%rsp), %rax
jmp 0xcc63
leaq 0x15d24(%rip), %rdx     # 0x22974
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa728
testq %rax, %rax
je 0xcc69
movq 0x30(%rax), %rax
addq $0x10, %rsp
popq %rbx
retq
movq 0x1c0(%rbx), %rcx
xorl %eax, %eax
movq %rcx, %rdx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xcc63
movb 0x22(%rdx), %sil
notb %sil
testb $0x5, %sil
jne 0xcc72
movb 0x21(%rdx), %sil
andb $0x3, %sil
cmpb $0x1, %sil
jne 0xcc72
cmpb $0x1, 0x20(%rdx)
jne 0xcc72
movq 0x40(%rdx), %rax
jmp 0xcc63
// File: /workspace/github_c_makefile_star2_O3/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 0xcd21
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0xcd2c
movq $0x0, 0x30(%rbx)
movl 0x44(%rbx), %ecx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xc0a9
movq %rax, %r15
movw $0x303, 0x2c(%rax)      # imm = 0x303
movb $0x3, 0x2e(%rax)
movzbl 0x82(%r14), %eax
cmpb $0x3, %al
movl $0x2, %ecx
cmovael %eax, %ecx
movb %cl, 0x2f(%r15)
movl $0xffffffff, 0x28(%r15) # imm = 0xFFFFFFFF
leaq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0x6729
movq %r15, 0x38(%rbx)
movq 0x48(%r14), %rdi
movq %rbx, %rsi
callq 0xcdb6
jmp 0xcd23
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xcd89
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xcd89
movq 0x48(%rax), %r14
movq 0x20(%rbx), %rdi
callq 0x6d94
andl $0x1f, %eax
leaq (%r14,%rax,8), %rdx
movq %rdx, %rax
movq (%rdx), %rcx
testq %rcx, %rcx
je 0xcd6d
leaq 0x18(%rcx), %rdx
cmpq %rbx, %rcx
jne 0xcd59
testq %rcx, %rcx
je 0xcda9
movq 0x18(%rbx), %rcx
movq %rcx, (%rax)
movq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x20(%rbx), %rdx
leaq 0x15c76(%rip), %rdi     # 0x22a0a
leaq 0x15c34(%rip), %rsi     # 0x229cf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x52b0
movq 0x20(%rbx), %rdx
leaq 0x15c2f(%rip), %rdi     # 0x229e3
jmp 0xcd94
// File: /workspace/github_c_makefile_star2_O3/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 %rdi, %r14
movq 0x20(%rsi), %rdi
callq 0x6d94
andl $0x1f, %eax
movq (%r14,%rax,8), %rcx
testq %rcx, %rcx
je 0xce14
leaq 0x15c49(%rip), %r14     # 0x22a29
movq %rcx, %r12
movq 0x20(%rbx), %r15
movq 0x20(%rcx), %rsi
movq %r15, %rdi
callq 0x5160
testl %eax, %eax
jne 0xce04
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x52b0
movq 0x18(%r12), %rcx
testq %rcx, %rcx
jne 0xcde0
addq $0x18, %r12
jmp 0xce18
leaq (%r14,%rax,8), %r12
movq %rbx, (%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xceb5
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x15bd4(%rip), %rsi     # 0x22a4b
movl $0x8, %edx
movq %r15, %rdi
callq 0x5070
testl %eax, %eax
jne 0xceb5
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movl $0x0, 0x38(%r14)
movq %r12, (%r14)
addq $0x8, %r15
movq %r15, 0x8(%r14)
addq $-0x8, %rbx
movq %rbx, 0x10(%r14)
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x28, %edi
callq 0xf8fc
testl %eax, %eax
je 0xd177
movq %r14, %rdi
callq 0xf947
testq %rax, %rax
je 0xd168
movq 0x40(%rax), %rax
movq %rax, (%rbx)
movl $0x28, %edi
movl $0x29, %esi
callq 0xf9cc
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xfa2a
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_O3/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
movl $0x28, %edi
callq 0xf8fc
testl %eax, %eax
je 0xd1f0
movq %r14, %rdi
callq 0xf947
testq %rax, %rax
je 0xd1e1
movq 0x38(%rax), %rax
movq %rax, (%rbx)
movl $0x28, %edi
movl $0x29, %esi
callq 0xf9cc
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x28, %edi
callq 0xf8fc
testl %eax, %eax
je 0xd238
movq %r14, %rdi
callq 0xf947
testq %rax, %rax
je 0xd229
movq 0x48(%rax), %rax
movq %rax, (%rbx)
movl $0x28, %edi
movl $0x29, %esi
callq 0xf9cc
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x263d5(%rip), %r15     # 0x33630
movq 0x1f8(%rdi), %rdi
leaq 0x15972(%rip), %rsi     # 0x22bdb
movq %r15, %rdx
movq %r15, %rcx
callq 0xe73f
testq %rax, %rax
jne 0xd2a0
movq %r15, (%rsp)
leaq 0x15957(%rip), %rsi     # 0x22bdb
movq %r14, %rdi
movl $0x6, %edx
movl $0x400, %ecx            # imm = 0x400
movq $-0x1, %r8
movq %r15, %r9
callq 0xf7c0
movzbl 0x50(%r14), %eax
leaq 0x21ed4(%rip), %rcx     # 0x2f180
movq (%rcx,%rax,8), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq %rax, (%rbx)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/ldscript.c
// Function: sc_entry
static void sc_entry(struct GlobalVars *gv)
/* ENTRY(symbol or address) */
{
  if (startofblock('(')) {
    char *entryname;

    if (entryname = getalnum()) {
      if (gv->entry_name == NULL)
        gv->entry_name = allocstring(entryname);
    }
    else
      error(78,scriptname,getlineno());
    endofblock('(',')');
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0xf8fc
testl %eax, %eax
je 0xd30e
movl $0x3, %edi
callq 0xff64
testq %rax, %rax
je 0xd310
cmpq $0x0, 0xd0(%rbx)
jne 0xd32d
movq %rax, %rdi
callq 0x669d
movq %rax, 0xd0(%rbx)
jmp 0xd32d
popq %rbx
retq
movq 0x26309(%rip), %rbx     # 0x33620
callq 0x103d5
movl $0x4e, %edi
movq %rbx, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x6f14
movl $0x28, %edi
movl $0x29, %esi
popq %rbx
jmp 0xf9cc
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/ldscript.c
// Function: sc_extern
static void sc_extern(struct GlobalVars *gv)
/* EXTERN(symbol [symbol...]) */
{
  if (startofblock('(')) {
    char c;

    do {
      char *name = getword();

      if (*name)
        add_symnames(&gv->undef_syms,allocstring(name));
      else
        error(78,scriptname,getlineno());   /* missing argument */

      if (c = getchr())
        back(1);
    }
    while (c!='\0' && c!=')');

    endofblock('(',')');
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0xf8fc
testl %eax, %eax
je 0xd3c8
addq $0xb8, %rbx
movl $0x1, %edi
callq 0xff64
cmpb $0x0, (%rax)
je 0xd37d
movq %rax, %rdi
callq 0x669d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6ec5
jmp 0xd39a
movq 0x2629c(%rip), %r14     # 0x33620
callq 0x103d5
movl $0x4e, %edi
movq %r14, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x6f14
callq 0xfeed
testb %al, %al
je 0xd3b5
movl %eax, %ebp
movl $0x1, %edi
callq 0xff51
cmpb $0x29, %bpl
jne 0xd359
movl $0x28, %edi
movl $0x29, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xf9cc
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/ldscript.c
// Function: sc_fill
static void sc_fill(struct GlobalVars *gv)
/* FILL(data16) */
{
  if (startofblock('(')) {
    lword val;

    if (parse_expr(preparse ? -1 : 0,&val))
      gv->filldata = (uint16_t)(val & 0xffff);
    else
      error(67,scriptname,getlineno());  /* Absolute number expected */
    endofblock('(',')');
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x28, %edi
callq 0xf8fc
testl %eax, %eax
je 0xd438
movzbl 0x26276(%rip), %edi     # 0x33660
andl $0x1, %edi
negq %rdi
leaq 0x8(%rsp), %rsi
callq 0x1004a
testl %eax, %eax
je 0xd40c
movzwl 0x8(%rsp), %eax
movw %ax, 0x200(%rbx)
jmp 0xd429
movq 0x2620d(%rip), %rbx     # 0x33620
callq 0x103d5
movl $0x43, %edi
movq %rbx, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x6f14
movl $0x28, %edi
movl $0x29, %esi
callq 0xf9cc
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/ldscript.c
// Function: sc_input
static void sc_input(struct GlobalVars *gv)
/* INPUT(file1 [file2...]) */
{
  if (startofblock('(')) {
    char c,*fname;

    while (fname = getfilename()) {
      struct InputFile *ifn = alloc(sizeof(struct InputFile));

      if (strlen(fname)>2 && !strncmp(fname,"-l",2)) {
        fname += 2;
        while (isspace((unsigned)*fname))
          fname++;
        ifn->lib = TRUE;
        ifn->dynamic = gv->dynamic;
        ifn->so_ver = 0;  /* @@@ */
      }
      else
        ifn->lib = FALSE;
      ifn->name = allocstring(fname);
      ifn->flags = 0;  /* @@@ add support for clr/set flags? */
      addtail(&gv->inputlist,&ifn->n);

      if ((c = getchr()) == ',')
        continue;
      back(1);
      if (c=='\0' || c==')')
        break;
    }

    endofblock('(',')');
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0xf8fc
testl %eax, %eax
je 0xd543
callq 0xfb3b
testq %rax, %rax
je 0xd52c
movq %rax, %r15
leaq 0x18(%rbx), %r14
movl $0x28, %edi
callq 0x6638
movq %rax, %r12
movq %r15, %rdi
callq 0x50e0
movl $0x18, %ecx
cmpq $0x3, %rax
jb 0xd4d0
cmpb $0x2d, (%r15)
jne 0xd4d0
cmpb $0x6c, 0x1(%r15)
jne 0xd4d0
callq 0x5290
movq (%rax), %rax
incq %r15
movsbq 0x1(%r15), %rcx
incq %r15
testb $0x20, 0x1(%rax,%rcx,2)
jne 0xd4a8
movl $0x1, 0x18(%r12)
movl 0x240(%rbx), %eax
movl %eax, 0x1c(%r12)
movl $0x20, %ecx
movl $0x0, (%r12,%rcx)
movq %r15, %rdi
callq 0x669d
movq %rax, 0x10(%r12)
movw $0x0, 0x24(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x6729
callq 0xfeed
cmpb $0x2c, %al
je 0xd51b
movl %eax, %ebp
movl $0x1, %edi
callq 0xff51
cmpb $0x29, %bpl
je 0xd52c
movzbl %bpl, %eax
testl %eax, %eax
je 0xd52c
callq 0xfb3b
movq %rax, %r15
testq %rax, %rax
jne 0xd470
movl $0x28, %edi
movl $0x29, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf9cc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq