LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x1a9f6
cmpl $0x0, 0x244(%rdi)
jne 0x1a9f6
movq %rdx, %r14
movq 0x18(%rsi), %rbx
leaq 0x7c38(%rip), %rsi      # 0x225b1
movl $0x6, %edx
movq %rbx, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1a9b4
movq 0x20(%r14), %r15
leaq 0x7c23(%rip), %rsi      # 0x225b8
movl $0x5, %edx
movq %r15, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1a9b4
movb 0x6(%rbx), %cl
movl $0x1, %eax
cmpb 0x5(%r15), %cl
je 0x1a9f8
leaq 0x7bfd(%rip), %rsi      # 0x225b8
movl $0x5, %edx
movq %rbx, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1a9f6
movq 0x20(%r14), %r14
leaq 0x7bda(%rip), %rsi      # 0x225b1
movl $0x6, %edx
movq %r14, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1a9f6
movb 0x5(%rbx), %cl
movl $0x1, %eax
cmpb 0x6(%r14), %cl
je 0x1a9f8
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1aa2f
cmpl $0x0, 0x244(%rbx)
jne 0x1aa2f
movq 0x10(%r14), %rsi
leaq 0x15392(%rip), %rdi     # 0x2fdb8
callq 0x5160
testl %eax, %eax
je 0x1aa42
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x1591c
movzbl 0x50(%rbx), %eax
leaq 0x14733(%rip), %r15     # 0x2f180
movq (%r15,%rax,8), %rax
movslq 0x9c(%rax), %rdx
leaq 0x15359(%rip), %rsi     # 0x2fdb8
movq %rbx, %rdi
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
callq 0xae7f
addq $0x10, %rsp
movq %rax, %r14
movl $0x80000000, 0x48(%rax) # imm = 0x80000000
leaq 0x7b54(%rip), %rsi      # 0x225e5
movq %rbx, %rdi
callq 0xaf21
testq %rax, %rax
jne 0x1aae0
movzbl 0x50(%rbx), %eax
movq (%r15,%rax,8), %rax
movslq 0x9c(%rax), %rdx
xorl %r15d, %r15d
leaq 0x7b2e(%rip), %rsi      # 0x225e5
movq %rbx, %rdi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq %r15
pushq $0x2
callq 0xae7f
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_O1/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
testb $0x1, 0x41(%rsi)
je 0x1aafa
movl 0x48(%rbx), %eax
testl %eax, %eax
js 0x1ab03
movq %rbx, %rsi
popq %rbx
jmp 0x15a24
testl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x1ab17
callq 0xca33
movq 0x60(%rax), %rax
movq %rax, 0x38(%rbx)
andb $-0x2, 0x41(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1acd0
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
callq 0xcf08
testl %eax, %eax
je 0x1acff
movq %rsp, %rdi
callq 0xcf75
testl %eax, %eax
je 0x1ad11
leaq 0x20(%rsp), %r15
leaq 0x1451f(%rip), %rbp     # 0x2f180
leaq 0xfb(%rip), %r12        # 0x1ad63
movq %rsp, %r13
movq %r15, %rdi
callq 0x66cd
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 0x1403a
addq $0x10, %rsp
movq 0x128(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x14a3e
movq %r13, %rdi
callq 0xcf75
testl %eax, %eax
jne 0x1ac6b
jmp 0x1ad11
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
leaq 0x80(%rip), %rcx        # 0x1ad63
movq %r14, %rdi
movq %rbx, %rsi
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x14a3e
movq 0x10(%rbx), %rsi
leaq 0x9822(%rip), %rdi      # 0x2452c
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_O1/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 0x1b314
xorl %r14d, %r14d
jmp 0x1b389
movq %rdi, %rbx
movq 0x10(%rdx), %r12
leaq 0x13a9e(%rip), %rbp     # 0x2edc0
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x5160
testl %eax, %eax
je 0x1b34a
incq %r13
addq $0x8, %rbp
cmpq $0x3, %r13
jne 0x1b328
jmp 0x1b389
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
callq 0xae7f
addq $0x10, %rsp
movq %rax, %r14
movl %r13d, 0x48(%rax)
cmpq $0x2, %r13
jae 0x1b389
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_O1/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 0x1c676
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
leaq 0x173af(%rip), %rdi     # 0x339c8
callq 0xcf08
testl %eax, %eax
je 0x1c698
leaq 0x1739f(%rip), %rdi     # 0x339c8
callq 0xcf75
testl %eax, %eax
je 0x1c66a
leaq 0x173af(%rip), %r15     # 0x339e8
leaq 0x17388(%rip), %r12     # 0x339c8
movq %r15, %rdi
callq 0x66cd
movq %rax, 0x20(%rbx)
movq 0x1749d(%rip), %rdx     # 0x33af0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1bab1
movq %r12, %rdi
callq 0xcf75
testl %eax, %eax
jne 0x1c640
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 0x1bab1
movq 0x10(%rbx), %rsi
leaq 0x830b(%rip), %rdi      # 0x249ae
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x52b0
// File: /workspace/github_c_makefile_star2_O1/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 0x17434(%rip), %rdi     # 0x33b00
callq 0x670a
movl $0x80000, %edi          # imm = 0x80000
callq 0x66b6
movq %rax, 0x17436(%rip)     # 0x33b18
movl $0x4, 0x17434(%rip)     # 0x33b20
leaq 0x17435(%rip), %rdi     # 0x33b28
callq 0x670a
movl $0x80000, %edi          # imm = 0x80000
callq 0x66b6
movq %rax, 0x17437(%rip)     # 0x33b40
movl $0x0, 0x17435(%rip)     # 0x33b48
leaq 0x17436(%rip), %rdi     # 0x33b50
callq 0x670a
leaq 0x17442(%rip), %rdi     # 0x33b68
callq 0x670a
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcaa8
// File: /workspace/github_c_makefile_star2_O1/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 0x1c9a4
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x138(%rdi), %r14
cmpq $0x0, (%r14)
je 0x1c9fe
movl %esi, %ebx
movq 0x50(%r14), %r15
cmpq $0x0, (%r15)
je 0x1c9f5
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 0x1ca08
movq (%r15), %r15
jmp 0x1c9c0
movq (%r14), %r14
cmpq $0x0, (%r14)
jne 0x1c9bc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1ca33
leaq 0x5c1d(%rip), %rbp      # 0x22650
movq 0x17106(%rip), %rbx     # 0x33b40
movq %rbp, %rdi
callq 0x6e09
movzwl %ax, %eax
leaq (%rbx,%rax,8), %rax
movq %rax, %r12
movq (%rax), %rcx
leaq 0x10(%rcx), %rax
testq %rcx, %rcx
jne 0x1ca49
movl $0x30, %edi
callq 0x66b6
movq %rax, %rbx
movq %rax, (%r12)
movq %rbp, 0x18(%rax)
movl 0x170d5(%rip), %eax     # 0x33b48
leal 0x1(%rax), %ecx
movl %ecx, 0x170cc(%rip)     # 0x33b48
movl %eax, 0x2c(%rbx)
movq 0x17092(%rip), %r12     # 0x33b18
movq %rbp, %rdi
callq 0x6e09
cmpb $0x0, (%rbp)
je 0x1cac3
movzwl %ax, %ecx
movq (%r12,%rcx,8), %rax
testq %rax, %rax
je 0x1cac7
movq %rax, %r12
movq 0x18(%rax), %rsi
movq %rbp, %rdi
callq 0x5160
testl %eax, %eax
je 0x1cb1b
movq 0x10(%r12), %rax
testq %rax, %rax
jne 0x1caa0
addq $0x10, %r12
jmp 0x1cacb
xorl %edx, %edx
jmp 0x1cb23
leaq (%r12,%rcx,8), %r12
movl $0x28, %edi
callq 0x6668
movq %rax, (%r12)
movq $0x0, 0x10(%rax)
movq %rbp, 0x18(%rax)
leaq 0x17014(%rip), %rdi     # 0x33b00
movl 0x1702e(%rip), %ecx     # 0x33b20
leaq 0x20(%rax), %r12
movl %ecx, 0x20(%rax)
movq %rax, %rsi
callq 0x6759
movq %rbp, %rdi
callq 0x50e0
movl 0x17011(%rip), %ecx     # 0x33b20
addl %ecx, %eax
incl %eax
movl %eax, 0x17007(%rip)     # 0x33b20
jmp 0x1cb1f
addq $0x20, %r12
movl (%r12), %edx
leaq 0x20(%rbx), %rsi
movl 0x40(%rsp), %ebp
movl %ebp, %edi
callq 0x6a19
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 0x6a05
movq %rbx, %rsi
addq $0x28, %rsi
movl %ebp, %edi
movl 0x4(%rsp), %edx
callq 0x6a19
leaq 0x16fbb(%rip), %rdi     # 0x33b28
movq %rbx, %rsi
callq 0x6759
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_O1/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), %rsi
testq %rsi, %rsi
je 0x1cef4
movl $0xffff0000, %eax       # imm = 0xFFFF0000
movq %rdi, %rcx
movq %rcx, %rdx
movq %rsi, %rcx
cmpb $0x1, 0x38(%rdx)
jne 0x1cedb
movq 0x30(%rdx), %rsi
testq %rsi, %rsi
je 0x1cedb
cmpw $0x0, 0x8(%rsi)
jne 0x1cedb
cmpq $0x0, (%rsi)
jne 0x1cedb
cmpw $0x10, 0xa(%rsi)
jne 0x1cedb
cmpq %rax, 0x10(%rsi)
jne 0x1cedb
movq (%rdi), %r10
testq %r10, %r10
je 0x1cedb
movq 0x20(%rdx), %rsi
addq $-0x2, %rsi
movq %rdi, %r8
movq %r8, %r9
movq %r10, %r8
cmpq %rsi, 0x20(%r9)
jne 0x1ced3
cmpb $0x1, 0x38(%r9)
jne 0x1ced3
movq 0x30(%r9), %r10
testq %r10, %r10
je 0x1ced3
cmpw $0x0, 0x8(%r10)
jne 0x1ced3
cmpq $0x0, (%r10)
jne 0x1ced3
cmpw $0x10, 0xa(%r10)
jne 0x1ced3
cmpq $0xffff, 0x10(%r10)     # imm = 0xFFFF
je 0x1cee9
movq (%r8), %r10
testq %r10, %r10
jne 0x1ce97
movq (%rcx), %rsi
testq %rsi, %rsi
jne 0x1ce55
jmp 0x1cef4
movb $0x11, 0x38(%r9)
movb $0x0, 0x38(%rdx)
jmp 0x1cedb
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6668
movq %rax, %r13
leaq 0x10(%rax), %rsi
movl %r14d, %edi
movl %r12d, %edx
callq 0x6a19
leaq 0x14(%r13), %r12
movl %r14d, %edi
movq %r12, %rsi
xorl %edx, %edx
movl $0x18, %ecx
movl %r15d, %r8d
callq 0x6bb5
movl %r14d, %edi
movq %r12, %rsi
movl $0x18, %edx
movl $0x8, %ecx
movl %ebp, %r8d
callq 0x6bb5
movq %rbx, %rdi
movq %r13, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6759
// File: /workspace/github_c_makefile_star2_O1/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 0x6971
leaq 0xc(%rsp), %rsi
movl %r14d, %edi
movl %ebp, %edx
callq 0x6a19
leaq 0x10(%rsp), %rsi
movl %r14d, %edi
movl %r15d, %edx
callq 0x6a19
leaq 0x14(%rsp), %rsi
movl %r14d, %edi
movl %r13d, %edx
callq 0x6a19
leaq 0x18(%rsp), %rsi
movl %r14d, %edi
movl 0x68(%rsp), %edx
callq 0x6a19
leaq 0x1c(%rsp), %rsi
movl %r14d, %edi
movl 0x70(%rsp), %edx
callq 0x6a19
leaq 0x20(%rsp), %rsi
movl %r14d, %edi
movl 0x78(%rsp), %edx
callq 0x6a19
leaq 0x24(%rsp), %rsi
movl %r14d, %edi
movl 0x80(%rsp), %edx
callq 0x6a19
movl $0x20, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6c1a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x12118(%rip), %rcx     # 0x2f180
movq (%rcx,%rax,8), %rax
movl 0x98(%rax), %edi
callq 0x6e74
movslq %eax, %r14
cmpl $0x1, %ebp
je 0x1d0ac
testl %ebp, %ebp
jne 0x1d0dc
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x1d106
movq %r15, %rdi
callq 0x1d13a
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movl 0x40(%rcx), %ebx
subl 0x40(%rax), %ebx
addl $0x20, %ebx
jmp 0x1d12d
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x1d102
movq 0x10(%rbx), %rdx
movq %r15, %rdi
callq 0x1d13a
movq 0x8(%rbx), %rax
movq 0x48(%rax), %rbx
movq 0x40(%rax), %rdi
addq %rbx, %rdi
movq %r14, %rsi
callq 0x6e40
addl %eax, %ebx
jmp 0x1d12d
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x1d102
movq 0x40(%rax), %rdi
movq %r14, %rsi
callq 0x6e40
movq 0x10(%rbx), %rcx
movq 0x48(%rcx), %rbx
cmpq %rax, %rbx
jbe 0x1d102
subl %eax, %ebx
jmp 0x1d12d
xorl %ebx, %ebx
jmp 0x1d12d
movq 0x10(%rbx), %rdx
movq %r15, %rdi
callq 0x1d13a
movq (%rbx), %rax
movq 0x48(%rax), %rbx
movq %rbx, %rdi
addq 0x40(%rax), %rdi
movq %r14, %rsi
callq 0x6e40
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_O1/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 0x1d1eb
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq 0x48(%rax), %rdx
movq 0x78(%rax), %rsi
movq %rbx, %rdi
callq 0x6c1a
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x1d04e
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 0x6da8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x16870(%rip), %edx     # 0x33b20
cmpl $0x5, %edx
jb 0x1d329
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl %esi, %edi
movq %r14, %rsi
callq 0x6a19
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c1a
leaq 0x16819(%rip), %rdi     # 0x33b00
callq 0x676f
testq %rax, %rax
je 0x1d320
leaq 0x16808(%rip), %r14     # 0x33b00
movq 0x18(%rax), %r15
movq %r15, %rdi
callq 0x50e0
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6c1a
movq %r14, %rdi
callq 0x676f
testq %rax, %rax
jne 0x1d2f8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1d720
movq 0x80(%rcx), %rdx
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x1d706
cmpb $0x1, 0x38(%rdx)
movq %rsi, %rdx
jne 0x1d6f3
jmp 0x1d72f
movq 0x98(%rcx), %rcx
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x1d720
cmpb $0x1, 0x38(%rcx)
movq %rdx, %rcx
jne 0x1d70d
jmp 0x1d72f
incq %rax
cmpq $0x3, %rax
jne 0x1d6e3
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %r12d
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movb $0x3, %al
movb $0x3, %dl
cmpl $0x3, %r8d
je 0x1d9a7
movq 0x10(%r13), %rax
leaq (%r14,%rbx), %rcx
movq 0x28(%rax), %rdx
addq 0x30(%rax), %rdx
cmpq %rdx, %rcx
jbe 0x1d98e
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rcx
movl $0x31, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x6f84
leal -0x1(%r12), %eax
movzbl %al, %ecx
shll $0x3, %ecx
movl $0x30101, %eax          # imm = 0x30101
shrl %cl, %eax
movl $0x30305, %edx          # imm = 0x30305
shrl %cl, %edx
subq $0x8, %rsp
movzbl %dl, %r10d
movzbl %r12b, %r8d
movzbl %al, %r9d
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
pushq $0x0
pushq $0x2
pushq %r10
callq 0xc1c8
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
movl %edx, %esi
callq 0x1d900
movl %eax, %eax
movslq %ebx, %r14
addq %r12, %r14
addq %rax, %r14
movq 0x28(%r15), %rax
cmpq %rax, %r14
jb 0x1da43
addq 0x30(%r15), %rax
cmpq %rax, %r14
jbe 0x1da59
movq 0x10(%r15), %rsi
movq 0x20(%r15), %rcx
movl $0x57, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x6f84
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xa(%rsp), %r13
movl $0x8, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x5060
movl %r12d, %esi
orl $0x48, %esi
cmpq $0x9, %r15
leaq 0x12(%rsp), %rdi
cmovbl %r12d, %esi
callq 0x6969
leaq 0x14(%rsp), %rdi
movl %ebp, %esi
callq 0x6971
movl $0xe, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6c1a
cmpq $0x9, %r15
jb 0x1e3ed
xorl %eax, %eax
leaq 0x18(%rsp), %r15
movq %rax, 0x6(%r15)
movq %rax, (%r15)
addq $0x8, %r14
movl $0xe, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x5060
movl $0xe, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6c1a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
callq 0x1e98f
testq %rax, %rax
je 0x1e7ce
movq %rax, %r15
leaq 0x7477(%rip), %r12      # 0x25b00
xorl %r14d, %r14d
cmpq $0x0, 0x48(%r15)
je 0x1e6a1
testb $0x1, 0x21(%r15)
je 0x1e6a1
testb $0x1, 0x24(%r15)
je 0x1e6b6
movq %r13, %rdi
callq 0x1e98f
movq %rax, %r15
testq %rax, %rax
jne 0x1e68c
jmp 0x1e7ce
testb $0x1, %r14b
jne 0x1e6da
movq 0xa0(%r13), %rdi
testq %rdi, %rdi
je 0x1e6da
movq 0x38(%r15), %rdx
leaq 0x7409(%rip), %rsi      # 0x25adc
xorl %eax, %eax
callq 0x5180
movq %r13, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0xb7c8
movq 0x50(%r15), %rax
testq %rax, %rax
je 0x1e7b7
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 0x741f(%rip), %rsi      # 0x25b43
movq %rdx, 0x8(%rsp)
xorl %eax, %eax
callq 0x5180
xorl %r14d, %r14d
testb $0x3, %r14b
jne 0x1e746
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 0x1e733
andl $0x7c, %ebp
cmpl %r13d, %ebp
movl %ebp, %eax
leaq 0x73c7(%rip), %rbp      # 0x25b36
jle 0x1e791
movl %r13d, %r14d
subl %eax, %r14d
movl $0x2, %esi
movl $0x1, %edx
movq %rbp, %rdi
movq %rbx, %rcx
callq 0x5270
incl %r14d
jne 0x1e777
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 0x1e6fe
movq (%rsp), %r13
movq %r13, %rdi
callq 0x1e98f
movq %rax, %r15
movb $0x1, %r14b
jmp 0x1e6ac
leaq 0x7364(%rip), %rdi      # 0x25b39
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_O1/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 0x1c0(%rdi), %rax
movq (%rax), %rcx
xorl %ebx, %ebx
testq %rcx, %rcx
je 0x1e9c0
movq %rcx, %rdx
testq %rbx, %rbx
je 0x1e9b5
movq 0x38(%rax), %rcx
cmpq 0x38(%rbx), %rcx
cmovaeq %rbx, %rax
movq %rax, %rbx
movq (%rdx), %rcx
movq %rdx, %rax
jmp 0x1e99c
testq %rbx, %rbx
je 0x1e9cd
movq %rbx, %rdi
callq 0x6789
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6f10(%rip), %rsi      # 0x25afc
movl %ebp, %ecx
xorl %eax, %eax
callq 0x5180
testl %r15d, %r15d
jle 0x1ec1f
leaq 0x6eff(%rip), %r15      # 0x25b00
movzbl (%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x5180
subb (%r14), %r12b
incq %r14
decl %ebp
cmpl $0x1, %ebp
jg 0x1ec01
movzbl %r12b, %edx
leaq 0x6ef9(%rip), %rsi      # 0x25b23
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5180
// File: /workspace/github_c_makefile_star2_O1/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 0x1eccd
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
leaq 0x14f18(%rip), %rdi     # 0x33b88
callq 0xcf08
testl %eax, %eax
je 0x1ecef
leaq 0x14f08(%rip), %rdi     # 0x33b88
callq 0xcf75
testl %eax, %eax
je 0x1ecc1
leaq 0x14f18(%rip), %r15     # 0x33ba8
leaq 0x14ef1(%rip), %r12     # 0x33b88
movq %r15, %rdi
callq 0x66cd
movq %rax, 0x20(%rbx)
movq 0x15006(%rip), %rdx     # 0x33cb0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1ede5
movq %r12, %rdi
callq 0xcf75
testl %eax, %eax
jne 0x1ec97
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 0x1ede5
movq 0x10(%rbx), %rsi
leaq 0x6f0a(%rip), %rdi      # 0x25c04
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x52b0
// File: /workspace/github_c_makefile_star2_O1/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 0x14e24(%rip), %rdi     # 0x33b88
movq %r12, %rcx
callq 0xcf08
testl %eax, %eax
je 0x1ed95
leaq 0x14e11(%rip), %rdi     # 0x33b88
callq 0xcf75
testl %eax, %eax
je 0x1edc5
movq 0x14f29(%rip), %r14     # 0x33cb0
movl $0x8, %eax
movq 0x14f25(%rip), %r15     # 0x33cb8
jmp 0x1ed9a
movl $0x1, %eax
cmpq $0x5, %r15
jb 0x1edc1
cmpb $0x56, (%r14)
jne 0x1edc1
cmpb $0x4f, 0x1(%r14)
jne 0x1edc1
cmpb $0x42, 0x2(%r14)
jne 0x1edc1
cmpb $0x4a, 0x3(%r14)
jne 0x1edc1
cmpb %bl, 0x4(%r14)
je 0x1edd9
xorl %eax, %eax
jmp 0x1edd9
movl $0x26, %edi
movq %r12, %rsi
xorl %eax, %eax
callq 0x6f84
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x14615(%rip), %rcx     # 0x33cc0
leaq 0x1(%rcx), %rdx
movq %rdx, 0x1460a(%rip)     # 0x33cc0
movsbq (%rcx), %rax
testq %rax, %rax
js 0x1f6c0
retq
andl $0x7f, %eax
je 0x1f701
movzbl %al, %esi
addq %rax, %rdx
movq %rdx, 0x145ee(%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 0x1f6dc
shll $0x3, %esi
jmp 0x6f17
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/kilobyte[P]colormatch/xterm256.c
// Function: main
int main()
{
    for (int c = 0; c < 16777216; ++c)
    {
        nt[c] = closest(c);
        if (!(c&0xff))
            printf("%06X\n", c);
    }

    int fd = creat("xterm.rgb", 0666);
    write(fd, nt, sizeof(nt));
    close(fd);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0xff, %r15d
xorl %r14d, %r14d
movl %r14d, %eax
shrl $0x10, %eax
movl %eax, 0xc(%rsp)
movl %r14d, %ebx
shrl $0x8, %ebx
andl %r15d, %ebx
movq %r14, 0x10(%rsp)
movl %r14d, %r12d
andl %r15d, %r12d
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
xorl %ebp, %ebp
movl %ebp, %edi
callq 0x1278
movl %eax, %ecx
shrl $0x10, %ecx
andl %r15d, %ecx
subl 0xc(%rsp), %ecx
imull %ecx, %ecx
movl %eax, %edx
shrl $0x8, %edx
andl %r15d, %edx
subl %ebx, %edx
imull %edx, %edx
andl %r15d, %eax
subl %r12d, %eax
imull %eax, %eax
addl %edx, %eax
addl %ecx, %eax
cmpl %r13d, %eax
cmovll %eax, %r13d
cmovll %ebp, %r14d
incl %ebp
cmpl $0x100, %ebp            # imm = 0x100
jne 0x11bc
leaq 0x2e58(%rip), %rax      # 0x4060
movq 0x10(%rsp), %rcx
movb %r14b, (%rcx,%rax)
movq %rcx, %r14
testl %r12d, %r12d
jne 0x122a
leaq 0xde4(%rip), %rdi       # 0x2004
movl %r14d, %esi
xorl %eax, %eax
callq 0x1050
incq %r14
cmpq $0x1000000, %r14        # imm = 0x1000000
jne 0x1193
leaq 0xdc9(%rip), %rdi       # 0x200a
movl $0x1b6, %esi            # imm = 0x1B6
callq 0x1070
movl %eax, %ebx
leaq 0x2e0c(%rip), %rsi      # 0x4060
movl $0x1000000, %edx        # imm = 0x1000000
movl %eax, %edi
callq 0x1040
movl %ebx, %edi
callq 0x1060
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x38a7(%rip), %xmm0     # 0x4aa0
leaq 0x10(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
movaps 0x3887(%rip), %xmm0     # 0x4a90
movaps %xmm0, (%rbx)
leaq 0x1e26(%rip), %rdi      # 0x3039
leaq 0x1e13(%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 0x1ca2
testq %rax, %rax
je 0x1261
movq %rax, %rbx
movq %rax, %rdi
callq 0x16a9
leaq 0x1dfa(%rip), %rdi      # 0x304a
movb $0x1, %al
callq 0x1070
movq %rbx, %rdi
callq 0x1377
jmp 0x127c
movl 0xc(%rsp), %esi
decl %esi
leaq 0x1de9(%rip), %rdi      # 0x3057
leaq 0x1db1(%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_O1/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 0x4c9b
cmpl $-0x1, %ebp
sete %al
cmpl $-0x1, %ebx
sete %cl
orb %al, %cl
jne 0x3670
movslq 0x6269(%rip), %rax      # 0x98a0
leaq 0x29f2(%rip), %rcx      # 0x6030
movl (%rcx,%rax,4), %eax
movq 0x6260(%rip), %rcx      # 0x98a8
movl 0x6262(%rip), %edx      # 0x98b0
imull %ebx, %edx
addl %ebp, %edx
movslq %edx, %rdx
movl %eax, (%rcx,%rdx,8)
movslq 0x6254(%rip), %rax      # 0x98b4
leaq 0x29e9(%rip), %rsi      # 0x6050
movzwl (%rsi,%rax,2), %eax
movw %ax, 0x4(%rcx,%rdx,8)
callq 0x4a12
movq 0x622c(%rip), %rsi      # 0x98a8
movslq 0x622d(%rip), %rcx      # 0x98b0
movslq 0x622e(%rip), %rdx      # 0x98b8
imulq %rcx, %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x3180
callq 0x4c94
movl %eax, %r14d
leaq -0xcf(%rip), %rax       # 0x35da
movq %rax, (%rsp)
leaq 0x61ec(%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       # 0x35f2
movq %rax, (%rsp)
leaq 0x61d6(%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 0x41f1
// File: /workspace/github_c_makefile_star2_O1/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, 0x61a3(%rip)      # 0x98b0
movl %esi, 0x61a5(%rip)      # 0x98b8
movq 0x618e(%rip), %rdi      # 0x98a8
testq %rdi, %rdi
je 0x3724
callq 0x3040
imull %ebp, %ebx
movslq %ebx, %rsi
movl $0x8, %edi
callq 0x3150
movq %rax, 0x616d(%rip)      # 0x98a8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/termbox[P]termbox/demo/paint.c
// Function: main
int main(int argv, char **argc) {
    (void)argc; (void)argv;
    int code = tb_init();
    if (code < 0) {
        fprintf(stderr, "termbox init failed, code: %d\n", code);
        return -1;
    }

    tb_select_input_mode(TB_INPUT_ESC | TB_INPUT_MOUSE);
    int w = tb_width();
    int h = tb_height();
    reallocBackBuffer(w, h);
    updateAndRedrawAll(-1, -1);
    for (;;) {
        struct tb_event ev;
        int mx = -1;
        int my = -1;
        int t = tb_poll_event(&ev);
        if (t == -1) {
            tb_shutdown();
            fprintf(stderr, "termbox poll event error\n");
            return -1;
        }

        switch (t) {
        case TB_EVENT_KEY:
            if (ev.key == TB_KEY_ESC) {
                tb_shutdown();
                return 0;
            }
            break;
        case TB_EVENT_MOUSE:
            if (ev.key == TB_KEY_MOUSE_LEFT) {
                mx = ev.x;
                my = ev.y;
            }
            break;
        case TB_EVENT_RESIZE:
            reallocBackBuffer(ev.w, ev.h);
            break;
        }
        updateAndRedrawAll(mx, my);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
callq 0x4013
testl %eax, %eax
js 0x380c
movl $0x5, %edi
callq 0x4cf9
callq 0x4c8d
movl %eax, %ebx
callq 0x4c94
movl %ebx, %edi
movl %eax, %esi
callq 0x3700
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x360f
xorl %ebp, %ebp
leaq 0x8(%rsp), %rbx
leaq 0x287d(%rip), %r14      # 0x6010
movq %rbx, %rdi
callq 0x4a1a
incl %eax
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpl $0x4, %eax
ja 0x37f1
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
cmpw $0x1b, 0xa(%rsp)
jne 0x37f1
callq 0x402f
xorl %eax, %eax
xorl %ebp, %ebp
jmp 0x37f8
cmpw $-0x17, 0xa(%rsp)
jne 0x37f1
movl 0x18(%rsp), %edi
movl 0x1c(%rsp), %esi
jmp 0x37f1
movl 0x10(%rsp), %edi
movl 0x14(%rsp), %esi
callq 0x3700
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x360f
movb $0x1, %al
testb %al, %al
jne 0x3793
jmp 0x382b
callq 0x3290
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0x37f8
movq 0x57dd(%rip), %rcx      # 0x8ff0
movq (%rcx), %rdi
leaq 0x2843(%rip), %rsi      # 0x6060
movl %eax, %edx
xorl %eax, %eax
callq 0x3170
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_4/exercise_4_02/atof.c
// Function: main
int main(void)
{
  char line[MAXLEN];

  get_line(line, MAXLEN);
  printf("%s", line);

  printf("%f", atof(line));

  return 0;
}

// Assembly:
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
xorl %ebx, %ebx
callq 0x1040
cmpl $0xa, %eax
je 0x1184
movb %al, (%rsp,%rbx)
incq %rbx
cmpq $0x1f3, %rbx            # imm = 0x1F3
jne 0x1166
movl $0x1f3, %ebx            # imm = 0x1F3
cmpl $0xa, %eax
jne 0x1191
movl %ebx, %eax
incl %ebx
movb $0xa, (%rsp,%rax)
movslq %ebx, %rax
movb $0x0, (%rsp,%rax)
leaq 0xe91(%rip), %rdi       # 0x2030
movq %rsp, %rbx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
movq %rbx, %rdi
callq 0x1224
leaq 0xe78(%rip), %rdi       # 0x2033
movb $0x1, %al
callq 0x1030
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq