LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32i386.c
// Function: aros_targetlink
static int aros_targetlink(struct GlobalVars *gv,struct LinkedSection *ls,
                           struct Section *s)
/* returns 1, if target requires the combination of the two sections, */
/* returns -1, if target doesn't want to combine them, */
/* returns 0, if target doesn't care - standard linking rules are used. */
{
  if (!gv->dest_object && !gv->use_ldscript) {
    if ((!strncmp(ls->name,sdata_name,6) && !strncmp(s->name,sbss_name,5)
         && *(ls->name+6) == *(s->name+5)) ||
        (!strncmp(ls->name,sbss_name,5) && !strncmp(s->name,sdata_name,6)
         && *(ls->name+5) == *(s->name+6)))
      /* .sdata/.sbss, .sdata2/.sbss2, etc. are always combined */
      return (1);
  }
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, 0x54(%rdi)
jne 0x1a922
cmpl $0x0, 0x244(%rdi)
jne 0x1a922
movq %rdx, %r14
movq 0x18(%rsi), %rbx
leaq 0x7cfc(%rip), %rsi      # 0x225a1
movl $0x6, %edx
movq %rbx, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1a8e0
movq 0x20(%r14), %r15
leaq 0x7ce7(%rip), %rsi      # 0x225a8
movl $0x5, %edx
movq %r15, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1a8e0
movb 0x6(%rbx), %cl
movl $0x1, %eax
cmpb 0x5(%r15), %cl
je 0x1a924
leaq 0x7cc1(%rip), %rsi      # 0x225a8
movl $0x5, %edx
movq %rbx, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1a922
movq 0x20(%r14), %r14
leaq 0x7c9e(%rip), %rsi      # 0x225a1
movl $0x6, %edx
movq %r14, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1a922
movb 0x5(%rbx), %cl
movl $0x1, %eax
cmpb 0x6(%r14), %cl
je 0x1a924
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32i386.c
// Function: aros_lnksym
static struct Symbol *aros_lnksym(struct GlobalVars *gv,struct Section *sec,
                                  struct Reloc *xref)
{
  struct Symbol *sym;

  if (!gv->dest_object && !gv->use_ldscript) {
    if (!strcmp(linkerdb,xref->xrefname)) {  /* _LinkerDB */
      sym = addlnksymbol(gv,linkerdb,(lword)fff[gv->dest_format]->baseoff,
                         SYM_RELOC,SYMF_LNKSYM,SYMI_OBJECT,SYMB_GLOBAL,0);
      sym->extra = SYMX_SPECIAL|LINKERDB;
      if (findlnksymbol(gv,sdabase_name) == NULL) {
        /* Reference to _LinkerDB creates _SDA_BASE_ */
        struct Symbol *sdabase = addlnksymbol(gv,sdabase_name,
                                              (lword)fff[gv->dest_format]->baseoff,
                                              SYM_ABS,SYMF_LNKSYM,
                                              SYMI_OBJECT,SYMB_GLOBAL,0);
        sdabase->type = SYM_RELOC;
        sdabase->extra = SDABASE;
      }
      return (sym);  /* new linker symbol created */
    }
  }

  return (elf32_lnksym(gv,sec,xref));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0x54(%rdi)
jne 0x1a95b
cmpl $0x0, 0x244(%rbx)
jne 0x1a95b
movq 0x10(%r14), %rsi
leaq 0x15466(%rip), %rdi     # 0x2fdb8
callq 0x5160
testl %eax, %eax
je 0x1a96e
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x15760
movzbl 0x50(%rbx), %eax
leaq 0x14807(%rip), %r15     # 0x2f180
movq (%r15,%rax,8), %rax
movslq 0x9c(%rax), %rdx
leaq 0x1542d(%rip), %rsi     # 0x2fdb8
movq %rbx, %rdi
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
callq 0xadaf
addq $0x10, %rsp
movq %rax, %r14
movl $0x80000000, 0x48(%rax) # imm = 0x80000000
leaq 0x7c18(%rip), %rsi      # 0x225d5
movq %rbx, %rdi
callq 0xae55
testq %rax, %rax
jne 0x1aa0c
movzbl 0x50(%rbx), %eax
movq (%r15,%rax,8), %rax
movslq 0x9c(%rax), %rdx
xorl %r15d, %r15d
leaq 0x7bf2(%rip), %rsi      # 0x225d5
movq %rbx, %rdi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq %r15
pushq $0x2
callq 0xadaf
addq $0x10, %rsp
movb $0x2, 0x40(%rax)
movl %r15d, 0x48(%rax)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32i386.c
// Function: aros_setlnksym
static void aros_setlnksym(struct GlobalVars *gv,struct Symbol *xdef)
{
  if ((xdef->flags & SYMF_LNKSYM) && (xdef->extra & SYMX_SPECIAL)) {
    struct LinkedSection *ls;

    switch (xdef->extra & ~SYMX_SPECIAL) {
      case LINKERDB:
        ls = smalldata_section(gv);
        xdef->relsect = (struct Section *)ls->sections.first;
        break;
    }
    xdef->flags &= ~SYMF_LNKSYM;  /* do not init again */
  }
  else
    elf32_setlnksym(gv,xdef);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movb 0x41(%rsi), %al
testb $0x1, %al
je 0x1aa27
movl 0x48(%rbx), %ecx
testl %ecx, %ecx
js 0x1aa30
movq %rbx, %rsi
popq %rbx
jmp 0x15868
testl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jne 0x1aa48
callq 0xc9b2
movq 0x60(%rax), %rax
movq %rax, 0x38(%rbx)
movb 0x41(%rbx), %al
andb $-0x2, %al
movb %al, 0x41(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32i386.c
// Function: aros_writeexec
static void aros_writeexec(struct GlobalVars *gv,FILE *f)
/* creates a target-elfaros executable file, which in reality */
/* is a relocatable object too, but all symbol references have */
/* been resolved */
{
  struct LinkedSection *ls;

  for (ls=(struct LinkedSection *)gv->lnksec.first; ls->n.next!=NULL;
       ls=(struct LinkedSection *)ls->n.next) {
    /* set filesize to memsize for all sections */
    if (!(ls->flags & SF_UNINITIALIZED))
      ls->filesize = ls->size;
  }

  elf32_writeobject(gv,f,EM_386,_LITTLE_ENDIAN_,i386_reloc_vlink2elf);
}

// Assembly:
movq 0x1c0(%rdi), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x1aa98
movq %rcx, %rdx
testb $0x2, 0x21(%rax)
jne 0x1aa90
movq 0x48(%rax), %rcx
movq %rcx, 0x50(%rax)
movq (%rdx), %rcx
movq %rdx, %rax
jmp 0x1aa7a
leaq 0x3e(%rip), %r8         # 0x1aadd
movl $0x3, %edx
xorl %ecx, %ecx
jmp 0x186f7
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32arm.c
// Function: armle_readconv
static void armle_readconv(struct GlobalVars *gv,struct LinkFile *lf)
/* Read ELF-ARM little-endian executable / object / shared obj. */
{
  if (lf->type == ID_LIBARCH) {
    struct ar_info ai;

    if (ar_init(&ai,(char *)lf->data,lf->length,lf->filename)) {
      while (ar_extract(&ai)) {
        lf->objname = allocstring(ai.name);
        elf32_check_ar_type(fff[lf->format],lf->pathname,
                            (struct Elf32_Ehdr *)ai.data,
                            ELFCLASS32,ELFDATA2LSB,ELF_VER,1,EM_ARM);
        elf32_parse(gv,lf,(struct Elf32_Ehdr *)ai.data,armle_reloc_elf2vlink);
      }
    }
    else
      ierror("armle_readconv(): archive %s corrupted since last access",
             lf->pathname);
  }
  else {
    lf->objname = lf->filename;
    elf32_parse(gv,lf,(struct Elf32_Ehdr *)lf->data,armle_reloc_elf2vlink);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x8, 0x39(%rsi)
jne 0x1ac10
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
callq 0xce54
testl %eax, %eax
je 0x1ac3f
movq %rsp, %rdi
callq 0xcec0
testl %eax, %eax
je 0x1ac51
leaq 0x20(%rsp), %r15
leaq 0x145df(%rip), %rbp     # 0x2f180
leaq 0xfb(%rip), %r12        # 0x1aca3
movq %rsp, %r13
movq %r15, %rdi
callq 0x669d
movq %rax, 0x20(%rbx)
movzbl 0x38(%rbx), %eax
movq (%rbp,%rax,8), %rdi
movq 0x10(%rbx), %rsi
movq 0x128(%rsp), %rdx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
xorl %eax, %eax
pushq $0x28
pushq $0x1
callq 0x13eca
addq $0x10, %rsp
movq 0x128(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x148e5
movq %r13, %rdi
callq 0xcec0
testl %eax, %eax
jne 0x1abab
jmp 0x1ac51
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
leaq 0x80(%rip), %rcx        # 0x1aca3
movq %r14, %rdi
movq %rbx, %rsi
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x148e5
movq 0x10(%rbx), %rsi
leaq 0x98c2(%rip), %rdi      # 0x2450c
xorl %eax, %eax
callq 0x52b0
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_identify
int aout_identify(struct FFFuncs *ff,char *name,struct aout_hdr *p,
                  unsigned long plen)
/* check a possible a.out file against the requirements, then */
/* return its type (object, library, shared object) */
{
  uint32_t mid = ff->id;
  bool arflag = FALSE;

  if (plen < ff->headersize(0))  /* @@@ gv-ptr is not needed for a.out ! */
    return (ID_UNKNOWN);

  if (ar_init(&ai,(char *)p,plen,name)) {
    /* library archive detected, extract 1st archive member */
    arflag = TRUE;
    if (!(ar_extract(&ai))) {
      error(38,name);  /* Empty archive ignored */
      return (ID_IGNORE);
    }
    p = (struct aout_hdr *)ai.data;
  }

  if (GETMID(p) == mid) {
    uint32_t mag = GETMAGIC(p);
    int fl = GETFLAGS(p) & EX_DPMASK;

    if (mag==OMAGIC || mag==NMAGIC || mag==ZMAGIC || mag==QMAGIC) {
      /* valid a.out format for this machine detected! */
      switch (mag) {
        case OMAGIC:
          return (arflag ? ID_LIBARCH : ID_OBJECT);
        case NMAGIC:
        case ZMAGIC:
          if (arflag) {
            if (fl == EX_DYNAMIC|EX_PIC)
              error(39,name,ff->tname); /* no shared objects in lib archives */
            else
              error(40,name,ff->tname); /* no executables in lib archives */
          }
          if (fl == EX_DYNAMIC|EX_PIC)
            return (ID_SHAREDOBJ);
          return (ID_EXECUTABLE);
        case QMAGIC:
          error(84,name); /* QMAGIC is deprecated */
          break;
      }
    }
  }
  return (ID_UNKNOWN);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl 0xa4(%rdi), %ebp
xorl %ebx, %ebx
xorl %edi, %edi
callq *0x18(%r15)
cmpq %r13, %rax
ja 0x1b143
leaq 0x1895b(%rip), %rdi     # 0x339c8
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xce54
movl %eax, %r13d
testl %eax, %eax
je 0x1b099
leaq 0x1893f(%rip), %rdi     # 0x339c8
callq 0xcec0
testl %eax, %eax
je 0x1b0f1
movq 0x18a57(%rip), %r12     # 0x33af0
movq %r12, %rdi
callq 0x6929
shrl $0x10, %eax
andl $0x3ff, %eax            # imm = 0x3FF
cmpl %ebp, %eax
jne 0x1b143
movl %r13d, %ebp
movq %r12, %rdi
callq 0x6929
movl %eax, %r13d
movq %r12, %rdi
callq 0x6929
movzwl %r13w, %eax
cmpl $0x107, %eax            # imm = 0x107
jg 0x1b107
cmpl $0xcc, %eax
je 0x1b132
cmpl $0x107, %eax            # imm = 0x107
jne 0x1b143
testl %ebp, %ebp
movl $0x1, %eax
movl $0x8, %ebx
cmovel %eax, %ebx
jmp 0x1b143
movl $0x26, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6f14
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1b143
cmpl $0x108, %eax            # imm = 0x108
je 0x1b115
cmpl $0x10b, %eax            # imm = 0x10B
jne 0x1b143
movl $0x4, %ebx
testl %ebp, %ebp
je 0x1b143
movq (%r15), %rdx
movl $0x27, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6f14
jmp 0x1b143
xorl %ebx, %ebx
movl $0x54, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6f14
movl %ebx, %eax
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/t_aout.c
// Function: aout_lnksym
struct Symbol *aout_lnksym(struct GlobalVars *gv,struct Section *sec,
                           struct Reloc *xref)
/* Check for common a.out linker symbols. */
{
  struct Symbol *sym;
  int i;

  if (!gv->dest_object) {
    for (i=0; i<AOUTSTD_LNKSYMS; i++) {
      if (!strcmp(aout_symnames[i],xref->xrefname)) {
        sym = addlnksymbol(gv,aout_symnames[i],0,SYM_ABS,
                           SYMF_LNKSYM,SYMI_OBJECT,SYMB_GLOBAL,0);
        sym->extra = i; /* for easy ident. in aout_setlnksym */
        switch (i) {
          case GOTSYM:
            gv->got_base_name = aout_symnames[i];
            sym->type = SYM_RELOC;
            break;
          case PLTSYM:
            gv->got_base_name = aout_symnames[i];
            sym->type = SYM_RELOC;
            break;
          case DYNAMICSYM:
            break;
        }
        return (sym);  /* new linker symbol created */
      }
    }
  }
  return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x54(%rdi)
je 0x1b176
xorl %r14d, %r14d
jmp 0x1b1eb
movq %rdi, %rbx
movq 0x10(%rdx), %r12
leaq 0x13c3c(%rip), %rbp     # 0x2edc0
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x5160
testl %eax, %eax
je 0x1b1ac
incq %r13
addq $0x8, %rbp
cmpq $0x3, %r13
jne 0x1b18a
jmp 0x1b1eb
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
callq 0xadaf
addq $0x10, %rsp
movq %rax, %r14
movl %r13d, 0x48(%rax)
cmpq $0x2, %r13
jae 0x1b1eb
movq %r15, 0x230(%rbx)
movb $0x2, 0x40(%r14)
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/t_aout.c
// Function: aoutstd_readconv
void aoutstd_readconv(struct GlobalVars *gv,struct LinkFile *lf)
/* Read a.out executable / object / shared obj. with standard relocs */
{
  if (lf->type == ID_LIBARCH) {
    if (ar_init(&ai,(char *)lf->data,lf->length,lf->filename)) {
      while (ar_extract(&ai)) {
        lf->objname = allocstring(ai.name);
        aoutstd_read(gv,lf,(struct aout_hdr *)ai.data);
      }
    }
    else
      ierror("aoutstd_readconv(): archive %s corrupted since last access",
             lf->pathname);
  }
  else {
    lf->objname = lf->filename;
    aoutstd_read(gv,lf,(struct aout_hdr *)lf->data);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x8, 0x39(%rsi)
jne 0x1c4d1
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
leaq 0x17554(%rip), %rdi     # 0x339c8
callq 0xce54
testl %eax, %eax
je 0x1c4f3
leaq 0x17544(%rip), %rdi     # 0x339c8
callq 0xcec0
testl %eax, %eax
je 0x1c4c5
leaq 0x17554(%rip), %r15     # 0x339e8
leaq 0x1752d(%rip), %r12     # 0x339c8
movq %r15, %rdi
callq 0x669d
movq %rax, 0x20(%rbx)
movq 0x17642(%rip), %rdx     # 0x33af0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b96d
movq %r12, %rdi
callq 0xcec0
testl %eax, %eax
jne 0x1c49b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1b96d
movq 0x10(%rbx), %rsi
leaq 0x8490(%rip), %rdi      # 0x2498e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x52b0
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_initwrite
void aout_initwrite(struct GlobalVars *gv,struct LinkedSection **sections)
{
  static const char *fn = "aout_initwrite(): ";
  struct LinkedSection *ls;

  initlist(&aoutstrlist.l);
  aoutstrlist.hashtab = alloczero(STRHTABSIZE*sizeof(struct StrTabNode *));
  aoutstrlist.nextoffset = 4;  /* first string is always at offset 4 */
  initlist(&aoutsymlist.l);
  aoutsymlist.hashtab = alloczero(SYMHTABSIZE*sizeof(struct SymbolNode *));
  aoutsymlist.nextindex = 0;
  initlist(&treloclist);
  initlist(&dreloclist);

  get_text_data_bss(gv,sections);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x175d9(%rip), %rdi     # 0x33b00
callq 0x66da
movl $0x80000, %edi          # imm = 0x80000
callq 0x6686
movq %rax, 0x175db(%rip)     # 0x33b18
movl $0x4, 0x175d9(%rip)     # 0x33b20
leaq 0x175da(%rip), %rdi     # 0x33b28
callq 0x66da
movl $0x80000, %edi          # imm = 0x80000
callq 0x6686
movq %rax, 0x175dc(%rip)     # 0x33b40
movl $0x0, 0x175da(%rip)     # 0x33b48
leaq 0x175db(%rip), %rdi     # 0x33b50
callq 0x66da
leaq 0x175e7(%rip), %rdi     # 0x33b68
callq 0x66da
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xca27
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_debugsyms
void aout_debugsyms(struct GlobalVars *gv,bool be)
/* add debug stab-entries to symbol table, sorted by ObjectUnits */
{
  struct ObjectUnit *obj;
  struct StabDebug *stab;

  if (gv->strip_symbols < STRIP_DEBUG) {
    for (obj=(struct ObjectUnit *)gv->selobjects.first;
         obj->n.next!=NULL; obj=(struct ObjectUnit *)obj->n.next) {
      for (stab=(struct StabDebug *)obj->stabs.first;
           stab->n.next!=NULL; stab=(struct StabDebug *)stab->n.next) {
        aout_addsym(stab->name.ptr,stab->n_value,stab->n_othr&0xf,
                    (stab->n_othr>>4)&0xf,stab->n_type,stab->n_desc,be);
      }
    }
  }
}

// Assembly:
cmpb $0x0, 0x6c(%rdi)
je 0x1c80f
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x138(%rdi), %r14
movq (%r14), %rax
testq %rax, %rax
je 0x1c877
movl %esi, %ebx
movq 0x50(%r14), %r15
cmpq $0x0, (%r15)
movq %rax, %rcx
je 0x1c86c
movq 0x18(%r15), %rdi
movl 0x24(%r15), %esi
movzbl 0x21(%r15), %edx
movl %edx, %eax
shrb $0x4, %al
movzbl 0x20(%r15), %r8d
movswl 0x22(%r15), %r9d
movl %ebx, (%rsp)
andl $0xf, %edx
movzbl %al, %ecx
callq 0x1c881
movq (%r15), %r15
cmpq $0x0, (%r15)
jne 0x1c836
movq (%r14), %rcx
movq (%rcx), %rax
movq %rcx, %r14
testq %rax, %rax
jne 0x1c829
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_addsym
static uint32_t aout_addsym(const char *name,uint32_t value,uint8_t bind,
                           uint8_t info,uint8_t type,int16_t desc,int be)
/* add a new symbol, return its symbol table index */
{
  struct SymbolNode **chain;
  struct SymbolNode *sym;

  if (name == NULL)
    name = noname;

  chain = &aoutsymlist.hashtab[elf_hash(name)%SYMHTABSIZE];
  while (sym = *chain)
    chain = &sym->hashchain;
  /* new symbol table entry */
  *chain = sym = alloczero(sizeof(struct SymbolNode));

  sym->name = name;
  sym->index = aoutsymlist.nextindex++;
  write32(be,&sym->s.n_strx,aout_addstr(name));
  sym->s.n_type = type;
  /* @@@ GNU binutils don't use BIND_LOCAL/GLOBAL in a.out files! We do! */
  sym->s.n_other = ((bind&0xf)<<4) | (info&0xf);
  write16(be,&sym->s.n_desc,desc);
  write32(be,&sym->s.n_value,value);
  addtail(&aoutsymlist.l,&sym->n);
  return (sym->index);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, (%rsp)
movl %r8d, %r13d
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, 0x4(%rsp)
movq %rdi, %rbp
testq %rdi, %rdi
jne 0x1c8ac
leaq 0x5d94(%rip), %rbp      # 0x22640
movq 0x1728d(%rip), %rbx     # 0x33b40
movq %rbp, %rdi
callq 0x6d94
movzwl %ax, %eax
leaq (%rbx,%rax,8), %rax
movq %rax, %r12
movq (%rax), %rcx
leaq 0x10(%rcx), %rax
testq %rcx, %rcx
jne 0x1c8c2
movl $0x30, %edi
callq 0x6686
movq %rax, %rbx
movq %rax, (%r12)
movq %rbp, 0x18(%rax)
movl 0x1725c(%rip), %eax     # 0x33b48
leal 0x1(%rax), %ecx
movl %ecx, 0x17253(%rip)     # 0x33b48
movl %eax, 0x2c(%rbx)
movq 0x17219(%rip), %r12     # 0x33b18
movq %rbp, %rdi
callq 0x6d94
cmpb $0x0, (%rbp)
je 0x1c93c
movzwl %ax, %ecx
movq (%r12,%rcx,8), %rax
testq %rax, %rax
je 0x1c940
movq %rax, %r12
movq 0x18(%rax), %rsi
movq %rbp, %rdi
callq 0x5160
testl %eax, %eax
je 0x1c994
movq 0x10(%r12), %rax
testq %rax, %rax
jne 0x1c919
addq $0x10, %r12
jmp 0x1c944
xorl %edx, %edx
jmp 0x1c99c
leaq (%r12,%rcx,8), %r12
movl $0x28, %edi
callq 0x6638
movq %rax, (%r12)
movq $0x0, 0x10(%rax)
movq %rbp, 0x18(%rax)
leaq 0x1719b(%rip), %rdi     # 0x33b00
movl 0x171b5(%rip), %ecx     # 0x33b20
leaq 0x20(%rax), %r12
movl %ecx, 0x20(%rax)
movq %rax, %rsi
callq 0x6729
movq %rbp, %rdi
callq 0x50e0
movl 0x17198(%rip), %ecx     # 0x33b20
addl %ecx, %eax
incl %eax
movl %eax, 0x1718e(%rip)     # 0x33b20
jmp 0x1c998
addq $0x20, %r12
movl (%r12), %edx
leaq 0x20(%rbx), %rsi
movl 0x40(%rsp), %ebp
movl %ebp, %edi
callq 0x69a0
movb %r13b, 0x24(%rbx)
shlb $0x4, %r15b
andb $0xf, %r14b
orb %r15b, %r14b
movb %r14b, 0x25(%rbx)
leaq 0x26(%rbx), %rsi
movzwl (%rsp), %edx
movl %ebp, %edi
callq 0x698b
movq %rbx, %rsi
addq $0x28, %rsi
movl %ebp, %edi
movl 0x4(%rsp), %edx
callq 0x69a0
leaq 0x17142(%rip), %rdi     # 0x33b28
movq %rbx, %rsi
callq 0x6729
movl 0x2c(%rbx), %eax
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/t_aout.c
// Function: detect_movei_relocs
static void detect_movei_relocs(struct Reloc *first)
/* Search for possible MOVEI RISC relocations and flag them by the
   internal type R_AOUT_MOVEI. */
{
  struct Reloc *r;
  struct RelocInsert *ri;

  for (r=first; r->n.next!=NULL; r=(struct Reloc *)r->n.next) {
    if (r->rtype==R_ABS && (ri = r->insert)) {
      if (ri->bpos==0 && !ri->next && ri->bsiz==16 && ri->mask==0xffff0000) {
        /* Found a MOVEI reloc candidate. The 16-bit word to the left needs
           another 16-bit reloc with mask=0xffff and the same addend
           to confirm it! */
        unsigned long off = r->offset - 2;
        struct Reloc *r2;

        for (r2=first; r2->n.next!=NULL; r2=(struct Reloc *)r2->n.next) {
          if (r2->offset==off && r2->rtype==R_ABS && (ri = r2->insert)) {
            if (ri->bpos==0 && !ri->next && ri->bsiz==16 && ri->mask==0xffff) {
              /* MOVEI reloc with swapped words found */
              r2->rtype = R_AOUT_MOVEI;
              r->rtype = R_NONE;
              break;
            }
          }
        }
      }
    }
  }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x1cd38
movl $0xffff0000, %ecx       # imm = 0xFFFF0000
movq %rax, %r8
movq %rdi, %rdx
movq %rdx, %rsi
movq %r8, %rdx
cmpb $0x1, 0x38(%rsi)
jne 0x1cd1f
movq 0x30(%rsi), %r8
testq %r8, %r8
je 0x1cd1f
cmpw $0x0, 0x8(%r8)
jne 0x1cd1f
cmpq $0x0, (%r8)
jne 0x1cd1f
cmpw $0x10, 0xa(%r8)
jne 0x1cd1f
cmpq %rcx, 0x10(%r8)
jne 0x1cd1f
movq 0x20(%rsi), %r8
addq $-0x2, %r8
movq %rax, %r11
movq %rdi, %r9
movq %r9, %r10
movq %r11, %r9
cmpq %r8, 0x20(%r10)
jne 0x1cd17
cmpb $0x1, 0x38(%r10)
jne 0x1cd17
movq 0x30(%r10), %r11
testq %r11, %r11
je 0x1cd17
cmpw $0x0, 0x8(%r11)
jne 0x1cd17
cmpq $0x0, (%r11)
jne 0x1cd17
cmpw $0x10, 0xa(%r11)
jne 0x1cd17
cmpq $0xffff, 0x10(%r11)     # imm = 0xFFFF
je 0x1cd2d
movq (%r9), %r11
testq %r11, %r11
jne 0x1ccdb
movq (%rdx), %r8
testq %r8, %r8
jne 0x1cc9c
jmp 0x1cd38
movb $0x11, 0x38(%r10)
movb $0x0, 0x38(%rsi)
jmp 0x1cd1f
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_addreloclist
static void aout_addreloclist(struct list *rlst,int32_t raddr,uint32_t rindex,
                              uint32_t rinfo,int be)
/* add new relocation_info to .text or .data reloc-list */
{
  struct RelocNode *rn = alloc(sizeof(struct RelocNode));

  write32(be,&rn->r.r_address,(uint32_t)raddr);
  writebf32(be,&rn->r.r_info,RELB_symbolnum,RELS_symbolnum,rindex);
  writebf32(be,&rn->r.r_info,RELB_reloc,RELS_reloc,rinfo);
  addtail(rlst,&rn->n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r14d
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
movl $0x18, %edi
callq 0x6638
movq %rax, %r13
leaq 0x10(%rax), %rsi
movl %r14d, %edi
movl %r12d, %edx
callq 0x69a0
leaq 0x14(%r13), %r12
movl %r14d, %edi
movq %r12, %rsi
xorl %edx, %edx
movl $0x18, %ecx
movl %r15d, %r8d
callq 0x6b40
movl %r14d, %edi
movq %r12, %rsi
movl $0x18, %edx
movl $0x8, %ecx
movl %ebp, %r8d
callq 0x6b40
movq %rbx, %rdi
movq %r13, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6729
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_header
void aout_header(FILE *f,uint32_t mag,uint32_t mid,uint32_t flag,
                 uint32_t tsize,uint32_t dsize,uint32_t bsize,uint32_t syms,
                 uint32_t entry,uint32_t trsize,uint32_t drsize,int be)
/* write an a.out header */
{
  struct aout_hdr h;

  SETMIDMAG(&h,mag,mid,flag);
  write32(be,h.a_text,tsize);
  write32(be,h.a_data,dsize);
  write32(be,h.a_bss,bsize);
  write32(be,h.a_syms,syms);
  write32(be,h.a_entry,entry);
  write32(be,h.a_trsize,trsize);
  write32(be,h.a_drsize,drsize);
  fwritex(f,&h,sizeof(struct aout_hdr));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r15d
movl %r8d, %ebp
movq %rdi, %rbx
movl 0x60(%rsp), %r13d
movl 0x88(%rsp), %r14d
shll $0x1a, %ecx
shll $0x10, %edx
andl $0x3ff0000, %edx        # imm = 0x3FF0000
leal (%rdx,%rcx), %eax
movzwl %si, %esi
orl %eax, %esi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x693d
leaq 0xc(%rsp), %rsi
movl %r14d, %edi
movl %ebp, %edx
callq 0x69a0
leaq 0x10(%rsp), %rsi
movl %r14d, %edi
movl %r15d, %edx
callq 0x69a0
leaq 0x14(%rsp), %rsi
movl %r14d, %edi
movl %r13d, %edx
callq 0x69a0
leaq 0x18(%rsp), %rsi
movl %r14d, %edi
movl 0x68(%rsp), %edx
callq 0x69a0
leaq 0x1c(%rsp), %rsi
movl %r14d, %edi
movl 0x70(%rsp), %edx
callq 0x69a0
leaq 0x20(%rsp), %rsi
movl %r14d, %edi
movl 0x78(%rsp), %edx
callq 0x69a0
leaq 0x24(%rsp), %rsi
movl %r14d, %edi
movl 0x80(%rsp), %edx
callq 0x69a0
movl $0x20, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6ba5
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_getpagedsize
uint32_t aout_getpagedsize(struct GlobalVars *gv,struct LinkedSection **ls,
                         int sec)
/* return size of section aligned to page boundaries */
{
  unsigned long pagealign = shiftcnt(fff[gv->dest_format]->page_size);

  if (sec == 0) {  /* .text */
    if (ls[1]) {  /* followed by .data */
      check_overlap(gv,ls[0],ls[1]);
      return ((ls[1]->base - ls[0]->base) + sizeof(struct aout_hdr));
    }
    else { /* align section size to page boundary */
      check_overlap(gv,ls[0],ls[2]);
      return (ls[0]->size + sizeof(struct aout_hdr) +
              align(ls[0]->base+ls[0]->size,pagealign));
    }
  }
  else if (sec == 1) {  /* .data */
    if (ls[1]) {
      check_overlap(gv,ls[1],ls[2]);
      return (ls[1]->size + align(ls[1]->base+ls[1]->size,pagealign));
    }
  }
  else if (ls[2]) {  /* .bss */
    /* parts of .bss might disappear in the last .text or .data page */
    unsigned long bytes_in_last_page = align(ls[2]->base,pagealign);

    if (bytes_in_last_page < ls[2]->size)
      return (ls[2]->size - bytes_in_last_page);
  }

  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movzbl 0x50(%rdi), %eax
leaq 0x122d4(%rip), %rcx     # 0x2f180
movq (%rcx,%rax,8), %rax
movl 0x98(%rax), %edi
callq 0x6dff
movslq %eax, %r14
cmpl $0x1, %ebp
je 0x1cef0
testl %ebp, %ebp
jne 0x1cf20
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x1cf4a
movq %r15, %rdi
callq 0x1cf7e
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movl 0x40(%rcx), %ebx
subl 0x40(%rax), %ebx
addl $0x20, %ebx
jmp 0x1cf71
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x1cf46
movq 0x10(%rbx), %rdx
movq %r15, %rdi
callq 0x1cf7e
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rbx
movq 0x40(%rax), %rdi
addq %rbx, %rdi
movq %r14, %rsi
callq 0x6dcb
addl %eax, %ebx
jmp 0x1cf71
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x1cf46
movq 0x40(%rax), %rdi
movq %r14, %rsi
callq 0x6dcb
movq 0x10(%rbx), %rcx
movq 0x48(%rcx), %rbx
cmpq %rax, %rbx
jbe 0x1cf46
subl %eax, %ebx
jmp 0x1cf71
xorl %ebx, %ebx
jmp 0x1cf71
movq 0x10(%rbx), %rdx
movq %r15, %rdi
callq 0x1cf7e
movq (%rbx), %rax
movq 0x48(%rax), %rbx
movq %rbx, %rdi
addq 0x40(%rax), %rdi
movq %r14, %rsi
callq 0x6dcb
addl %eax, %ebx
addl $0x20, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_pagedsection
void aout_pagedsection(struct GlobalVars *gv,FILE *f,
                       struct LinkedSection **ls,int sec)
/* write .text and .data section aligned to page boundaries */
{
  if (ls[sec]) {
    fwritex(f,ls[sec]->data,ls[sec]->size);
    fwritegap(f,aout_getpagedsize(gv,ls,sec) -
              (sec ? ls[sec]->size : ls[sec]->size+sizeof(struct aout_hdr)));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movslq %ecx, %r14
movq (%rdx,%r14,8), %rax
testq %rax, %rax
je 0x1d02f
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq 0x48(%rax), %rdx
movq 0x78(%rax), %rsi
movq %rbx, %rdi
callq 0x6ba5
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x1ce92
movq (%r15,%r14,8), %rcx
movq 0x48(%rcx), %rcx
leaq 0x20(%rcx), %rdx
testl %r14d, %r14d
cmovneq %rcx, %rdx
movl %eax, %esi
subq %rdx, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6d33
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_writestrings
void aout_writestrings(FILE *f,int be)
{
  if (aoutstrlist.nextoffset > 4) {
    struct StrTabNode *stn;
    uint32_t len;

    write32(be,&len,aoutstrlist.nextoffset);
    fwritex(f,&len,4);
    while (stn = (struct StrTabNode *)remhead(&aoutstrlist.l))
      fwritex(f,stn->str,strlen(stn->str)+1);
  }
}

// Assembly:
movl 0x16a2c(%rip), %edx     # 0x33b20
cmpl $0x5, %edx
jb 0x1d16d
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl %esi, %edi
movq %r14, %rsi
callq 0x69a0
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6ba5
leaq 0x169d5(%rip), %rdi     # 0x33b00
callq 0x673f
testq %rax, %rax
je 0x1d164
leaq 0x169c4(%rip), %r14     # 0x33b00
movq 0x18(%rax), %r15
movq %r15, %rdi
callq 0x50e0
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6ba5
movq %r14, %rdi
callq 0x673f
testq %rax, %rax
jne 0x1d13c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: isPIC
static bool isPIC(struct LinkedSection **secs)
/* check if all sections contain position independant code (PIC) */
{
  int i;

  for (i=0; i<3; i++) {
    if (secs[i]) {
      struct Reloc *r;

      for (r=(struct Reloc *)secs[i]->relocs.first; r->n.next!=NULL;
           r=(struct Reloc *)r->n.next) {
        if (r->rtype == R_ABS)
          return (FALSE);
      }
      for (r=(struct Reloc *)secs[i]->xrefs.first; r->n.next!=NULL;
           r=(struct Reloc *)r->n.next) {
        if (r->rtype == R_ABS)
          return (FALSE);
      }
    }
  }
  return (TRUE);
}

// Assembly:
xorl %eax, %eax
movq (%rdi,%rax,8), %rcx
testq %rcx, %rcx
je 0x1d56e
movq 0x80(%rcx), %rdx
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x1d554
cmpb $0x1, 0x38(%rdx)
movq %rsi, %rdx
jne 0x1d541
jmp 0x1d57d
movq 0x98(%rcx), %rcx
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x1d56e
cmpb $0x1, 0x38(%rcx)
movq %rdx, %rcx
jne 0x1d55b
jmp 0x1d57d
incq %rax
cmpq $0x3, %rax
jne 0x1d531
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_create_section
static void aout_create_section(struct ObjectUnit *ou,struct FFFuncs *ff,
                                const char *sec_name,uint8_t *data,
                                unsigned long size,uint8_t type)
{
  struct LinkFile *lf = ou->lnkfile;
  uint8_t flags=0,protection;

  if (type != ST_UDATA) {
    if (data+size > lf->data+lf->length)  /* illegal section offset */
      error(49,lf->pathname,sec_name,lf->objname);
  }

  switch (type) {
    case ST_CODE:
      protection = SP_READ|SP_EXEC;
      break;
    case ST_DATA:
      protection = SP_READ|SP_WRITE;
      break;
    case ST_UDATA:
      protection = SP_READ|SP_WRITE;
      flags = SF_UNINITIALIZED;
      break;
  }
  add_section(ou,sec_name,data,size,type,flags|SF_ALLOC,
              protection,MIN_ALIGNMENT,FALSE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movb $0x3, %al
movb $0x3, %cl
cmpl $0x3, %r8d
je 0x1d7ea
movq 0x10(%r12), %rax
leaq (%r14,%rbx), %rcx
movq 0x28(%rax), %rdx
addq 0x30(%rax), %rdx
cmpq %rdx, %rcx
jbe 0x1d7dc
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rcx
movl $0x31, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x6f14
cmpb $0x1, %bpl
sete %cl
addb %cl, %cl
addb $0x3, %cl
movb $0x1, %al
subq $0x8, %rsp
movzbl %cl, %r10d
movzbl %bpl, %r8d
movzbl %al, %r9d
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
pushq $0x0
pushq $0x2
pushq %r10
callq 0xc11b
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: get_symname
static char *get_symname(struct LinkFile *lf,struct aout_hdr *hdr,int be,
                         int32_t offset)
{
  char *symname = ((char *)hdr) + aout_stroffset(hdr,be) + offset;

  if (((uint8_t *)symname < lf->data) ||
      ((uint8_t *)symname > (lf->data + lf->length)))  /* illegal offset? */
    error(87,lf->pathname,offset,lf->objname);

  return (symname);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
movl %edx, %esi
callq 0x1d74e
movl %eax, %r15d
leaq 0x10(%r12), %rsi
movl %ebp, %edi
callq 0x696f
addl %r15d, %eax
movslq %ebx, %r15
addq %r12, %r15
addq %rax, %r15
movq 0x28(%r14), %rax
cmpq %rax, %r15
jb 0x1d8b3
addq 0x30(%r14), %rax
cmpq %rax, %r15
jbe 0x1d8c9
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rcx
movl $0x57, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x6f14
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_ataritos.c
// Function: write_dri_sym
static void write_dri_sym(FILE *f,const char *name,
                          uint16_t type,uint32_t value)
{
  struct DRIsym stab;
  int longname = strlen(name) > DRI_NAMELEN;

  strncpy(stab.name,name,DRI_NAMELEN);
  write16be(stab.type,longname?(type|STYP_LONGNAME):type);
  write32be(stab.value,value);
  fwritex(f,&stab,sizeof(struct DRIsym));

  if (longname) {
    char rest_of_name[sizeof(struct DRIsym)];

    memset(rest_of_name,0,sizeof(struct DRIsym));
    strncpy(rest_of_name,name+DRI_NAMELEN,sizeof(struct DRIsym));
    fwritex(f,rest_of_name,sizeof(struct DRIsym));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x50e0
movq %rax, %r15
leaq 0xc(%rsp), %r13
movl $0x8, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x5060
movl %r12d, %esi
orl $0x48, %esi
cmpq $0x9, %r15
leaq 0x14(%rsp), %rdi
cmovbl %r12d, %esi
callq 0x6935
leaq 0x16(%rsp), %rdi
movl %ebp, %esi
callq 0x693d
movl $0xe, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6ba5
cmpq $0x9, %r15
jb 0x1e260
addq $0x8, %r14
leaq 0x1a(%rsp), %r15
movl $0xe, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x5060
movl $0xe, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6ba5
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_rawbin.c
// Function: shex1_write
static void shex1_write(struct GlobalVars *gv,FILE *f)
{
  bool firstsec = TRUE;
  struct LinkedSection *ls;
  unsigned long len,addr;
  uint8_t *p;

  while (ls = get_next_section(gv)) {
    if (ls->size == 0 || !(ls->flags & SF_ALLOC) || (ls->ld_flags & LSF_NOLOAD))
      continue;  /* ignore empty sections */

    if (firstsec) {
      if (gv->trace_file)
        fprintf(gv->trace_file,"Base address = 0x%08lx.\n",ls->copybase);
      firstsec = FALSE;
    }

    /* resolve all relocations and write section contents */
    calc_relocs(gv,ls);

    for (p=ls->data,addr=ls->copybase,len=ls->filesize; len>0; ) {
      int nbytes = (len>32) ? 32 : len;

      SHex1Out(f,addr,p,nbytes);
      p += nbytes;
      addr += nbytes;
      len -= nbytes;
    }
  }
  fprintf(f,"000000 0\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r13
movq 0x1c0(%rdi), %rdi
callq 0x1e849
testq %rax, %rax
je 0x1e664
movq %rax, %r15
leaq 0x75c9(%rip), %r12      # 0x25ae0
xorl %r14d, %r14d
cmpq $0x0, 0x48(%r15)
je 0x1e52f
testb $0x1, 0x21(%r15)
je 0x1e52f
testb $0x1, 0x24(%r15)
je 0x1e548
movq 0x1c0(%r13), %rdi
callq 0x1e849
movq %rax, %r15
testq %rax, %rax
jne 0x1e51a
jmp 0x1e664
testb $0x1, %r14b
jne 0x1e56c
movq 0xa0(%r13), %rdi
testq %rdi, %rdi
je 0x1e56c
movq 0x38(%r15), %rdx
leaq 0x7557(%rip), %rsi      # 0x25abc
xorl %eax, %eax
callq 0x5180
movq %r13, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0xb6e6
movq 0x50(%r15), %rax
testq %rax, %rax
je 0x1e649
movq 0x38(%r15), %rdx
movq 0x78(%r15), %r15
cmpq $0x20, %rax
movl $0x20, %r13d
movq %rax, 0x10(%rsp)
cmovbq %rax, %r13
leal 0x3(%r13), %ebp
movl %ebp, %ecx
shrl $0x2, %ecx
movq %rbx, %rdi
leaq 0x756d(%rip), %rsi      # 0x25b23
movq %rdx, 0x8(%rsp)
xorl %eax, %eax
callq 0x5180
xorl %r14d, %r14d
testb $0x3, %r14b
jne 0x1e5d8
movl $0x20, %edi
movq %rbx, %rsi
callq 0x5150
movzbl (%r15,%r14), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x5180
incq %r14
cmpq %r14, %r13
jne 0x1e5c5
andl $0x7c, %ebp
cmpl %r13d, %ebp
movl %ebp, %eax
leaq 0x7515(%rip), %rbp      # 0x25b16
jle 0x1e623
movl %r13d, %r14d
subl %eax, %r14d
movl $0x2, %esi
movl $0x1, %edx
movq %rbp, %rdi
movq %rbx, %rcx
callq 0x5270
incl %r14d
jne 0x1e609
movl $0xa, %edi
movq %rbx, %rsi
callq 0x5150
addq %r13, %r15
movq 0x8(%rsp), %rdx
addq %r13, %rdx
movq 0x10(%rsp), %rax
subq %r13, %rax
jne 0x1e590
movq (%rsp), %r13
movq 0x1c0(%r13), %rdi
callq 0x1e849
movq %rax, %r15
movb $0x1, %r14b
jmp 0x1e53e
leaq 0x74ae(%rip), %rdi      # 0x25b19
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5270
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_rawbin.c
// Function: get_next_section
static struct LinkedSection *get_next_section(struct GlobalVars *gv)
/* returns pointer to next section with lowest base address */
{
  struct LinkedSection *ls = (struct LinkedSection *)gv->lnksec.first;
  struct LinkedSection *nextls,*minls = NULL;

  while (nextls = (struct LinkedSection *)ls->n.next) {
    if (minls) {
      if (ls->copybase < minls->copybase)
        minls = ls;
    }
    else
      minls = ls;
    ls = nextls;
  }
  if (minls) {
    remnode(&minls->n);
  }
  return (minls);
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
xorl %ebx, %ebx
testq %rax, %rax
je 0x1e880
movq %rax, %rcx
testq %rbx, %rbx
je 0x1e86a
movq 0x38(%rdi), %rax
cmpq 0x38(%rbx), %rax
cmovbq %rdi, %rbx
jmp 0x1e86d
movq %rdi, %rbx
movq (%rcx), %rax
movq %rcx, %rdi
testq %rax, %rax
jne 0x1e854
movq %rbx, %rdi
callq 0x6759
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_rawbin.c
// Function: SRecOut
static void SRecOut(FILE *f,int stype,uint8_t *buf,int len)
{
  uint8_t chksum = 0xff-len-1;

  fprintf(f,"S%1d%02X",stype,(unsigned)(len+1));
  for (; len>0; len--) {
    fprintf(f,"%02X",(unsigned)*buf);
    chksum -= *buf++;
  }
  fprintf(f,"%02X\n",(unsigned)chksum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movq %rdx, %r14
movl %esi, %edx
movq %rdi, %rbx
movb $-0x2, %r12b
subb %r15b, %r12b
leal 0x1(%r15), %ebp
leaq 0x7031(%rip), %rsi      # 0x25adc
movl %ebp, %ecx
xorl %eax, %eax
callq 0x5180
testl %r15d, %r15d
jle 0x1eade
leaq 0x7020(%rip), %r15      # 0x25ae0
movzbl (%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x5180
subb (%r14), %r12b
incq %r14
decl %ebp
cmpl $0x1, %ebp
ja 0x1eac0
movzbl %r12b, %edx
leaq 0x701a(%rip), %rsi      # 0x25b03
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5180
nop
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_vobj.c
// Function: vobj_readconv
static void vobj_readconv(struct GlobalVars *gv,struct LinkFile *lf)
{
  if (lf->type == ID_LIBARCH) {
    if (ar_init(&ai,(char *)lf->data,lf->length,lf->filename)) {
      while (ar_extract(&ai)) {
        lf->objname = allocstring(ai.name);
        vobj_read(gv,lf,(uint8_t *)ai.data);
      }
    }
    else
      ierror("vobj_readconv(): archive %s corrupted since last access",
             lf->pathname);
  }
  else {
    lf->objname = lf->filename;
    vobj_read(gv,lf,lf->data);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x8, 0x39(%rsi)
jne 0x1eb8d
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
leaq 0x15058(%rip), %rdi     # 0x33b88
callq 0xce54
testl %eax, %eax
je 0x1ebaf
leaq 0x15048(%rip), %rdi     # 0x33b88
callq 0xcec0
testl %eax, %eax
je 0x1eb81
leaq 0x15058(%rip), %r15     # 0x33ba8
leaq 0x15031(%rip), %r12     # 0x33b88
movq %r15, %rdi
callq 0x669d
movq %rax, 0x20(%rbx)
movq 0x15146(%rip), %rdx     # 0x33cb0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1eca5
movq %r12, %rdi
callq 0xcec0
testl %eax, %eax
jne 0x1eb57
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1eca5
movq 0x10(%rbx), %rsi
leaq 0x702a(%rip), %rdi      # 0x25be4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x52b0
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_vobj.c
// Function: vobj_identify
static int vobj_identify(char *name,uint8_t *p,unsigned long plen,uint8_t e)
{
  int id = ID_OBJECT;

  if (ar_init(&ai,(char *)p,plen,name)) {
    /* library archive detected, extract 1st archive member */
    id = ID_LIBARCH;
    if (!(ar_extract(&ai))) {
      error(38,name);  /* empty archive ignored */
      return ID_IGNORE;
    }
    p = (uint8_t *)ai.data;
    plen = ai.size;
  }

  if (plen>4 && p[0]==0x56 && p[1]==0x4f && p[2]==0x42 &&
      p[3]==0x4a && p[4]==e) {
    return id;
  }

  return ID_UNKNOWN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x14f64(%rip), %rdi     # 0x33b88
movq %r12, %rcx
callq 0xce54
testl %eax, %eax
je 0x1ec55
leaq 0x14f51(%rip), %rdi     # 0x33b88
callq 0xcec0
testl %eax, %eax
je 0x1ec85
movq 0x15069(%rip), %r14     # 0x33cb0
movl $0x8, %eax
movq 0x15065(%rip), %r15     # 0x33cb8
jmp 0x1ec5a
movl $0x1, %eax
cmpq $0x5, %r15
jb 0x1ec81
cmpb $0x56, (%r14)
jne 0x1ec81
cmpb $0x4f, 0x1(%r14)
jne 0x1ec81
cmpb $0x42, 0x2(%r14)
jne 0x1ec81
cmpb $0x4a, 0x3(%r14)
jne 0x1ec81
cmpb %bl, 0x4(%r14)
je 0x1ec99
xorl %eax, %eax
jmp 0x1ec99
movl $0x26, %edi
movq %r12, %rsi
xorl %eax, %eax
callq 0x6f14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_vobj.c
// Function: read_number
static taddr read_number(void)
{
  taddr val;
  uint8_t n,*q;
  int size;

  if ((n = *p++) <= 0x7f)
    return (taddr)n;

  val = 0;
  if (n -= 0x80) {
    size = n << 3;
    p += n;
    q = p;
    while (n--)
      val = (val<<8) | *(--q);
    val = sign_extend(val,size);
  }
  return val;
}

// Assembly:
movq 0x1475e(%rip), %rcx     # 0x33cc0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x14753(%rip)     # 0x33cc0
movsbq (%rcx), %rax
testq %rax, %rax
js 0x1f577
retq
andl $0x7f, %eax
je 0x1f5b8
movzbl %al, %esi
addq %rax, %rdx
movq %rdx, 0x14737(%rip)     # 0x33cc0
addq %rax, %rcx
movl $0x100, %edx            # imm = 0x100
xorl %edi, %edi
movq %rdi, %r8
shlq $0x8, %r8
movzbl -0x100(%rcx,%rdx), %edi
orq %r8, %rdi
decq %rdx
movl %eax, %r8d
addb %dl, %r8b
jne 0x1f593
shll $0x3, %esi
jmp 0x6ea5
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/codeplea[P]tinyexpr/example3.c
// Function: main
int main(int argc, char *argv[])
{
    te_variable vars[] = {
        {"mysum", my_sum, TE_FUNCTION2}
    };

    const char *expression = "mysum(5, 6)";
    printf("Evaluating:\n\t%s\n", expression);

    int err;
    te_expr *n = te_compile(expression, vars, 1, &err);

    if (n) {
        const double r = te_eval(n);
        printf("Result:\n\t%f\n", r);
        te_free(n);
    } else {
        /* Show the user where the error is at. */
        printf("\t%*s^\nError near here", err-1, "");
    }


    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movaps 0x38b7(%rip), %xmm0     # 0x4aa0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
movaps 0x3897(%rip), %xmm0     # 0x4a90
movaps %xmm0, (%rbx)
leaq 0x1e36(%rip), %rdi      # 0x3039
leaq 0x1e23(%rip), %r14      # 0x302d
movq %r14, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0xc(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x1c7e
testq %rax, %rax
je 0x1251
movq %rax, %rbx
movq %rax, %rdi
callq 0x1685
leaq 0x1e0a(%rip), %rdi      # 0x304a
movb $0x1, %al
callq 0x1070
movq %rbx, %rdi
callq 0x1367
jmp 0x126c
movl 0xc(%rsp), %esi
decl %esi
leaq 0x1df9(%rip), %rdi      # 0x3057
leaq 0x1dc1(%rip), %rdx      # 0x3026
xorl %eax, %eax
callq 0x1070
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/termbox[P]termbox/demo/paint.c
// Function: updateAndRedrawAll
void updateAndRedrawAll(int mx, int my) {
    tb_clear();
    if (mx != -1 && my != -1) {
        backbuf[bbw*my+mx].ch = runes[curRune];
        backbuf[bbw*my+mx].fg = colors[curCol];
    }
    memcpy(tb_cell_buffer(), backbuf, sizeof(struct tb_cell)*bbw*bbh);
    int h = tb_height();
    updateAndDrawButtons(&curRune, 0, 0, mx, my, len(runes), runeAttrFunc);
    updateAndDrawButtons(&curCol, 0, h-3, mx, my, len(colors), colorAttrFunc);
    tb_present();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movl %edi, %ebp
callq 0x4c31
cmpl $-0x1, %ebp
sete %al
cmpl $-0x1, %ebx
sete %cl
orb %al, %cl
jne 0x3669
movslq 0x6270(%rip), %rax      # 0x98a0
leaq 0x29f9(%rip), %rcx      # 0x6030
movl (%rcx,%rax,4), %eax
movq 0x6267(%rip), %rcx      # 0x98a8
movl 0x6269(%rip), %edx      # 0x98b0
imull %ebx, %edx
addl %ebp, %edx
movslq %edx, %rdx
movl %eax, (%rcx,%rdx,8)
movslq 0x625b(%rip), %rax      # 0x98b4
leaq 0x29f0(%rip), %rsi      # 0x6050
movzwl (%rsi,%rax,2), %eax
movw %ax, 0x4(%rcx,%rdx,8)
callq 0x49b0
movq 0x6233(%rip), %rsi      # 0x98a8
movslq 0x6234(%rip), %rcx      # 0x98b0
movslq 0x6235(%rip), %rdx      # 0x98b8
imulq %rcx, %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x3180
callq 0x4c2a
movl %eax, %r14d
leaq -0xcf(%rip), %rax       # 0x35d3
movq %rax, (%rsp)
leaq 0x61f3(%rip), %rdi      # 0x98a0
xorl %esi, %esi
xorl %edx, %edx
movl %ebp, %ecx
movl %ebx, %r8d
movl $0x5, %r9d
callq 0x33cc
addl $-0x3, %r14d
leaq -0xe1(%rip), %rax       # 0x35eb
movq %rax, (%rsp)
leaq 0x61dd(%rip), %rdi      # 0x98b4
xorl %esi, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
movl $0x8, %r9d
callq 0x33cc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x417b
// File: /workspace/github_c_makefile_star2_O3/termbox[P]termbox/demo/paint.c
// Function: reallocBackBuffer
void reallocBackBuffer(int w, int h) {
    bbw = w;
    bbh = h;
    if (backbuf)
        free(backbuf);
    backbuf = calloc(sizeof(struct tb_cell), w*h);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl %edi, 0x61aa(%rip)      # 0x98b0
movl %esi, 0x61ac(%rip)      # 0x98b8
movq 0x6195(%rip), %rdi      # 0x98a8
testq %rdi, %rdi
je 0x371d
callq 0x3040
imull %ebp, %ebx
movslq %ebx, %rsi
movl $0x8, %edi
callq 0x3150
movq %rax, 0x6174(%rip)      # 0x98a8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq