LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_getshndx
uint16_t elf32_getshndx(struct GlobalVars *gv,
                        struct Symbol *sym,uint8_t symtype)
{
  uint16_t shndx = SHN_UNDEF;

  switch (sym->type) {
    case SYM_INDIR:
      /* can't reproduce unsupported symbol type */
      error(33,fff[gv->dest_format]->tname,sym->name,sym_bind[sym->bind],
            sym_type[sym->type],sym_info[sym->info]);
    case SYM_UNDEF:
      shndx = SHN_UNDEF;
      break;
    case SYM_ABS:
      shndx = SHN_ABS;
      break;
    case SYM_RELOC:
      if (symtype > STT_FUNC)
        ierror("elf32_getshndx(): %s is relocatable, but not a "
               "function or object (type %d)",sym->name,(int)symtype);
      shndx = (uint16_t)sym->relsect->lnksec->index;
      break;
    case SYM_COMMON:
      shndx = SHN_COMMON;
      break;
    default:
      ierror("elf32_getshndx(): Illegal symbol type: %d",(int)sym->type);
      break;
  }
  return shndx;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movzbl 0x40(%rsi), %esi
cmpq $0x4, %rsi
ja 0x1696a
leaq 0xcadd(%rip), %rax      # 0x233b4
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %ebx, %ebx
jmp 0x1697a
movzbl 0x50(%rdi), %eax
leaq 0x1888e(%rip), %rcx     # 0x2f180
movq (%rcx,%rax,8), %rax
movq (%rax), %rsi
movq 0x20(%rbx), %rdx
movzbl 0x43(%rbx), %eax
leaq 0x189c8(%rip), %rcx     # 0x2f2d0
movq (%rcx,%rax,8), %rcx
leaq 0x1895d(%rip), %rax     # 0x2f270
movq 0x20(%rax), %r8
movzbl 0x42(%rbx), %eax
leaq 0x1897e(%rip), %rdi     # 0x2f2a0
movq (%rdi,%rax,8), %r9
xorl %ebx, %ebx
movl $0x21, %edi
xorl %eax, %eax
callq 0x6f14
jmp 0x1697a
cmpb $0x3, %dl
jb 0x16950
movzbl %dl, %edx
movq 0x20(%rbx), %rsi
leaq 0xcd5c(%rip), %rdi      # 0x236a5
xorl %eax, %eax
callq 0x52b0
movq 0x38(%rbx), %rax
movq 0x18(%rax), %rax
movzwl 0x10(%rax), %ebx
jmp 0x1697a
movw $0xfff2, %bx            # imm = 0xFFF2
jmp 0x1697a
movw $0xfff1, %bx            # imm = 0xFFF1
jmp 0x1697a
leaq 0xcd80(%rip), %rdi      # 0x236f1
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x52b0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_header
void elf32_header(FILE *f,uint16_t type,uint16_t mach,uint32_t entry,
                  uint32_t phoff,uint32_t shoff,uint32_t flags,uint16_t phnum,
                  uint16_t shnum,uint16_t shstrndx,bool be)
/* write 32-bit ELF header */
{
  struct Elf32_Ehdr eh;

  memset(&eh,0,sizeof(struct Elf32_Ehdr));
  strncpy((char *)eh.e_ident,ELFid,4);
  eh.e_ident[EI_CLASS] = ELFCLASS32;
  eh.e_ident[EI_DATA] = be ? ELFDATA2MSB : ELFDATA2LSB;
  eh.e_ident[EI_VERSION] = ELF_VER;
  write16(be,eh.e_type,type);
  write16(be,eh.e_machine,mach);
  write32(be,eh.e_version,ELF_VER);
  write32(be,eh.e_entry,entry);
  write32(be,eh.e_phoff,phoff);
  write32(be,eh.e_shoff,shoff);
  write32(be,eh.e_flags,flags);
  write16(be,eh.e_ehsize,sizeof(struct Elf32_Ehdr));
  write16(be,eh.e_phentsize,phnum ? sizeof(struct Elf32_Phdr):0);
  write16(be,eh.e_phnum,phnum);
  write16(be,eh.e_shentsize,shnum ? sizeof(struct Elf32_Shdr):0);
  write16(be,eh.e_shnum,shnum);
  write16(be,eh.e_shstrndx,shstrndx);
  fwritex(f,&eh,sizeof(struct Elf32_Ehdr));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, 0x10(%rsp)
movl %r8d, 0xc(%rsp)
movl %ecx, 0x8(%rsp)
movl %edx, %ebp
movl %esi, %r13d
movq %rdi, 0x50(%rsp)
movzwl 0x98(%rsp), %eax
movl %eax, 0x14(%rsp)
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movzwl 0xa8(%rsp), %eax
movl %eax, 0x18(%rsp)
movzwl 0xa0(%rsp), %r12d
movl 0xb0(%rsp), %r15d
xorps %xmm0, %xmm0
leaq 0x1c(%rsp), %r14
movups %xmm0, 0x24(%r14)
movups %xmm0, 0x17(%r14)
movups %xmm0, 0x7(%r14)
leaq 0x18e8e(%rip), %rsi     # 0x2f880
movl $0x4, %edx
movq %r14, %rdi
callq 0x5060
movb $0x1, %al
cmpl $0x1, %r15d
movb $0x2, %cl
sbbb $0x0, %cl
movb %al, 0x4(%r14)
movb %cl, 0x5(%r14)
movb %al, 0x6(%r14)
leaq 0x2c(%rsp), %rsi
movl %r15d, %edi
movl %r13d, %edx
callq 0x698b
leaq 0x2e(%rsp), %rsi
movl %r15d, %edi
movl %ebp, %edx
callq 0x698b
leaq 0x30(%rsp), %rsi
movl %r15d, %edi
movl $0x1, %edx
callq 0x69a0
leaq 0x34(%rsp), %rsi
movl %r15d, %edi
movl 0x8(%rsp), %edx
callq 0x69a0
leaq 0x38(%rsp), %rsi
movl %r15d, %edi
movl 0xc(%rsp), %edx
callq 0x69a0
leaq 0x3c(%rsp), %rsi
movl %r15d, %edi
movl 0x10(%rsp), %edx
callq 0x69a0
leaq 0x40(%rsp), %rsi
movl %r15d, %edi
movl 0x90(%rsp), %edx
callq 0x69a0
leaq 0x44(%rsp), %rsi
movl %r15d, %edi
movl $0x34, %edx
callq 0x698b
leaq 0x46(%rsp), %rsi
shll $0x5, %ebx
movl %r15d, %edi
movl %ebx, %edx
callq 0x698b
leaq 0x48(%rsp), %rsi
movl %r15d, %edi
movl 0x14(%rsp), %edx
callq 0x698b
testl %r12d, %r12d
leaq 0x4a(%rsp), %rsi
movl $0x28, %edx
cmovel %r12d, %edx
movl %r15d, %edi
callq 0x698b
leaq 0x4c(%rsp), %rsi
movl %r15d, %edi
movl %r12d, %edx
callq 0x698b
leaq 0x4e(%rsp), %rsi
movl %r15d, %edi
movl 0x18(%rsp), %edx
callq 0x698b
movl $0x34, %edx
movq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x6ba5
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_writephdrs
void elf32_writephdrs(struct GlobalVars *gv,FILE *f)
/* write 32-bit ELF Program Header (PHDR) */
{
  bool be = elf32_endianess == _BIG_ENDIAN_;
  long gapsize = file_hdr_gap;
  struct Elf32_Phdr phdr;
  struct Phdr *p;

  for (p=gv->phdrlist; p; p=p->next) {
    if (p->flags & PHDR_USED) {
      if (p->start!=ADDR_NONE && p->start_vma!=ADDR_NONE) {
        write32(be,phdr.p_type,p->type);
        write32(be,phdr.p_offset,p->offset);
        write32(be,phdr.p_vaddr,p->start_vma);
        write32(be,phdr.p_paddr,p->start);
        write32(be,phdr.p_filesz,p->file_end - p->start);
        write32(be,phdr.p_memsz,p->mem_end - p->start);
        write32(be,phdr.p_flags,p->flags & PHDR_PFMASK);
        write32(be,phdr.p_align,1L<<p->alignment);
        fwritex(f,&phdr,sizeof(struct Elf32_Phdr));
      }
      else
        gapsize += sizeof(struct Elf32_Phdr);
    }
  }
  fwritegap(f,gapsize);  /* gap at the end, for unused PHDRs */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
xorl %ebp, %ebp
cmpb $0x1, 0x18cd8(%rip)     # 0x2f810
sete %al
movq 0x1cdbe(%rip), %r14     # 0x33900
movq 0x1f8(%rdi), %r13
testq %r13, %r13
je 0x16c33
movb %al, %bpl
leaq 0x24(%rsp), %r15
leaq 0x8(%rsp), %r12
testb $0x10, 0x24(%r13)
je 0x16c26
cmpq $-0x1, 0x30(%r13)
je 0x16c22
cmpq $-0x1, 0x28(%r13)
je 0x16c22
movl 0x20(%r13), %edx
movl %ebp, %edi
movq %r12, %rsi
callq 0x69a0
movl 0x48(%r13), %edx
movl %ebp, %edi
leaq 0xc(%rsp), %rsi
callq 0x69a0
movl 0x28(%r13), %edx
movl %ebp, %edi
leaq 0x10(%rsp), %rsi
callq 0x69a0
movl 0x30(%r13), %edx
movl %ebp, %edi
leaq 0x14(%rsp), %rsi
callq 0x69a0
movl 0x38(%r13), %edx
subl 0x30(%r13), %edx
movl %ebp, %edi
leaq 0x18(%rsp), %rsi
callq 0x69a0
movl 0x40(%r13), %edx
subl 0x30(%r13), %edx
movl %ebp, %edi
leaq 0x1c(%rsp), %rsi
callq 0x69a0
movzwl 0x24(%r13), %edx
andl $0xf, %edx
movl %ebp, %edi
leaq 0x20(%rsp), %rsi
callq 0x69a0
movb 0x26(%r13), %cl
movl $0x1, %edx
shlq %cl, %rdx
movl %ebp, %edi
movq %r15, %rsi
callq 0x69a0
movl $0x20, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6ba5
jmp 0x16c26
addq $0x20, %r14
movq (%r13), %r13
testq %r13, %r13
jne 0x16b5f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6d33
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_elf32.c
// Function: elf32_addsymlist
void elf32_addsymlist(struct GlobalVars *gv,struct SymTabList *sl,
                      uint8_t bind,uint8_t type)
/* add all symbols with specified bind and type to the ELF symbol list */
{
  struct LinkedSection *ls = (struct LinkedSection *)gv->lnksec.first;
  struct LinkedSection *nextls;
  struct Symbol *nextsym,*sym;

  while (nextls = (struct LinkedSection *)ls->n.next) {
    sym = (struct Symbol *)ls->symbols.first;

    while (nextsym = (struct Symbol *)sym->n.next) {
      uint8_t symtype = elf32_getinfo(sym);
      uint8_t symbind = elf32_getbind(sym);

      if (symbind == bind && (!type || (symtype == type))) {
        if (!discard_symbol(gv,sym)) {
          remnode(&sym->n);
          elf32_addsym(sl,&elf32stringlist,sym->name,(uint32_t)sym->value,
                       sym->size,symbind,symtype,
                       elf32_getshndx(gv,sym,symtype));
        }
      }
      sym = nextsym;
    }
    ls = nextls;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebx
movq %rsi, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x1c0(%rdi), %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0x16fe2
movl %edx, %ebp
movzbl %bpl, %edx
movl %edx, 0x4(%rsp)
leaq 0xc778(%rip), %r13      # 0x23679
movl %ebp, 0x8(%rsp)
movq 0xb0(%rcx), %r15
movq %rax, 0x18(%rsp)
movq (%r15), %rax
testq %rax, %rax
je 0x16fd1
movq %r15, %r14
movq %rax, %r15
movq %r14, %rdi
callq 0x15ece
movl %eax, %r12d
movzbl 0x43(%r14), %esi
leal -0x1(%rsi), %eax
cmpb $0x3, %al
jb 0x16f46
movq %r13, %rdi
xorl %eax, %eax
callq 0x52b0
movb $0x1, %al
testb %bl, %bl
sete %cl
cmpb %bl, %r12b
sete %dl
cmpb %bpl, %al
jne 0x16f11
orb %dl, %cl
je 0x16f11
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xcb79
testl %eax, %eax
jne 0x16f11
movq %r14, %rdi
callq 0x6759
movq 0x20(%r14), %r13
movl 0x30(%r14), %eax
movl %eax, 0xc(%rsp)
movl 0x44(%r14), %ebp
movzbl %r12b, %r12d
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x168be
movzwl %ax, %eax
movq 0x20(%rsp), %rdi
leaq 0x187da(%rip), %rsi     # 0x2f780
movq %r13, %rdx
leaq 0xc6c9(%rip), %r13      # 0x23679
movl 0xc(%rsp), %ecx
movl %ebp, %r8d
movl 0x8(%rsp), %ebp
movl 0x4(%rsp), %r9d
pushq %rax
pushq %r12
callq 0x15d58
addq $0x10, %rsp
jmp 0x16f11
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
testq %rax, %rax
jne 0x16f05
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_elf32.c
// Function: elf32_addshdr
static struct ShdrNode *elf32_addshdr(uint32_t name,uint32_t type,
                                      uint32_t flags,uint32_t addr,
                                      uint32_t offset,uint32_t size,
                                      uint32_t link,uint32_t info,
                                      uint32_t align,uint32_t entsize,bool be)
{
  struct ShdrNode *shn = elf32_newshdr();

  write32(be,shn->s.sh_name,name);
  write32(be,shn->s.sh_type,type);
  write32(be,shn->s.sh_flags,flags);
  write32(be,shn->s.sh_addr,addr);
  write32(be,shn->s.sh_offset,offset);
  write32(be,shn->s.sh_size,size);
  write32(be,shn->s.sh_link,link);
  write32(be,shn->s.sh_info,info);
  write32(be,shn->s.sh_addralign,align);
  write32(be,shn->s.sh_entsize,entsize);
  return shn;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, (%rsp)
movl %ecx, %r12d
movl %edx, %ebx
movl %esi, %r13d
movl %edi, %r15d
movl 0x60(%rsp), %ebp
movl $0x38, %edi
callq 0x6686
movq %rax, %r14
leaq 0x1bc29(%rip), %rdi     # 0x33908
movq %rax, %rsi
callq 0x6729
incl 0x1bc33(%rip)           # 0x33920
leaq 0x10(%r14), %rsi
movl %ebp, %edi
movl %r15d, %edx
callq 0x69a0
leaq 0x14(%r14), %rsi
movl %ebp, %edi
movl %r13d, %edx
callq 0x69a0
leaq 0x18(%r14), %rsi
movl %ebp, %edi
movl %ebx, %edx
callq 0x69a0
leaq 0x1c(%r14), %rsi
movl %ebp, %edi
movl %r12d, %edx
callq 0x69a0
leaq 0x20(%r14), %rsi
movl %ebp, %edi
movl (%rsp), %edx
callq 0x69a0
leaq 0x24(%r14), %rsi
movl %ebp, %edi
movl 0x4(%rsp), %edx
callq 0x69a0
leaq 0x28(%r14), %rsi
movl %ebp, %edi
movl 0x40(%rsp), %edx
callq 0x69a0
leaq 0x2c(%r14), %rsi
movl %ebp, %edi
movl 0x48(%rsp), %edx
callq 0x69a0
leaq 0x30(%r14), %rsi
movl %ebp, %edi
movl 0x50(%rsp), %edx
callq 0x69a0
leaq 0x34(%r14), %rsi
movl %ebp, %edi
movl 0x58(%rsp), %edx
callq 0x69a0
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_elf32.c
// Function: elf32_makeshstrtab
void elf32_makeshstrtab(void)
/* creates .shstrtab */
{
  bool be = elf32_endianess == _BIG_ENDIAN_;

  elf32_addshdr(shstrtabidx,SHT_STRTAB,0,0,elf32offset,
                elf32shstrlist.nextindex,0,0,1,0,be);
  elf32offset += elf32shstrlist.nextindex;
  elf32offset += align(elf32offset,2);
}

// Assembly:
pushq %rax
xorl %eax, %eax
cmpb $0x1, 0x17a77(%rip)     # 0x2f810
sete %al
movl 0x1bb8e(%rip), %edi     # 0x33930
movl 0x1bb7f(%rip), %r8d     # 0x33928
movl 0x17a58(%rip), %r9d     # 0x2f808
subq $0x8, %rsp
xorl %r10d, %r10d
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
pushq %rax
pushq %r10
pushq $0x1
pushq %r10
pushq %r10
callq 0x17ca8
addq $0x30, %rsp
movl 0x17a30(%rip), %edi     # 0x2f808
addq 0x1bb49(%rip), %rdi     # 0x33928
movq %rdi, 0x1bb42(%rip)     # 0x33928
movl $0x2, %esi
callq 0x6dcb
addq %rax, 0x1bb31(%rip)     # 0x33928
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_makestrtab
void elf32_makestrtab(void)
/* creates .strtab */
{
  bool be = elf32_endianess == _BIG_ENDIAN_;

  elf32_addshdr(strtabidx,SHT_STRTAB,0,0,elf32offset,
                elf32stringlist.nextindex,0,0,1,0,be);
  elf32offset += elf32stringlist.nextindex;
  elf32offset += align(elf32offset,2);
}

// Assembly:
pushq %rax
xorl %eax, %eax
cmpb $0x1, 0x17a0d(%rip)     # 0x2f810
sete %al
movl 0x1bb28(%rip), %edi     # 0x33934
movl 0x1bb15(%rip), %r8d     # 0x33928
movl 0x1798e(%rip), %r9d     # 0x2f7a8
subq $0x8, %rsp
xorl %r10d, %r10d
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
pushq %rax
pushq %r10
pushq $0x1
pushq %r10
pushq %r10
callq 0x17ca8
addq $0x30, %rsp
movl 0x17966(%rip), %edi     # 0x2f7a8
addq 0x1badf(%rip), %rdi     # 0x33928
movq %rdi, 0x1bad8(%rip)     # 0x33928
movl $0x2, %esi
callq 0x6dcb
addq %rax, 0x1bac7(%rip)     # 0x33928
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_makestabstr
void elf32_makestabstr(void)
/* create .stabstr */
{
  if (stabdebugidx) {
    bool be = elf32_endianess == _BIG_ENDIAN_;
    uint32_t size = 0;
    struct StabCompUnit *cu;

    for (cu=(struct StabCompUnit *)elf32stabcompunits.first;
         cu->n.next!=NULL; cu=(struct StabCompUnit *)cu->n.next)
      size += cu->strtab.nextindex;

    if (stabshdr) {
      /* patch sh_link field of .stab */
      write32(be,stabshdr->s.sh_link,elf32shdridx);
    }
    elf32_addshdr(stabdebugidx,SHT_STRTAB,0,0,elf32offset,size,0,0,1,0,be);
    elf32offset += size;
  }
}

// Assembly:
movl 0x1bacf(%rip), %edi     # 0x33938
testl %edi, %edi
je 0x17efe
pushq %r14
pushq %rbx
pushq %rax
xorl %r14d, %r14d
cmpb $0x1, 0x17991(%rip)     # 0x2f810
sete %al
movq 0x1bab7(%rip), %rcx     # 0x33940
movq (%rcx), %rdx
xorl %ebx, %ebx
testq %rdx, %rdx
je 0x17e9e
addl 0x60(%rcx), %ebx
movq %rdx, %rcx
movq (%rdx), %rdx
jmp 0x17e8e
movb %al, %r14b
movq 0x1bab0(%rip), %rsi     # 0x33958
testq %rsi, %rsi
je 0x17ec5
addq $0x28, %rsi
movl 0x1ba69(%rip), %edx     # 0x33920
movl %r14d, %edi
callq 0x69a0
movl 0x1ba73(%rip), %edi     # 0x33938
movl 0x1ba5c(%rip), %r8d     # 0x33928
subq $0x8, %rsp
xorl %eax, %eax
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebx, %r9d
pushq %r14
pushq %rax
pushq $0x1
pushq %rax
pushq %rax
callq 0x17ca8
addq $0x30, %rsp
movl %ebx, %eax
addq %rax, 0x1ba31(%rip)     # 0x33928
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_makesymtab
void elf32_makesymtab(uint32_t strtabindex)
/* creates .symtab */
{
  bool be = elf32_endianess == _BIG_ENDIAN_;

  elf32_addshdr(symtabidx,SHT_SYMTAB,0,0,elf32offset,
                elf32symlist.nextindex * sizeof(struct Elf32_Sym),
                strtabindex,elf32symlist.global_index,4,
                sizeof(struct Elf32_Sym),be);
  elf32offset += elf32symlist.nextindex * sizeof(struct Elf32_Sym);
}

// Assembly:
pushq %rax
movl %edi, %eax
xorl %r10d, %r10d
cmpb $0x1, 0x17904(%rip)     # 0x2f810
sete %r10b
movl 0x1ba4a(%rip), %edi     # 0x33960
movl 0x1ba0b(%rip), %r8d     # 0x33928
movl 0x17824(%rip), %r9d     # 0x2f748
shll $0x4, %r9d
movl 0x1781d(%rip), %r11d    # 0x2f74c
subq $0x8, %rsp
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
pushq %r10
pushq $0x10
pushq $0x4
pushq %r11
pushq %rax
callq 0x17ca8
addq $0x30, %rsp
movl 0x177f4(%rip), %eax     # 0x2f748
shlq $0x4, %rax
addq %rax, 0x1b9c9(%rip)     # 0x33928
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: write_nlist
static void write_nlist(bool be,struct nlist32 *n,long strx,
                        uint8_t type,int8_t othr,int16_t desc,uint32_t val)
{
  write32(be,&n->n_strx,strx);
  n->n_type = type;
  n->n_other = othr;
  write16(be,&n->n_desc,desc);
  write32(be,&n->n_value,val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rsi, %r15
movl %edi, %r12d
movl 0x40(%rsp), %r13d
callq 0x69a0
movb %r14b, 0x4(%r15)
movb %bpl, 0x5(%r15)
leaq 0x6(%r15), %rsi
movzwl %bx, %edx
movl %r12d, %edi
callq 0x698b
addq $0x8, %r15
movl %r12d, %edi
movq %r15, %rsi
movl %r13d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x69a0
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_initoutput
void elf32_initoutput(struct GlobalVars *gv,
                      uint32_t init_file_offset,int8_t output_endianess)
/* initialize section header, program header, relocation, symbol, */
/* string and section header string lists */
{
  elf32_endianess = output_endianess;
  elf32offset = init_file_offset;
  file_hdr_gap = 0;

  if (gv->phdrlist == NULL) {
    /* we need to provide at least one dummy PHDR, even for reloc-objects */
    struct Phdr *p = alloczero(sizeof(struct Phdr));

    p->type = PT_LOAD;
    p->flags = PF_X|PF_W|PF_R|PHDR_USED;
    p->mem_end = p->file_end = 0xffffffff;
    p->offset = fff[gv->dest_format]->headersize(gv);
    gv->phdrlist = p;
  }

  initlist(&shdrlist);
  initlist(&phdrlist);
  initlist(&relalist);
  elf32shdridx = 0;

  symtabidx = elf32_addshdrstr(".symtab");
  strtabidx = elf32_addshdrstr(".strtab");
  shstrtabidx = elf32_addshdrstr(".shstrtab");
  elf32_newshdr();          /* first Shdr is always zero */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movb %dl, 0x17483(%rip)      # 0x2f810
movl %esi, %eax
movq %rax, 0x1b592(%rip)     # 0x33928
movq $0x0, 0x1b55f(%rip) # 0x33900
cmpq $0x0, 0x1f8(%rdi)
jne 0x183f5
movq %rdi, %rbx
movl $0x58, %edi
callq 0x6686
movq %rax, %r14
movl $0x1, 0x20(%rax)
movw $0x17, 0x24(%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x38(%r14)
movq %rax, 0x40(%r14)
movzbl 0x50(%rbx), %eax
leaq 0x16da0(%rip), %rcx     # 0x2f180
movq (%rcx,%rax,8), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %rax, 0x48(%r14)
movq %r14, 0x1f8(%rbx)
leaq 0x1b50c(%rip), %rbx     # 0x33908
movq %rbx, %rdi
callq 0x66da
leaq 0x1b55d(%rip), %rdi     # 0x33968
callq 0x66da
leaq 0x1b569(%rip), %rdi     # 0x33980
callq 0x66da
movl $0x0, 0x1b4fa(%rip)     # 0x33920
leaq 0x173b3(%rip), %r14     # 0x2f7e0
leaq 0xb3f2(%rip), %rsi      # 0x23826
movq %r14, %rdi
callq 0x167f2
movl %eax, 0x1b51e(%rip)     # 0x33960
leaq 0xb3e5(%rip), %rsi      # 0x2382e
movq %r14, %rdi
callq 0x167f2
movl %eax, 0x1b4dd(%rip)     # 0x33934
leaq 0xb3d8(%rip), %rsi      # 0x23836
movq %r14, %rdi
callq 0x167f2
movl %eax, 0x1b4c4(%rip)     # 0x33930
movl $0x38, %edi
callq 0x6686
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6729
incl 0x1b499(%rip)           # 0x33920
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_writesegments
void elf32_writesegments(struct GlobalVars *gv,FILE *f)
/* write all PT_LOAD segments, with alignment gaps, etc. */
{
  struct Phdr *p;
  struct LinkedSection *ls;

  for (p=gv->phdrlist; p; p=p->next) {
    if (p->type==PT_LOAD && (p->flags&PHDR_USED) &&
        p->start!=ADDR_NONE && p->start_vma!=ADDR_NONE) {
      /* write page-alignment gap */
      fwritegap(f,p->alignment_gap);

      /* write section contents */
      for (ls=(struct LinkedSection *)gv->lnksec.first;
           ls->n.next!=NULL; ls=(struct LinkedSection *)ls->n.next) {
        if (ls->copybase>=(unsigned long)p->start &&
            (ls->copybase+ls->size)<=(unsigned long)p->mem_end &&
            (ls->flags & SF_ALLOC)) {
          if (ls->filesize)
            fwritex(f,ls->data,ls->filesize);  /* section's contents */
          if (ls->gapsize)
            fwritegap(f,ls->gapsize);  /* inter-section alignment gap */
        }
      }
    }
  }

  /* unallocated sections at last */
  for (ls=(struct LinkedSection *)gv->lnksec.first;
       ls->n.next!=NULL; ls=(struct LinkedSection *)ls->n.next) {
    if (!(ls->flags & SF_ALLOC)) {
      if (!(ls->flags & SF_UNINITIALIZED))
        fwritex(f,ls->data,ls->size);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1f8(%rdi), %r15
testq %r15, %r15
je 0x18538
cmpl $0x1, 0x20(%r15)
jne 0x18530
testb $0x10, 0x24(%r15)
je 0x18530
cmpq $-0x1, 0x30(%r15)
je 0x18530
cmpq $-0x1, 0x28(%r15)
je 0x18530
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x6d33
movq 0x1c0(%r14), %r12
cmpq $0x0, (%r12)
je 0x18530
movq 0x38(%r12), %rax
cmpq 0x30(%r15), %rax
jb 0x1852a
addq 0x48(%r12), %rax
cmpq 0x40(%r15), %rax
ja 0x1852a
testb $0x1, 0x21(%r12)
je 0x1852a
movq 0x50(%r12), %rdx
testq %rdx, %rdx
je 0x18518
movq 0x78(%r12), %rsi
movq %rbx, %rdi
callq 0x6ba5
movq 0x58(%r12), %rsi
testq %rsi, %rsi
je 0x1852a
movq %rbx, %rdi
callq 0x6d33
movq (%r12), %r12
jmp 0x184dc
movq (%r15), %r15
jmp 0x184a4
movq 0x1c0(%r14), %r14
movq (%r14), %rax
testq %rax, %rax
je 0x18569
testb $0x3, 0x21(%r14)
jne 0x18561
movq 0x48(%r14), %rdx
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x6ba5
movq (%r14), %rax
movq %rax, %r14
movq (%rax), %rax
jmp 0x18542
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_writesections
void elf32_writesections(struct GlobalVars *gv,FILE *f)
/* write all linked sections */
{
  struct LinkedSection *ls;

  /* write all allocated sections */
  for (ls=(struct LinkedSection *)gv->lnksec.first;
       ls->n.next!=NULL; ls=(struct LinkedSection *)ls->n.next) {
    if (ls->flags & SF_ALLOC) {
      if (!(ls->flags & SF_UNINITIALIZED))
        fwritex(f,ls->data,ls->size);
    }
  }
  /* unallocated sections at last */
  for (ls=(struct LinkedSection *)gv->lnksec.first;
       ls->n.next!=NULL; ls=(struct LinkedSection *)ls->n.next) {
    if (!(ls->flags & SF_ALLOC)) {
      if (!(ls->flags & SF_UNINITIALIZED))
        fwritex(f,ls->data,ls->size);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x1c0(%rdi), %r15
movq (%r15), %rax
testq %rax, %rax
je 0x185ea
movq %rsi, %rbx
movq %rdi, %r14
movb 0x21(%r15), %cl
andb $0x3, %cl
cmpb $0x1, %cl
jne 0x185ae
movq 0x48(%r15), %rdx
movq 0x78(%r15), %rsi
movq %rbx, %rdi
callq 0x6ba5
movq (%r15), %rax
movq %rax, %r15
movq (%rax), %rax
testq %rax, %rax
jne 0x1858f
movq 0x1c0(%r14), %r14
movq (%r14), %rax
testq %rax, %rax
je 0x185ea
testb $0x3, 0x21(%r14)
jne 0x185e2
movq 0x48(%r14), %rdx
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x6ba5
movq (%r14), %rax
movq %rax, %r14
movq (%rax), %rax
jmp 0x185c3
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_writestabstr
void elf32_writestabstr(FILE *f)
{
  if (stabdebugidx) {
    struct StabCompUnit *cu;

    for (cu=(struct StabCompUnit *)elf32stabcompunits.first;
         cu->n.next!=NULL; cu=(struct StabCompUnit *)cu->n.next)
      elf32_writestrtab(f,&cu->strtab);
  }
}

// Assembly:
cmpl $0x0, 0x1b303(%rip)     # 0x33938
je 0x18667
pushq %r14
pushq %rbx
pushq %rax
movq 0x1b2fe(%rip), %r14     # 0x33940
cmpq $0x0, (%r14)
je 0x18660
movq %rdi, %rbx
leaq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0x185f0
movq (%r14), %r14
cmpq $0x0, (%r14)
jne 0x1864b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_writerelocs
void elf32_writerelocs(struct GlobalVars *gv,FILE *f)
{
  struct RelaNode *rn;

  while (rn = (struct RelaNode *)remhead(&relalist))
    fwritex(f,&rn->r,
            gv->reloctab_format==RTAB_ADDEND ?
              sizeof(struct Elf32_Rela) : sizeof(struct Elf32_Rel));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1b2ce(%rip), %rdi     # 0x33980
callq 0x673f
testq %rax, %rax
je 0x186f1
leaq 0x1b2bd(%rip), %r15     # 0x33980
addq $0x10, %rax
xorl %ecx, %ecx
cmpb $0x2, 0x6e(%r14)
sete %cl
leaq 0x8(,%rcx,4), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6ba5
movq %r15, %rdi
callq 0x673f
testq %rax, %rax
jne 0x186c3
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_findsym
static uint32_t elf32_findsym(struct SymTabList *sl,const char *name,
                              uint16_t shndx,bool be)
/* find an ELF symbol by its name and shndx */
/* return its symbol table index, index=0 means 'not found' */
{
  struct SymbolNode **chain = &sl->hashtab[elf_hash(name) % sl->htabsize];
  struct SymbolNode *sym;

  while (sym = *chain) {
    if (!strcmp(name,sym->name))
      if (read16(be,sym->s.st_shndx) == shndx)
        return sym->index;
    chain = &sym->hashchain;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq 0x1695d(%rip), %r12     # 0x2f738
callq 0x6d94
xorl %edx, %edx
divq 0x16957(%rip)           # 0x2f740
xorl %r15d, %r15d
movq (%r12,%rdx,8), %r12
testq %r12, %r12
je 0x18e23
movq 0x18(%r12), %rsi
movq %r14, %rdi
callq 0x5160
testl %eax, %eax
jne 0x18e17
leaq 0x2e(%r12), %rsi
movl %ebx, %edi
callq 0x695f
cmpw %bp, %ax
je 0x18e1e
movq 0x10(%r12), %r12
jmp 0x18df0
movl 0x30(%r12), %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32ppcbe.c
// Function: ppc32be_identify
static int ppc32be_identify(char *name,uint8_t *p,unsigned long plen,bool lib)
/* identify ELF-PPC-32Bit-BigEndian */
{
  int id;

  /* first check for ancient PowerPC machine types */
  if ((id = elf32_identify(&fff_elf32ppcbe,name,(struct Elf32_Ehdr *)p,
                           plen,ELFCLASS32,ELFDATA2MSB,EM_CYGNUS_POWERPC,
                           ELF_VER)) != ID_UNKNOWN)
    return (id);

  /* EM_PPC_OLD is used in Motorola's libmoto.a, for example... */
  if ((id = elf32_identify(&fff_elf32ppcbe,name,(struct Elf32_Ehdr *)p,
                           plen,ELFCLASS32,ELFDATA2MSB,EM_PPC_OLD,
                           ELF_VER)) != ID_UNKNOWN)
    return (id);

  /* the normal case: EM_PPC */
  return (elf32_identify(&fff_elf32ppcbe,name,(struct Elf32_Ehdr *)p,plen,
                         ELFCLASS32,ELFDATA2MSB,EM_PPC,ELF_VER));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1689f(%rip), %rdi     # 0x2f890
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
movl $0x2, %r9d
pushq $0x1
pushq $0x9025                 # imm = 0x9025
callq 0x13d44
addq $0x10, %rsp
testl %eax, %eax
jne 0x19070
leaq 0x1686f(%rip), %rdi     # 0x2f890
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
movl $0x2, %r9d
pushq $0x1
pushq $0x11
callq 0x13d44
addq $0x10, %rsp
testl %eax, %eax
jne 0x19070
leaq 0x16842(%rip), %rdi     # 0x2f890
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
movl $0x2, %r9d
pushq $0x1
pushq $0x14
callq 0x13d44
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32ppcbe.c
// Function: ppc32be_readconv
static void ppc32be_readconv(struct GlobalVars *gv,struct LinkFile *lf)
/* Read elfppc32be 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,ELFDATA2MSB,ELF_VER,
                            3,EM_PPC,EM_PPC_OLD,EM_CYGNUS_POWERPC);
        elf32_parse(gv,lf,(struct Elf32_Ehdr *)ai.data,
                    ppc32_reloc_elf2vlink);
      }
    }
    else
      ierror("ppc32be_readconv(): archive %s corrupted since last access",
             lf->pathname);
  }
  else {
    lf->objname = lf->filename;
    elf32_parse(gv,lf,(struct Elf32_Ehdr *)lf->data,ppc32_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 0x19145
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
callq 0xce54
testl %eax, %eax
je 0x19174
movq %rsp, %rdi
callq 0xcec0
testl %eax, %eax
je 0x19186
leaq 0x20(%rsp), %r15
leaq 0x160b1(%rip), %rbp     # 0x2f180
leaq 0xaf6(%rip), %r12       # 0x19bcc
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 $0x2, %r8d
movl $0x1, %r9d
xorl %eax, %eax
pushq $0x9025                 # imm = 0x9025
pushq $0x11
pushq $0x14
pushq $0x3
callq 0x13eca
addq $0x20, %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 0x190d9
jmp 0x19186
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
leaq 0xa74(%rip), %rcx       # 0x19bcc
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 0xae6e(%rip), %rdi      # 0x23fed
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_elf32ppcbe.c
// Function: amiga_targetlink
static int amiga_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 (elf32_targetlink(gv,ls,s));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, 0x54(%rdi)
jne 0x1941c
cmpl $0x0, 0x244(%r15)
jne 0x1941c
movq 0x18(%r14), %r12
leaq 0x920b(%rip), %rsi      # 0x225a1
movl $0x6, %edx
movq %r12, %rdi
callq 0x5070
testl %eax, %eax
jne 0x193ce
movq 0x20(%rbx), %r13
leaq 0x91f6(%rip), %rsi      # 0x225a8
movl $0x5, %edx
movq %r13, %rdi
callq 0x5070
testl %eax, %eax
jne 0x193ce
movb 0x6(%r12), %al
cmpb 0x5(%r13), %al
je 0x1940d
leaq 0x91d3(%rip), %rsi      # 0x225a8
movl $0x5, %edx
movq %r12, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1941c
movq 0x20(%rbx), %r13
leaq 0x91b0(%rip), %rsi      # 0x225a1
movl $0x6, %edx
movq %r13, %rdi
callq 0x5070
testl %eax, %eax
jne 0x1941c
movb 0x5(%r12), %al
cmpb 0x6(%r13), %al
jne 0x1941c
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1575d
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32ppcbe.c
// Function: amiga_setlnksym
static void amiga_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:
      case R13INIT:
        ls = smalldata_section(gv);
        xdef->relsect = (struct Section *)ls->sections.first;
        break;
      case SDATASIZE:
        if (ls = find_lnksec(gv,sdata_name,0,0,0,0))
          xdef->value = (lword)ls->size;
        break;
      case SBSSSIZE:
        if (ls = find_lnksec(gv,sbss_name,0,0,0,0))
          xdef->value = (lword)ls->size;
        break;
      case DDRELOCS:
        xdef->relsect = ddrelocs_sec(gv,find_lnksec(gv,sdata_name,0,0,0,0));
        break;
      case TEXTSIZE:
        if (ls = find_lnksec(gv,text_name,0,0,0,0))
          xdef->value = (lword)ls->size;
        break;
    }
    xdef->flags &= ~SYMF_LNKSYM;  /* do not init again */
  }
  else
    elf32_setlnksym(gv,xdef);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testb $0x1, 0x41(%rsi)
je 0x1973a
movl 0x48(%rbx), %eax
testl %eax, %eax
js 0x1974a
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x15868
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x5, %eax
ja 0x1986d
leaq 0xa351(%rip), %rcx      # 0x23ab0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0xc9b2
movq 0x60(%rax), %rax
movq %rax, 0x38(%rbx)
jmp 0x1986d
leaq 0x8e24(%rip), %rsi      # 0x225a8
jmp 0x19796
leaq 0x8e14(%rip), %rsi      # 0x225a1
jmp 0x19796
leaq 0x8dfa(%rip), %rsi      # 0x22590
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbe13
testq %rax, %rax
je 0x1986d
movq 0x48(%rax), %rax
movq %rax, 0x30(%rbx)
jmp 0x1986d
leaq 0x8ddc(%rip), %rsi      # 0x225a1
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbe13
testq %rax, %rax
je 0x197e6
movq 0x60(%rax), %rax
addq $0x10, %rax
jmp 0x197ed
leaq 0x138(%r14), %rax
movq (%rax), %r15
testq %r15, %r15
jne 0x19803
leaq 0xa856(%rip), %rdi      # 0x24052
xorl %eax, %eax
callq 0x52b0
leaq 0x16394(%rip), %rsi     # 0x2fb9e
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xc0a9
movq %rax, %r15
movabsq $0x2010102ffffffff, %rax # imm = 0x2010102FFFFFFFF
movq %rax, 0x28(%r15)
movq 0x20(%r15), %rsi
movq %r14, %rdi
movl $0x2, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x2, %r9d
callq 0xc37c
movq %rax, %r14
leaq 0x60(%rax), %rdi
movq %r15, %rsi
callq 0x6729
movq %r14, 0x18(%r15)
movl $0x1, %eax
movq %rax, 0x48(%r14)
movq %rax, 0x48(%r15)
movq %r15, 0x38(%rbx)
andb $-0x2, 0x41(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32ppcbe.c
// Function: amiga_writeexec
static void amiga_writeexec(struct GlobalVars *gv,FILE *f)
/* creates a target-elf32powerup executable file, which in */
/* reality is a relocatable object too, but all symbol references have */
/* been resolved */
{
  struct LinkedSection *ls;

  if (gv->collect_ctors_type == CCDT_VBCC_ELF) {
    static const char ctname[] = ".vbcc_ctors";
    static const char dtname[] = ".vbcc_dtors";
    /* rename .ctors and .dtors,
       otherwise the PowerUp ELF loader will rearrange the pointers */
    if (ls = find_lnksec(gv,ctors_name,0,0,0,0))
      ls->name = ctname;
    if (ls = find_lnksec(gv,dtors_name,0,0,0,0))
      ls->name = dtname;
  }

  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;

    /* setup ddrelocs section, if present */
    if (!strcmp(ls->name,ddrelocs_name))
      make_ddrelocs(gv,ls);
  }

  elf32_writeobject(gv,f,EM_PPC,_BIG_ENDIAN_,ppc32_reloc_vlink2elf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x3, 0x203(%rdi)
jne 0x19905
leaq 0x8d03(%rip), %rsi      # 0x225bd
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbe13
testq %rax, %rax
je 0x198dc
leaq 0xa6d8(%rip), %rcx      # 0x23fb0
movq %rcx, 0x18(%rax)
leaq 0x8ce1(%rip), %rsi      # 0x225c4
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbe13
testq %rax, %rax
je 0x19905
leaq 0xa6bb(%rip), %rcx      # 0x23fbc
movq %rcx, 0x18(%rax)
movq 0x1c0(%r14), %r15
movq (%r15), %r13
testq %r13, %r13
je 0x19954
leaq 0x16283(%rip), %r12     # 0x2fb9e
testb $0x2, 0x21(%r15)
jne 0x1992a
movq 0x48(%r15), %rax
movq %rax, 0x50(%r15)
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0x5160
testl %eax, %eax
jne 0x19948
movq %r14, %rdi
movq %r15, %rsi
callq 0x1a10a
movq (%r15), %r13
movq %r13, %r15
movq (%r13), %r13
testq %r13, %r13
jne 0x1991b
leaq 0x3a4(%rip), %r8        # 0x19cff
movq %r14, %rdi
movq %rbx, %rsi
movl $0x14, %edx
movl $0x1, %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x186f7
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32ppcbe.c
// Function: init_got
static void init_got(struct GlobalVars *gv)
/* initialize target-specific .got contents */
{
  struct LinkedSection *got,*dyn;

  if (got = find_lnksec(gv,got_name,0,0,0,0)) {
    write32be(got->data,0x4e800021);  		  /* 0: blrl */
    if (dyn = find_lnksec(gv,dyn_name,0,0,0,0))
      write32be(got->data+4,(uint32_t)dyn->base);   /* 4: .dynamic address */
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x892e(%rip), %rsi      # 0x225cb
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbe13
testq %rax, %rax
je 0x19cf7
movq %rax, %rbx
movq 0x78(%rax), %rdi
movl $0x4e800021, %esi       # imm = 0x4E800021
callq 0x693d
leaq 0x9705(%rip), %rsi      # 0x233ce
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbe13
testq %rax, %rax
je 0x19cf7
movq 0x78(%rbx), %rdi
addq $0x4, %rdi
movl 0x40(%rax), %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x693d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32ppcbe.c
// Function: make_ddrelocs
static void make_ddrelocs(struct GlobalVars *gv,struct LinkedSection *ddrel)
{
  struct LinkedSection *sdata;
  struct Section *sec;
  struct Reloc *rel;
  uint8_t *table;
  uint32_t *p;
  unsigned long size;
  uint32_t nrelocs = 0;

  if (sdata = find_lnksec(gv,sdata_name,0,0,0,0)) {
    for (rel=(struct Reloc *)sdata->relocs.first;
         rel->n.next!=NULL; rel=(struct Reloc *)rel->n.next) {
      if (rel->relocsect.lnk==sdata && rel->rtype==R_ABS)
        nrelocs++;
    }
  }

  size = (nrelocs+1) * sizeof(uint32_t);
  table = alloc(size);
  p = (uint32_t *)table;
  write32be(p++,nrelocs);

  if (sdata) {
    for (rel=(struct Reloc *)sdata->relocs.first;
         rel->n.next!=NULL; rel=(struct Reloc *)rel->n.next) {
      if (rel->relocsect.lnk==sdata && rel->rtype==R_ABS)
        write32be(p++,(uint32_t)rel->offset);
    }
  }

  ddrel->data = table;
  ddrel->size = ddrel->filesize = size;
  if (sec = (struct Section *)ddrel->sections.first) {
    sec->data = table;
    sec->size = size;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x8482(%rip), %rsi      # 0x225a1
xorl %r12d, %r12d
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbe13
movq %rax, %r14
testq %rax, %rax
je 0x1a16b
movq 0x80(%r14), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x1a16b
xorl %r12d, %r12d
movq %rcx, %rdx
cmpq %r14, 0x18(%rax)
jne 0x1a160
xorl %ecx, %ecx
cmpb $0x1, 0x38(%rax)
sete %cl
addl %ecx, %r12d
movq (%rdx), %rcx
movq %rdx, %rax
testq %rcx, %rcx
jne 0x1a14b
leal 0x1(%r12), %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x6638
movq %rax, %r13
movq %rax, %rdi
movl %r12d, %esi
callq 0x693d
testq %r14, %r14
je 0x1a1d5
movq 0x80(%r14), %r12
movq (%r12), %rax
testq %rax, %rax
je 0x1a1d5
movq %r13, %rdi
addq $0x4, %rdi
cmpq %r14, 0x18(%r12)
jne 0x1a1ca
cmpb $0x1, 0x38(%r12)
jne 0x1a1ca
leaq 0x4(%rdi), %rbp
movl 0x20(%r12), %esi
callq 0x693d
movq (%r12), %rax
movq %rbp, %rdi
movq %rax, %r12
movq (%rax), %rax
testq %rax, %rax
jne 0x1a1a6
movq %r13, 0x78(%rbx)
movq %r15, 0x50(%rbx)
movq %r15, 0x48(%rbx)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1a1f2
movq %r13, 0x40(%rax)
movq %r15, 0x48(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_elf32m68k.c
// Function: m68k_readconv
static void m68k_readconv(struct GlobalVars *gv,struct LinkFile *lf)
/* Read ELF-68k 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,ELFDATA2MSB,ELF_VER,1,EM_68K);
        elf32_parse(gv,lf,(struct Elf32_Ehdr *)ai.data,m68k_reloc_elf2vlink);
      }
    }
    else
      ierror("m68k_readconv(): archive %s corrupted since last access",
             lf->pathname);
  }
  else {
    lf->objname = lf->filename;
    elf32_parse(gv,lf,(struct Elf32_Ehdr *)lf->data,m68k_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 0x1a2f8
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
callq 0xce54
testl %eax, %eax
je 0x1a327
movq %rsp, %rdi
callq 0xcec0
testl %eax, %eax
je 0x1a339
leaq 0x20(%rsp), %r15
leaq 0x14ef7(%rip), %rbp     # 0x2f180
leaq 0x114(%rip), %r12       # 0x1a3a4
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 $0x2, %r8d
movl $0x1, %r9d
xorl %eax, %eax
pushq $0x4
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 0x1a293
jmp 0x1a339
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
leaq 0x99(%rip), %rcx        # 0x1a3a4
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 0x9d99(%rip), %rdi      # 0x240cb
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_elf32i386.c
// Function: i386_readconv
static void i386_readconv(struct GlobalVars *gv,struct LinkFile *lf)
/* Read ELF-386 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_386);
        elf32_parse(gv,lf,(struct Elf32_Ehdr *)ai.data,i386_reloc_elf2vlink);
      }
    }
    else
      ierror("i386_readconv(): archive %s corrupted since last access",
             lf->pathname);
  }
  else {
    lf->objname = lf->filename;
    elf32_parse(gv,lf,(struct Elf32_Ehdr *)lf->data,i386_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 0x1a6f4
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
callq 0xce54
testl %eax, %eax
je 0x1a723
movq %rsp, %rdi
callq 0xcec0
testl %eax, %eax
je 0x1a735
leaq 0x20(%rsp), %r15
leaq 0x14afb(%rip), %rbp     # 0x2f180
leaq 0x41f(%rip), %r12       # 0x1aaab
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 $0x3
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 0x1a68f
jmp 0x1a735
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
leaq 0x3a4(%rip), %rcx       # 0x1aaab
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 0x9cb5(%rip), %rdi      # 0x243e3
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_elf32i386.c
// Function: i386_dynentry
static struct Symbol *i386_dynentry(struct GlobalVars *gv,DynArg a,int etype)
/* Create an entry into .got/.plt/.bss for the referenced symbol. */
{
  struct Symbol *entry_sym = NULL;
  struct Section *sec;
  char *bssname;

  switch (etype) {

    case GOT_ENTRY:
    case GOT_LOCAL:
      /* .got has 12 bytes reserved at the beginning,
         is writable, a new entry occupies 4 bytes. */
      sec = elf32_dyntable(gv,12,12,ST_DATA,SF_ALLOC,
                           SP_READ|SP_WRITE,GOT_ENTRY);
      entry_sym = elf32_pltgotentry(gv,sec,a,SYMI_OBJECT,4,4,etype);
      break;

    case PLT_ENTRY:
      /* .plt has 16 bytes reserved at the beginning, is executable,
         a new entry occupies another 16 bytes. */
      sec = elf32_dyntable(gv,16,16,ST_CODE,SF_ALLOC,
                           SP_READ|SP_EXEC,PLT_ENTRY);

      entry_sym = elf32_pltgotentry(gv,sec,a,SYMI_FUNC,16,16,PLT_ENTRY);
      break;

    case BSS_ENTRY:
      /* @@@ */
      ierror("i386_dynentry(): BSS_ENTRY not yet written");
      break;

    default:
      ierror("i386_dynentry(): illegal entrytype: %d",etype);
      break;
  }

  return entry_sym;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
leal -0x1(%r15), %eax
cmpl $0x3, %eax
ja 0x1a81d
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9b95(%rip), %rcx      # 0x24300
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, (%rsp)
movl $0xc, %esi
movl $0xc, %edx
movq %r14, %rdi
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x15bf8
movl %r15d, (%rsp)
movl $0x4, %r8d
movl $0x4, %r9d
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
jmp 0x1a806
movl $0x2, %ebp
movl %ebp, (%rsp)
movl $0x10, %esi
movl $0x10, %edx
movq %r14, %rdi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x5, %r9d
callq 0x15bf8
movl %ebp, (%rsp)
movl $0x10, %r8d
movl $0x10, %r9d
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0x15f0b
jmp 0x1a830
leaq 0x9c07(%rip), %rdi      # 0x2441b
xorl %eax, %eax
callq 0x52b0
jmp 0x1a82e
leaq 0x9c22(%rip), %rdi      # 0x24446
movl %r15d, %esi
xorl %eax, %eax
callq 0x52b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq