LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x16b1b
leaq 0xc94f(%rip), %rax      # 0x233d4
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %ebx, %ebx
jmp 0x16b2b
movzbl 0x50(%rdi), %eax
leaq 0x186e0(%rip), %rcx     # 0x2f180
movq (%rcx,%rax,8), %rax
movq (%rax), %rax
movq 0x20(%rbx), %rdx
movzbl 0x43(%rbx), %ecx
leaq 0x1881a(%rip), %rdi     # 0x2f2d0
movq (%rdi,%rcx,8), %rcx
leaq 0x187af(%rip), %rdi     # 0x2f270
movq (%rdi,%rsi,8), %r8
movzbl 0x42(%rbx), %esi
leaq 0x187d0(%rip), %rdi     # 0x2f2a0
movq (%rdi,%rsi,8), %r9
xorl %ebx, %ebx
movl $0x21, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x6f84
jmp 0x16b2b
cmpb $0x3, %dl
jb 0x16b01
movzbl %dl, %edx
movq 0x20(%rbx), %rsi
leaq 0xcbcb(%rip), %rdi      # 0x236c5
xorl %eax, %eax
callq 0x52b0
movq 0x38(%rbx), %rax
movq 0x18(%rax), %rax
movzwl 0x10(%rax), %ebx
jmp 0x16b2b
movw $0xfff2, %bx            # imm = 0xFFF2
jmp 0x16b2b
movw $0xfff1, %bx            # imm = 0xFFF1
jmp 0x16b2b
leaq 0xcbef(%rip), %rdi      # 0x23711
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x52b0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 $0x68, %rsp
movl %r9d, 0x14(%rsp)
movl %r8d, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %esi, %r13d
movq %rdi, 0x60(%rsp)
movzwl 0xa8(%rsp), %eax
movl %eax, 0x18(%rsp)
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movzwl 0xb8(%rsp), %eax
movl %eax, 0x1c(%rsp)
movzwl 0xb0(%rsp), %r12d
movl 0xc0(%rsp), %r14d
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rbp
movaps %xmm0, (%rbp)
movaps %xmm0, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
movl $0x0, 0x10(%rbp)
leaq 0x18cd7(%rip), %rsi     # 0x2f880
leaq 0x20(%rsp), %r15
movl $0x4, %edx
movq %r15, %rdi
callq 0x5060
movb $0x1, %al
movb %al, 0x4(%r15)
cmpl $0x1, %r14d
movb $0x2, %cl
sbbb $0x0, %cl
movb %cl, 0x5(%r15)
movb %al, 0x6(%r15)
movl %r14d, %edi
leaq 0x30(%rsp), %rsi
movl %r13d, %edx
callq 0x6a05
leaq 0x32(%rsp), %rsi
movl %r14d, %edi
movl 0x8(%rsp), %edx
callq 0x6a05
leaq 0x34(%rsp), %rsi
movl %r14d, %edi
movl $0x1, %edx
callq 0x6a19
leaq 0x38(%rsp), %rsi
movl %r14d, %edi
movl 0xc(%rsp), %edx
callq 0x6a19
leaq 0x3c(%rsp), %rsi
movl %r14d, %edi
movl 0x10(%rsp), %edx
callq 0x6a19
movl %r14d, %edi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
callq 0x6a19
leaq 0x44(%rsp), %rsi
movl %r14d, %edi
movl 0xa0(%rsp), %edx
callq 0x6a19
leaq 0x48(%rsp), %rsi
movl %r14d, %edi
movl $0x34, %edx
callq 0x6a05
leaq 0x4a(%rsp), %rsi
shll $0x5, %ebx
movl %r14d, %edi
movl %ebx, %edx
callq 0x6a05
leaq 0x4c(%rsp), %rsi
movl %r14d, %edi
movl 0x18(%rsp), %edx
callq 0x6a05
testl %r12d, %r12d
leaq 0x50(%rsp), %rbx
leaq 0x4e(%rsp), %rsi
movl $0x28, %edx
cmovel %r12d, %edx
movl %r14d, %edi
callq 0x6a05
movl %r14d, %edi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x6a05
leaq 0x52(%rsp), %rsi
movl %r14d, %edi
movl 0x1c(%rsp), %edx
callq 0x6a05
movl $0x34, %edx
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x6c1a
addq $0x68, %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_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, 0x18b19(%rip)     # 0x2f810
sete %al
movq 0x1cbff(%rip), %r14     # 0x33900
movq 0x1f8(%rdi), %r13
testq %r13, %r13
je 0x16df2
movb %al, %bpl
leaq 0x24(%rsp), %r15
leaq 0x8(%rsp), %r12
testb $0x10, 0x24(%r13)
je 0x16de5
cmpq $-0x1, 0x30(%r13)
je 0x16de1
cmpq $-0x1, 0x28(%r13)
je 0x16de1
movl 0x20(%r13), %edx
movl %ebp, %edi
movq %r12, %rsi
callq 0x6a19
movl 0x48(%r13), %edx
movl %ebp, %edi
leaq 0xc(%rsp), %rsi
callq 0x6a19
movl 0x28(%r13), %edx
movl %ebp, %edi
leaq 0x10(%rsp), %rsi
callq 0x6a19
movl 0x30(%r13), %edx
movl %ebp, %edi
leaq 0x14(%rsp), %rsi
callq 0x6a19
movl 0x38(%r13), %edx
subl 0x30(%r13), %edx
movl %ebp, %edi
leaq 0x18(%rsp), %rsi
callq 0x6a19
movl 0x40(%r13), %edx
subl 0x30(%r13), %edx
movl %ebp, %edi
leaq 0x1c(%rsp), %rsi
callq 0x6a19
movzwl 0x24(%r13), %edx
andl $0xf, %edx
movl %ebp, %edi
leaq 0x20(%rsp), %rsi
callq 0x6a19
movb 0x26(%r13), %cl
movl $0x1, %edx
shlq %cl, %rdx
movl %ebp, %edi
movq %r15, %rsi
callq 0x6a19
movl $0x20, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6c1a
jmp 0x16de5
addq $0x20, %r14
movq (%r13), %r13
testq %r13, %r13
jne 0x16d1e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6da8
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_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 0x1719d
movl %edx, %r13d
movl %edx, 0x4(%rsp)
movq 0xb0(%rcx), %r15
movq %rax, 0x18(%rsp)
movq (%r15), %rax
testq %rax, %rax
je 0x1718c
movq %r15, %r12
movq %rax, %r15
movq %r12, %rdi
callq 0x16084
movl %eax, %r14d
movzbl 0x43(%r12), %esi
leal -0x1(%rsi), %ebp
cmpb $0x3, %bpl
jb 0x170ff
leaq 0xc5a4(%rip), %rdi      # 0x23699
xorl %eax, %eax
callq 0x52b0
movb $0x1, %bpl
testb %bl, %bl
sete %al
cmpb %bl, %r14b
sete %cl
cmpb %r13b, %bpl
jne 0x170c2
orb %cl, %al
je 0x170c2
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xcbff
testl %eax, %eax
jne 0x170c2
movq %r12, %rdi
callq 0x6789
movq 0x20(%r12), %r13
movl 0x30(%r12), %eax
movl %eax, 0xc(%rsp)
movl 0x44(%r12), %eax
movl %eax, 0x8(%rsp)
movzbl %r14b, %r14d
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x16a6c
movzwl %ax, %eax
movzbl %bpl, %r9d
movq 0x20(%rsp), %rdi
leaq 0x18616(%rip), %rsi     # 0x2f780
movq %r13, %rdx
movl 0x4(%rsp), %r13d
movl 0xc(%rsp), %ecx
movl 0x8(%rsp), %r8d
pushq %rax
pushq %r14
callq 0x15f0e
addq $0x10, %rsp
jmp 0x170c2
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
testq %rax, %rax
jne 0x170b6
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_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 0x66b6
movq %rax, %r14
leaq 0x1baa7(%rip), %rdi     # 0x33908
movq %rax, %rsi
callq 0x6759
incl 0x1bab1(%rip)           # 0x33920
leaq 0x10(%r14), %rsi
movl %ebp, %edi
movl %r15d, %edx
callq 0x6a19
leaq 0x14(%r14), %rsi
movl %ebp, %edi
movl %r13d, %edx
callq 0x6a19
leaq 0x18(%r14), %rsi
movl %ebp, %edi
movl %ebx, %edx
callq 0x6a19
leaq 0x1c(%r14), %rsi
movl %ebp, %edi
movl %r12d, %edx
callq 0x6a19
leaq 0x20(%r14), %rsi
movl %ebp, %edi
movl (%rsp), %edx
callq 0x6a19
leaq 0x24(%r14), %rsi
movl %ebp, %edi
movl 0x4(%rsp), %edx
callq 0x6a19
leaq 0x28(%r14), %rsi
movl %ebp, %edi
movl 0x40(%rsp), %edx
callq 0x6a19
leaq 0x2c(%r14), %rsi
movl %ebp, %edi
movl 0x48(%rsp), %edx
callq 0x6a19
leaq 0x30(%r14), %rsi
movl %ebp, %edi
movl 0x50(%rsp), %edx
callq 0x6a19
leaq 0x34(%r14), %rsi
movl %ebp, %edi
movl 0x58(%rsp), %edx
callq 0x6a19
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_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, 0x178f5(%rip)     # 0x2f810
sete %al
movl 0x1ba0c(%rip), %edi     # 0x33930
movl 0x1b9fd(%rip), %r8d     # 0x33928
movl 0x178d6(%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 0x17e2a
addq $0x30, %rsp
movl 0x178ae(%rip), %edi     # 0x2f808
addq 0x1b9c7(%rip), %rdi     # 0x33928
movq %rdi, 0x1b9c0(%rip)     # 0x33928
movl $0x2, %esi
callq 0x6e40
addq %rax, 0x1b9af(%rip)     # 0x33928
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x1788b(%rip)     # 0x2f810
sete %al
movl 0x1b9a6(%rip), %edi     # 0x33934
movl 0x1b993(%rip), %r8d     # 0x33928
movl 0x1780c(%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 0x17e2a
addq $0x30, %rsp
movl 0x177e4(%rip), %edi     # 0x2f7a8
addq 0x1b95d(%rip), %rdi     # 0x33928
movq %rdi, 0x1b956(%rip)     # 0x33928
movl $0x2, %esi
callq 0x6e40
addq %rax, 0x1b945(%rip)     # 0x33928
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x0, 0x1b94c(%rip)     # 0x33938
je 0x1807f
pushq %r14
pushq %rbx
pushq %rax
xorl %r14d, %r14d
cmpb $0x1, 0x17810(%rip)     # 0x2f810
sete %al
movq 0x1b936(%rip), %rcx     # 0x33940
movq (%rcx), %rdx
xorl %ebx, %ebx
testq %rdx, %rdx
je 0x1801f
addl 0x60(%rcx), %ebx
movq %rdx, %rcx
movq (%rdx), %rdx
jmp 0x1800f
movb %al, %r14b
movq 0x1b92f(%rip), %rsi     # 0x33958
testq %rsi, %rsi
je 0x18040
addq $0x28, %rsi
movl 0x1b8e8(%rip), %edx     # 0x33920
movl %r14d, %edi
callq 0x6a19
movl 0x1b8f2(%rip), %edi     # 0x33938
movl 0x1b8db(%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 0x17e2a
addq $0x30, %rsp
movl %ebx, %eax
addq %rax, 0x1b8b0(%rip)     # 0x33928
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x17783(%rip)     # 0x2f810
sete %r10b
movl 0x1b8c9(%rip), %edi     # 0x33960
movl 0x1b88a(%rip), %r8d     # 0x33928
movl 0x176a3(%rip), %r9d     # 0x2f748
shll $0x4, %r9d
movl 0x1769c(%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 0x17e2a
addq $0x30, %rsp
movl 0x17673(%rip), %eax     # 0x2f748
shlq $0x4, %rax
addq %rax, 0x1b848(%rip)     # 0x33928
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6a19
movb %r14b, 0x4(%r15)
movb %bpl, 0x5(%r15)
leaq 0x6(%r15), %rsi
movzwl %bx, %edx
movl %r12d, %edi
callq 0x6a05
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 0x6a19
// File: /workspace/github_c_makefile_star2_O1/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, 0x1730a(%rip)      # 0x2f810
movl %esi, %eax
movq %rax, 0x1b419(%rip)     # 0x33928
movq $0x0, 0x1b3e6(%rip) # 0x33900
cmpq $0x0, 0x1f8(%rdi)
jne 0x1856e
movq %rdi, %rbx
movl $0x58, %edi
callq 0x66b6
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 0x16c27(%rip), %rcx     # 0x2f180
movq (%rcx,%rax,8), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %rax, 0x48(%r14)
movq %r14, 0x1f8(%rbx)
leaq 0x1b393(%rip), %rbx     # 0x33908
movq %rbx, %rdi
callq 0x670a
leaq 0x1b3e4(%rip), %rdi     # 0x33968
callq 0x670a
leaq 0x1b3f0(%rip), %rdi     # 0x33980
callq 0x670a
movl $0x0, 0x1b381(%rip)     # 0x33920
leaq 0x1723a(%rip), %r14     # 0x2f7e0
leaq 0xb299(%rip), %rsi      # 0x23846
movq %r14, %rdi
callq 0x169a2
movl %eax, 0x1b3a5(%rip)     # 0x33960
leaq 0xb28c(%rip), %rsi      # 0x2384e
movq %r14, %rdi
callq 0x169a2
movl %eax, 0x1b364(%rip)     # 0x33934
leaq 0xb27f(%rip), %rsi      # 0x23856
movq %r14, %rdi
callq 0x169a2
movl %eax, 0x1b34b(%rip)     # 0x33930
movl $0x38, %edi
callq 0x66b6
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6759
incl 0x1b320(%rip)           # 0x33920
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x186b1
cmpl $0x1, 0x20(%r15)
jne 0x186a9
testb $0x10, 0x24(%r15)
je 0x186a9
cmpq $-0x1, 0x30(%r15)
je 0x186a9
cmpq $-0x1, 0x28(%r15)
je 0x186a9
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x6da8
movq 0x1c0(%r14), %r12
cmpq $0x0, (%r12)
je 0x186a9
movq 0x38(%r12), %rax
cmpq 0x30(%r15), %rax
jb 0x186a3
addq 0x48(%r12), %rax
cmpq 0x40(%r15), %rax
ja 0x186a3
testb $0x1, 0x21(%r12)
je 0x186a3
movq 0x50(%r12), %rdx
testq %rdx, %rdx
je 0x18691
movq 0x78(%r12), %rsi
movq %rbx, %rdi
callq 0x6c1a
movq 0x58(%r12), %rsi
testq %rsi, %rsi
je 0x186a3
movq %rbx, %rdi
callq 0x6da8
movq (%r12), %r12
jmp 0x18655
movq (%r15), %r15
jmp 0x1861d
movq 0x1c0(%r14), %r14
cmpq $0x0, (%r14)
je 0x186da
testb $0x3, 0x21(%r14)
jne 0x186d5
movq 0x48(%r14), %rdx
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x6c1a
movq (%r14), %r14
jmp 0x186b8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rsi, %rbx
movq %rdi, %r14
movq 0x1c0(%rdi), %r15
cmpq $0x0, (%r15)
je 0x1871d
movb 0x21(%r15), %al
andb $0x3, %al
cmpb $0x1, %al
jne 0x18718
movq 0x48(%r15), %rdx
movq 0x78(%r15), %rsi
movq %rbx, %rdi
callq 0x6c1a
movq (%r15), %r15
jmp 0x186f8
movq 0x1c0(%r14), %r14
cmpq $0x0, (%r14)
je 0x18746
testb $0x3, 0x21(%r14)
jne 0x18741
movq 0x48(%r14), %rdx
movq 0x78(%r14), %rsi
movq %rbx, %rdi
callq 0x6c1a
movq (%r14), %r14
jmp 0x18724
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x1b1a7(%rip)     # 0x33938
je 0x187c3
pushq %r14
pushq %rbx
pushq %rax
movq 0x1b1a2(%rip), %r14     # 0x33940
cmpq $0x0, (%r14)
je 0x187bc
movq %rdi, %rbx
leaq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0x1874c
movq (%r14), %r14
cmpq $0x0, (%r14)
jne 0x187a7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1b172(%rip), %rdi     # 0x33980
callq 0x676f
testq %rax, %rax
je 0x1884d
leaq 0x1b161(%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 0x6c1a
movq %r15, %rdi
callq 0x676f
testq %rax, %rax
jne 0x1881f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1682a(%rip), %r12     # 0x2f738
callq 0x6e09
xorl %edx, %edx
divq 0x16824(%rip)           # 0x2f740
xorl %r15d, %r15d
movq (%r12,%rdx,8), %r12
testq %r12, %r12
je 0x18f56
movq 0x18(%r12), %rsi
movq %r14, %rdi
callq 0x5160
testl %eax, %eax
jne 0x18f4a
leaq 0x2e(%r12), %rsi
movl %ebx, %edi
callq 0x6993
cmpw %bp, %ax
je 0x18f51
movq 0x10(%r12), %r12
jmp 0x18f23
movl 0x30(%r12), %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x16757(%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 0x13eb4
addq $0x10, %rsp
testl %eax, %eax
jne 0x191b8
leaq 0x16727(%rip), %rdi     # 0x2f890
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
movl $0x2, %r9d
pushq $0x1
pushq $0x11
callq 0x13eb4
addq $0x10, %rsp
testl %eax, %eax
jne 0x191b8
leaq 0x166fa(%rip), %rdi     # 0x2f890
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
movl $0x2, %r9d
pushq $0x1
pushq $0x14
callq 0x13eb4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1928d
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
callq 0xcf08
testl %eax, %eax
je 0x192bc
movq %rsp, %rdi
callq 0xcf75
testl %eax, %eax
je 0x192ce
leaq 0x20(%rsp), %r15
leaq 0x15f69(%rip), %rbp     # 0x2f180
leaq 0xaef(%rip), %r12       # 0x19d0d
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 $0x2, %r8d
movl $0x1, %r9d
xorl %eax, %eax
pushq $0x9025                 # imm = 0x9025
pushq $0x11
pushq $0x14
pushq $0x3
callq 0x1403a
addq $0x20, %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 0x19221
jmp 0x192ce
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
leaq 0xa6d(%rip), %rcx       # 0x19d0d
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 0xad46(%rip), %rdi      # 0x2400d
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_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 0x19564
cmpl $0x0, 0x244(%r15)
jne 0x19564
movq 0x18(%r14), %r12
leaq 0x90d3(%rip), %rsi      # 0x225b1
movl $0x6, %edx
movq %r12, %rdi
callq 0x5070
testl %eax, %eax
jne 0x19516
movq 0x20(%rbx), %r13
leaq 0x90be(%rip), %rsi      # 0x225b8
movl $0x5, %edx
movq %r13, %rdi
callq 0x5070
testl %eax, %eax
jne 0x19516
movb 0x6(%r12), %al
cmpb 0x5(%r13), %al
je 0x19555
leaq 0x909b(%rip), %rsi      # 0x225b8
movl $0x5, %edx
movq %r12, %rdi
callq 0x5070
testl %eax, %eax
jne 0x19564
movq 0x20(%rbx), %r13
leaq 0x9078(%rip), %rsi      # 0x225b1
movl $0x6, %edx
movq %r13, %rdi
callq 0x5070
testl %eax, %eax
jne 0x19564
movb 0x5(%r12), %al
cmpb 0x6(%r13), %al
jne 0x19564
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 0x15919
// File: /workspace/github_c_makefile_star2_O1/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 0x19882
movl 0x48(%rbx), %eax
testl %eax, %eax
js 0x19892
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x15a24
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x5, %eax
ja 0x199b5
leaq 0xa229(%rip), %rcx      # 0x23ad0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0xca33
movq 0x60(%rax), %rax
movq %rax, 0x38(%rbx)
jmp 0x199b5
leaq 0x8cec(%rip), %rsi      # 0x225b8
jmp 0x198de
leaq 0x8cdc(%rip), %rsi      # 0x225b1
jmp 0x198de
leaq 0x8cc2(%rip), %rsi      # 0x225a0
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbeb0
testq %rax, %rax
je 0x199b5
movq 0x48(%rax), %rax
movq %rax, 0x30(%rbx)
jmp 0x199b5
leaq 0x8ca4(%rip), %rsi      # 0x225b1
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbeb0
testq %rax, %rax
je 0x1992e
movq 0x60(%rax), %rax
addq $0x10, %rax
jmp 0x19935
leaq 0x138(%r14), %rax
movq (%rax), %r15
testq %r15, %r15
jne 0x1994b
leaq 0xa72e(%rip), %rdi      # 0x24072
xorl %eax, %eax
callq 0x52b0
leaq 0x1624c(%rip), %rsi     # 0x2fb9e
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xc156
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 0xc429
movq %rax, %r14
leaq 0x60(%rax), %rdi
movq %r15, %rsi
callq 0x6759
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_O1/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x3, 0x203(%rdi)
jne 0x19a4c
leaq 0x8bcc(%rip), %rsi      # 0x225cd
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbeb0
testq %rax, %rax
je 0x19a23
leaq 0xa5b1(%rip), %rcx      # 0x23fd0
movq %rcx, 0x18(%rax)
leaq 0x8baa(%rip), %rsi      # 0x225d4
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbeb0
testq %rax, %rax
je 0x19a4c
leaq 0xa594(%rip), %rcx      # 0x23fdc
movq %rcx, 0x18(%rax)
movq 0x1c0(%r14), %r15
cmpq $0x0, (%r15)
je 0x19a93
leaq 0x1613e(%rip), %r12     # 0x2fb9e
testb $0x2, 0x21(%r15)
jne 0x19a6f
movq 0x48(%r15), %rax
movq %rax, 0x50(%r15)
movq 0x18(%r15), %rdi
movq %r12, %rsi
callq 0x5160
testl %eax, %eax
jne 0x19a8a
movq %r14, %rdi
movq %r15, %rsi
callq 0x1a1f6
movq (%r15), %r15
cmpq $0x0, (%r15)
jne 0x19a60
leaq 0x3b1(%rip), %r8        # 0x19e4b
movq %r14, %rdi
movq %rbx, %rsi
movl $0x14, %edx
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18853
// File: /workspace/github_c_makefile_star2_O1/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 0x87f2(%rip), %rsi      # 0x225db
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbeb0
testq %rax, %rax
je 0x19e43
movq %rax, %rbx
movq 0x78(%rax), %rdi
movl $0x4e800021, %esi       # imm = 0x4E800021
callq 0x6971
leaq 0x95d9(%rip), %rsi      # 0x233ee
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbeb0
testq %rax, %rax
je 0x19e43
movq 0x78(%rbx), %rdi
addq $0x4, %rdi
movl 0x40(%rax), %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6971
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x83a6(%rip), %rsi      # 0x225b1
xorl %r12d, %r12d
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xbeb0
movq %rax, %r14
testq %rax, %rax
je 0x1a250
movq 0x80(%r14), %rax
cmpq $0x0, (%rax)
je 0x1a250
xorl %r12d, %r12d
cmpq %r14, 0x18(%rax)
jne 0x1a247
xorl %ecx, %ecx
cmpb $0x1, 0x38(%rax)
sete %cl
addl %ecx, %r12d
movq (%rax), %rax
cmpq $0x0, (%rax)
jne 0x1a235
leal 0x1(%r12), %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x6668
movq %rax, %r13
movq %rax, %rdi
movl %r12d, %esi
callq 0x6971
testq %r14, %r14
je 0x1a2b4
movq 0x80(%r14), %r12
cmpq $0x0, (%r12)
je 0x1a2b4
movq %r13, %rdi
addq $0x4, %rdi
cmpq %r14, 0x18(%r12)
jne 0x1a2a9
cmpb $0x1, 0x38(%r12)
jne 0x1a2a9
leaq 0x4(%rdi), %rbp
movl 0x20(%r12), %esi
callq 0x6971
movq %rbp, %rdi
movq (%r12), %r12
cmpq $0x0, (%r12)
jne 0x1a289
movq %r13, 0x78(%rbx)
movq %r15, 0x50(%rbx)
movq %r15, 0x48(%rbx)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1a2d1
movq %r13, 0x40(%rax)
movq %r15, 0x48(%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_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 0x1a3d4
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
callq 0xcf08
testl %eax, %eax
je 0x1a403
movq %rsp, %rdi
callq 0xcf75
testl %eax, %eax
je 0x1a415
leaq 0x20(%rsp), %r15
leaq 0x14e1b(%rip), %rbp     # 0x2f180
leaq 0x114(%rip), %r12       # 0x1a480
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 $0x2, %r8d
movl $0x1, %r9d
xorl %eax, %eax
pushq $0x4
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 0x1a36f
jmp 0x1a415
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
leaq 0x99(%rip), %rcx        # 0x1a480
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 0x9cdd(%rip), %rdi      # 0x240eb
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_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 0x1a7c8
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq %rsp, %rdi
callq 0xcf08
testl %eax, %eax
je 0x1a7f7
movq %rsp, %rdi
callq 0xcf75
testl %eax, %eax
je 0x1a809
leaq 0x20(%rsp), %r15
leaq 0x14a27(%rip), %rbp     # 0x2f180
leaq 0x411(%rip), %r12       # 0x1ab71
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 $0x3
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 0x1a763
jmp 0x1a809
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdx
movq %rax, 0x20(%rbx)
leaq 0x396(%rip), %rcx       # 0x1ab71
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 0x9c01(%rip), %rdi      # 0x24403
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_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 0x1a8f1
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9ae1(%rip), %rcx      # 0x24320
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 0x15db4
movl %r15d, (%rsp)
movl $0x4, %r8d
movl $0x4, %r9d
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
jmp 0x1a8da
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 0x15db4
movl %ebp, (%rsp)
movl $0x10, %r8d
movl $0x10, %r9d
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0x160c1
jmp 0x1a904
leaq 0x9b53(%rip), %rdi      # 0x2443b
xorl %eax, %eax
callq 0x52b0
jmp 0x1a902
leaq 0x9b6e(%rip), %rdi      # 0x24466
movl %r15d, %esi
xorl %eax, %eax
callq 0x52b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq