LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_newshdr
static struct ShdrNode *elf32_newshdr(void)
{
  struct ShdrNode *s = alloczero(sizeof(struct ShdrNode));

  addtail(&shdrlist,&s->n);
  ++elf32shdridx;
  return s;
}

// Assembly:
pushq %rax
movl $0x38, %edi
callq 0x7290
movq %rax, (%rsp)
movq (%rsp), %rsi
leaq 0x1e6ce(%rip), %rdi     # 0x44cd8
callq 0x7470
movl 0x1e6db(%rip), %eax     # 0x44cf0
addl $0x1, %eax
movl %eax, 0x1e6d2(%rip)     # 0x44cf0
movq (%rsp), %rax
popq %rcx
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x1c0(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0x26873
movq (%rsp), %rax
movzbl 0x21(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x26864
movq (%rsp), %rax
movzbl 0x21(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x26862
movq 0x8(%rsp), %rdi
movq (%rsp), %rax
movq 0x78(%rax), %rsi
movq (%rsp), %rax
movq 0x48(%rax), %rdx
callq 0x8470
jmp 0x26864
jmp 0x26866
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
jmp 0x2681e
movq 0x10(%rsp), %rax
movq 0x1c0(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0x268d8
movq (%rsp), %rax
movzbl 0x21(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x268c9
movq (%rsp), %rax
movzbl 0x21(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x268c7
movq 0x8(%rsp), %rdi
movq (%rsp), %rax
movq 0x78(%rax), %rsi
movq (%rsp), %rax
movq 0x48(%rax), %rdx
callq 0x8470
jmp 0x268c9
jmp 0x268cb
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
jmp 0x26883
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
cmpl $0x0, 0x1e3a8(%rip)     # 0x44d08
je 0x2699d
movq 0x1e3a7(%rip), %rax     # 0x44d10
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2699b
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x38, %rsi
callq 0x268e0
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x2696e
jmp 0x2699d
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
leaq 0x1e34b(%rip), %rdi     # 0x44d50
callq 0x74d0
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x26a42
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
addq $0x10, %rsi
movq 0x10(%rsp), %rax
movzbl 0x6e(%rax), %ecx
movl $0x8, %edx
movl $0xc, %eax
cmpl $0x2, %ecx
cmoveq %rax, %rdx
callq 0x8470
jmp 0x269fe
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_num_buckets
static size_t elf32_num_buckets(size_t symcount)
/* determine optimal number of buckets in dynamic symbol hash table */
{
  int i;
  size_t best_num;

  for (i=0; elf_buckets[i]; i++) {
    best_num = elf_buckets[i];
    if (symcount < elf_buckets[i+1])
      break;
  }
  return best_num;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
movslq -0xc(%rsp), %rcx
leaq 0xef27(%rip), %rax      # 0x36290
cmpq $0x0, (%rax,%rcx,8)
je 0x273b2
movslq -0xc(%rsp), %rcx
leaq 0xef14(%rip), %rax      # 0x36290
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rsp)
movq -0x8(%rsp), %rax
movl -0xc(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xeef5(%rip), %rcx      # 0x36290
cmpq (%rcx,%rdx,8), %rax
jae 0x273a3
jmp 0x273b2
jmp 0x273a5
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x2735d
movq -0x18(%rsp), %rax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_symidx
static uint32_t elf32_symidx(struct SymTabList *sl,struct StrTabList *strl,
                             const char *name,bool be)
/* return index of external symbol with name from SymTabList */
{
  uint32_t symidx;

  if (!(symidx = elf32_findsym(sl,name,SHN_COMMON,be)))
    if (!(symidx = elf32_findsym(sl,name,SHN_UNDEF,be)))
      symidx = elf32_addsym(sl,strl,name,0,0,
                            STB_GLOBAL,STT_NOTYPE,SHN_UNDEF);

  return symidx;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %ecx
movl $0xfff2, %edx           # imm = 0xFFF2
callq 0x27460
movl %eax, 0x18(%rsp)
cmpl $0x0, %eax
jne 0x2744b
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %ecx
xorl %edx, %edx
callq 0x27460
movl %eax, 0x18(%rsp)
cmpl $0x0, %eax
jne 0x27449
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x22910
movl %eax, 0x18(%rsp)
jmp 0x2744b
movl 0x18(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movw %dx, %ax
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movw %ax, 0x1e(%rsp)
movl %ecx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x8760
movq 0x28(%rsp), %rcx
xorl %edx, %edx
divq 0x20(%rcx)
movq (%rsp), %rax
shlq $0x3, %rdx
addq %rdx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x27519
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0x27509
movl 0x18(%rsp), %edi
movq 0x8(%rsp), %rsi
addq $0x20, %rsi
addq $0xe, %rsi
callq 0x8010
movzwl %ax, %eax
movzwl 0x1e(%rsp), %ecx
cmpl %ecx, %eax
jne 0x27507
movq 0x8(%rsp), %rax
movl 0x30(%rax), %eax
movl %eax, 0x34(%rsp)
jmp 0x27521
jmp 0x27509
movq 0x8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
jmp 0x274ac
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_putsymtab
static void elf32_putsymtab(uint8_t *p,struct SymTabList *sl)
/* write all SymTabList nodes sequentially into memory */
{
  struct SymbolNode *sym;

  while (sym = (struct SymbolNode *)remhead(&sl->l)) {
    memcpy(p,&sym->s,sizeof(struct Elf32_Sym));
    p += sizeof(struct Elf32_Sym);
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x74d0
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x277ba
movq 0x10(%rsp), %rax
movq (%rsp), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, (%rax)
movq 0x28(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
jmp 0x2777e
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_findSymNode
static struct SymbolNode *elf32_findSymNode(struct SymTabList *sl,
                                            const char *name)
/* Find an ELF symbol node by its name.
   Return pointer to it, or NULL when not found. */
{
  struct SymbolNode **chain = &sl->hashtab[elf_hash(name) % sl->htabsize];
  struct SymbolNode *sym;

  while (sym = *chain) {
    if (!strcmp(name,sym->name))
      return sym;
    chain = &sym->hashchain;
  }
  return NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x8760
movq 0x28(%rsp), %rcx
xorl %edx, %edx
divq 0x20(%rcx)
movq 0x8(%rsp), %rax
shlq $0x3, %rdx
addq %rdx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x27849
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0x27839
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x27852
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x18(%rsp)
jmp 0x27802
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
leaq 0x18b13(%rip), %rdi     # 0x403a0
movl $0x1, %r8d
movl $0x2, %r9d
movl $0x9025, (%rsp)         # imm = 0x9025
movl $0x1, 0x8(%rsp)
callq 0x1f0a0
movl %eax, 0x10(%rsp)
cmpl $0x0, %eax
je 0x278c3
movl 0x10(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x27946
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
leaq 0x18ac7(%rip), %rdi     # 0x403a0
movl $0x1, %r8d
movl $0x2, %r9d
movl $0x11, (%rsp)
movl $0x1, 0x8(%rsp)
callq 0x1f0a0
movl %eax, 0x10(%rsp)
cmpl $0x0, %eax
je 0x2790c
movl 0x10(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x27946
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
leaq 0x18a7e(%rip), %rdi     # 0x403a0
movl $0x1, %r8d
movl $0x2, %r9d
movl $0x14, (%rsp)
movl $0x1, 0x8(%rsp)
callq 0x1f0a0
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x168, %rsp            # imm = 0x168
movq %rdi, 0x160(%rsp)
movq %rsi, 0x158(%rsp)
movq 0x158(%rsp), %rax
movzbl 0x39(%rax), %eax
cmpl $0x8, %eax
jne 0x27a8e
movq 0x158(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x158(%rsp), %rax
movq 0x30(%rax), %rdx
movq 0x158(%rsp), %rax
movq 0x18(%rax), %rcx
leaq 0x20(%rsp), %rdi
callq 0x13d60
cmpl $0x0, %eax
je 0x27a72
jmp 0x279b5
leaq 0x20(%rsp), %rdi
callq 0x13e00
cmpl $0x0, %eax
je 0x27a70
leaq 0x20(%rsp), %rdi
addq $0x20, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x158(%rsp), %rax
movzbl 0x38(%rax), %eax
movl %eax, %ecx
leaq 0x18036(%rip), %rax     # 0x3fa30
movq (%rax,%rcx,8), %rdi
movq 0x158(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x148(%rsp), %rdx
movl $0x1, %r9d
movl $0x2, %r8d
movl %r9d, %ecx
movl $0x3, (%rsp)
movl $0x14, 0x8(%rsp)
movl $0x11, 0x10(%rsp)
movl $0x9025, 0x18(%rsp)     # imm = 0x9025
movb $0x0, %al
callq 0x1f3b0
movq 0x160(%rsp), %rdi
movq 0x158(%rsp), %rsi
movq 0x148(%rsp), %rdx
leaq 0xeea(%rip), %rcx       # 0x28950
callq 0x20700
jmp 0x279b5
jmp 0x27a8c
movq 0x158(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0xeff0(%rip), %rdi      # 0x36a75
movb $0x0, %al
callq 0x8ae0
jmp 0x27ace
movq 0x158(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x160(%rsp), %rdi
movq 0x158(%rsp), %rsi
movq 0x158(%rsp), %rax
movq 0x28(%rax), %rdx
leaq 0xe87(%rip), %rcx       # 0x28950
callq 0x20700
addq $0x168, %rsp            # imm = 0x168
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, 0x54(%rax)
jne 0x27e68
movq 0x18(%rsp), %rax
cmpl $0x0, 0x244(%rax)
jne 0x27e68
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0xd7fd(%rip), %rsi      # 0x355b1
movl $0x6, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x27e00
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0xd7e5(%rip), %rsi      # 0x355b8
movl $0x5, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x27e00
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movsbl 0x6(%rax), %eax
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rcx
movsbl 0x5(%rcx), %ecx
cmpl %ecx, %eax
je 0x27e5c
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0xd7a8(%rip), %rsi      # 0x355b8
movl $0x5, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x27e66
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0xd782(%rip), %rsi      # 0x355b1
movl $0x6, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x27e66
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movsbl 0x5(%rax), %eax
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rcx
movsbl 0x6(%rcx), %ecx
cmpl %ecx, %eax
jne 0x27e66
movl $0x1, 0x24(%rsp)
jmp 0x27e80
jmp 0x27e68
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x21f90
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movzbl 0x41(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x28449
movq 0x18(%rsp), %rax
movl 0x48(%rax), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
je 0x28449
movq 0x18(%rsp), %rax
movl 0x48(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x5, %eax
ja 0x28438
movq 0x8(%rsp), %rax
leaq 0xe616(%rip), %rcx      # 0x36928
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rsp), %rdi
callq 0x132b0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x60(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x38(%rax)
jmp 0x28438
movq 0x20(%rsp), %rdi
leaq 0xd264(%rip), %rsi      # 0x355b1
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x2837b
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x28438
movq 0x20(%rsp), %rdi
leaq 0xd22c(%rip), %rsi      # 0x355b8
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x283ba
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x28438
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
leaq 0xd1e0(%rip), %rsi      # 0x355b1
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x28b50
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x38(%rax)
jmp 0x28438
movq 0x20(%rsp), %rdi
leaq 0xd198(%rip), %rsi      # 0x355a0
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x28436
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x28438
movq 0x18(%rsp), %rax
movzbl 0x41(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x41(%rax)
jmp 0x28458
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x22160
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movzbl 0x203(%rax), %eax
cmpl $0x3, %eax
jne 0x2855d
movq 0x10(%rsp), %rdi
leaq 0xd0d2(%rip), %rsi      # 0x355cd
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x28525
movq (%rsp), %rax
leaq 0xe517(%rip), %rcx      # 0x36a38
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rdi
leaq 0xd0a3(%rip), %rsi      # 0x355d4
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x2855b
movq (%rsp), %rax
leaq 0xe4ed(%rip), %rcx      # 0x36a44
movq %rcx, 0x18(%rax)
jmp 0x2855d
movq 0x10(%rsp), %rax
movq 0x1c0(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0x285cd
movq (%rsp), %rax
movzbl 0x21(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x28597
movq (%rsp), %rax
movq 0x48(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x50(%rax)
movq (%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x184e8(%rip), %rsi     # 0x40a8e
callq 0x5130
cmpl $0x0, %eax
jne 0x285be
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x29310
jmp 0x285c0
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
jmp 0x2856d
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl $0x14, %edx
movl $0x1, %ecx
leaq 0x728(%rip), %r8        # 0x28d10
callq 0x26a50
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32ppcbe.c
// Function: setupRI
static uint8_t setupRI(uint8_t rtype,struct ELF2vlink *convert,
                       struct RelocInsert *ri1,struct RelocInsert *ri2)
{
  ri1->bpos = convert[rtype].bpos;
  ri1->bsiz = convert[rtype].bsiz;
  if ((ri1->mask = convert[rtype].mask) == 0) {
    /* @ha mode - add a second RelocInsert */
    memset(ri2,0,sizeof(struct RelocInsert));
    ri1->next = ri2;
    ri1->mask = 0xffff0000;
    ri2->bsiz = 16;
    ri2->mask = 0x8000;
  }
  return (convert[rtype].rtype);
}

// Assembly:
subq $0x28, %rsp
movb %dil, %al
movb %al, 0x27(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x18(%rsp), %rax
movzbl 0x27(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movw 0x2(%rax), %cx
movq 0x10(%rsp), %rax
movw %cx, 0x8(%rax)
movq 0x18(%rsp), %rax
movzbl 0x27(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movw 0x4(%rax), %cx
movq 0x10(%rsp), %rax
movw %cx, 0xa(%rax)
movq 0x18(%rsp), %rax
movzbl 0x27(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x28b2e
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x5100
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movl $0xffff0000, %ecx       # imm = 0xFFFF0000
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movw $0x10, 0xa(%rax)
movq 0x8(%rsp), %rax
movq $0x8000, 0x10(%rax)     # imm = 0x8000
movq 0x18(%rsp), %rax
movzbl 0x27(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movb (%rax), %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32ppcbe.c
// Function: ddrelocs_sec
static struct Section *ddrelocs_sec(struct GlobalVars *gv,
                                    struct LinkedSection *sdata)
{
  struct Section *s; 
  struct LinkedSection *ls;
  struct ObjectUnit *obj;

  if (sdata)
    obj = ((struct Section *)sdata->sections.first)->obj;
  else
    obj = (struct ObjectUnit *)gv->selobjects.first;
  if (obj == NULL)
    ierror("No object unit for ddrelocs section");
  s = create_section(obj,ddrelocs_name,NULL,0);
  s->type = ST_DATA;
  s->flags = SF_ALLOC;
  s->protection = SP_READ;
  s->alignment = 2;
  s->id = ~0;

  ls = create_lnksect(gv,s->name,s->type,s->flags,s->protection,
                      s->alignment);
  addtail(&ls->sections,&s->n);
  s->lnksec = ls;
  s->size = ls->size = 1; /* protect from deletion */

  return (s);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x28b79
movq 0x18(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, (%rsp)
jmp 0x28b89
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x28b9e
leaq 0xdf43(%rip), %rdi      # 0x36ada
movb $0x0, %al
callq 0x8ae0
movq (%rsp), %rdi
leaq 0x17ee5(%rip), %rsi     # 0x40a8e
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x125b0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movb $0x2, 0x2c(%rax)
movq 0x10(%rsp), %rax
movb $0x1, 0x2d(%rax)
movq 0x10(%rsp), %rax
movb $0x1, 0x2e(%rax)
movq 0x10(%rsp), %rax
movb $0x2, 0x2f(%rax)
movq 0x10(%rsp), %rax
movl $0xffffffff, 0x28(%rax) # imm = 0xFFFFFFFF
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x10(%rsp), %rax
movb 0x2c(%rax), %dl
movq 0x10(%rsp), %rax
movb 0x2d(%rax), %cl
movq 0x10(%rsp), %rax
movb 0x2e(%rax), %r8b
movq 0x10(%rsp), %rax
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %r8b, %r8d
movzbl 0x2f(%rax), %r9d
callq 0x12a60
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
addq $0x60, %rdi
movq 0x10(%rsp), %rsi
callq 0x7470
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rax
movq $0x1, 0x48(%rax)
movq 0x10(%rsp), %rax
movq $0x1, 0x48(%rax)
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xc946(%rip), %rsi      # 0x355db
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x28d09
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
movl $0x4e800021, %esi       # imm = 0x4E800021
callq 0x7b30
movq 0x10(%rsp), %rdi
leaq 0xd572(%rip), %rsi      # 0x36242
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x28d07
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
addq $0x4, %rdi
movq (%rsp), %rax
movq 0x40(%rax), %rax
movl %eax, %esi
callq 0x7b30
jmp 0x28d09
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl $0x0, 0x4(%rsp)
movq 0x40(%rsp), %rdi
leaq 0xc27f(%rip), %rsi      # 0x355b1
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x293a6
movq 0x30(%rsp), %rax
movq 0x80(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
je 0x293a4
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x30(%rsp), %rax
jne 0x29393
movq 0x20(%rsp), %rax
movzbl 0x38(%rax), %eax
cmpl $0x1, %eax
jne 0x29393
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x29395
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x2935f
jmp 0x293a6
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
shlq $0x2, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x71f0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, %rax
addq $0x4, %rax
movq %rax, 0x10(%rsp)
movl 0x4(%rsp), %esi
callq 0x7b30
cmpq $0x0, 0x30(%rsp)
je 0x29461
movq 0x30(%rsp), %rax
movq 0x80(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2945f
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x30(%rsp), %rax
jne 0x2944e
movq 0x20(%rsp), %rax
movzbl 0x38(%rax), %eax
cmpl $0x1, %eax
jne 0x2944e
movq 0x10(%rsp), %rdi
movq %rdi, %rax
addq $0x4, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movl %eax, %esi
callq 0x7b30
jmp 0x29450
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x29404
jmp 0x29461
movq 0x18(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x78(%rax)
movq 0x8(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x38(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x38(%rsp), %rax
movq 0x60(%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x294b6
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x48(%rax)
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq 0x148(%rsp), %rax
movzbl 0x39(%rax), %eax
cmpl $0x8, %eax
jne 0x2964e
movq 0x148(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x148(%rsp), %rax
movq 0x30(%rax), %rdx
movq 0x148(%rsp), %rax
movq 0x18(%rax), %rcx
leaq 0x10(%rsp), %rdi
callq 0x13d60
cmpl $0x0, %eax
je 0x29632
jmp 0x29585
leaq 0x10(%rsp), %rdi
callq 0x13e00
cmpl $0x0, %eax
je 0x29630
leaq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x148(%rsp), %rax
movzbl 0x38(%rax), %eax
movl %eax, %ecx
leaq 0x16466(%rip), %rax     # 0x3fa30
movq (%rax,%rcx,8), %rdi
movq 0x148(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x138(%rsp), %rdx
movl $0x1, %r9d
movl $0x2, %r8d
movl %r9d, %ecx
movl $0x1, (%rsp)
movl $0x4, 0x8(%rsp)
movb $0x0, %al
callq 0x1f3b0
movq 0x150(%rsp), %rdi
movq 0x148(%rsp), %rsi
movq 0x138(%rsp), %rdx
leaq 0x17a(%rip), %rcx       # 0x297a0
callq 0x20700
jmp 0x29585
jmp 0x2964c
movq 0x148(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0xd50e(%rip), %rdi      # 0x36b53
movb $0x0, %al
callq 0x8ae0
jmp 0x2968e
movq 0x148(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x150(%rsp), %rdi
movq 0x148(%rsp), %rsi
movq 0x148(%rsp), %rax
movq 0x28(%rax), %rdx
leaq 0x117(%rip), %rcx       # 0x297a0
callq 0x20700
addq $0x158, %rsp            # imm = 0x158
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32m68k.c
// Function: m68k_reloc_elf2vlink
static uint8_t m68k_reloc_elf2vlink(uint8_t rtype,struct RelocInsert *ri)
/* Determine vlink internal reloc type from ELF reloc type and fill in
   reloc-insert description informations.
   All fields of the RelocInsert structure are preset to zero. */
{
  static struct ELF2vlink convertV4[] = {
    R_NONE,0,0,-1,
    R_ABS,0,32,-1,              /* R_68K_32 */
    R_ABS,0,16,-1,              /* R_68K_16 */
    R_ABS,0,8,-1,               /* R_68K_8 */
    R_PC,0,32,-1,               /* R_68K_PC32 */
    R_PC,0,16,-1,               /* R_68K_PC16 */
    R_PC,0,8,-1,                /* R_68K_PC8 */
    R_GOT,0,32,-1,              /* R_68K_GOT32 */
    R_GOT,0,16,-1,              /* R_68K_GOT16 */
    R_GOT,0,8,-1,               /* R_68K_GOT8 */
    R_GOTOFF,0,32,-1,           /* R_68K_GOT32O */
    R_GOTOFF,0,16,-1,           /* R_68K_GOT16O */
    R_GOTOFF,0,8,-1,            /* R_68K_GOT8O */
    R_PLT,0,32,-1,              /* R_68K_PLT32 */
    R_PLT,0,16,-1,              /* R_68K_PLT16 */
    R_PLT,0,8,-1,               /* R_68K_PLT8 */
    R_PLTOFF,0,32,-1,           /* R_68K_PLT32O */
    R_PLTOFF,0,16,-1,           /* R_68K_PLT16O */
    R_PLTOFF,0,8,-1,            /* R_68K_PLT8O */
    R_COPY,0,32,-1,             /* R_68K_COPY */
    R_GLOBDAT,0,32,-1,          /* R_68K_GLOB_DAT */
    R_JMPSLOT,0,0,-1,           /* R_68K_JMP_SLOT */
    R_LOADREL,0,32,-1           /* R_68K_RELATIVE */
  };

  if (rtype <= R_68K_RELATIVE) {
    ri->bpos = convertV4[rtype].bpos;
    ri->bsiz = convertV4[rtype].bsiz;
    ri->mask = convertV4[rtype].mask;
    rtype = convertV4[rtype].rtype;
  }
  else
    rtype = R_NONE;

  return (rtype);
}

// Assembly:
movb %dil, %al
movb %al, -0x1(%rsp)
movq %rsi, -0x10(%rsp)
movzbl -0x1(%rsp), %eax
cmpl $0x16, %eax
jg 0x2983d
movzbl -0x1(%rsp), %eax
movl %eax, %ecx
leaq 0x17388(%rip), %rax     # 0x40b50
shlq $0x4, %rcx
addq %rcx, %rax
movw 0x2(%rax), %cx
movq -0x10(%rsp), %rax
movw %cx, 0x8(%rax)
movzbl -0x1(%rsp), %eax
movl %eax, %ecx
leaq 0x17366(%rip), %rax     # 0x40b50
shlq $0x4, %rcx
addq %rcx, %rax
movw 0x4(%rax), %cx
movq -0x10(%rsp), %rax
movw %cx, 0xa(%rax)
movzbl -0x1(%rsp), %eax
movl %eax, %ecx
leaq 0x17344(%rip), %rax     # 0x40b50
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movzbl -0x1(%rsp), %eax
movl %eax, %ecx
leaq 0x17322(%rip), %rax     # 0x40b50
shlq $0x4, %rcx
addq %rcx, %rax
movb (%rax), %al
movb %al, -0x1(%rsp)
jmp 0x29842
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq 0x148(%rsp), %rax
movzbl 0x39(%rax), %eax
cmpl $0x8, %eax
jne 0x29cdb
movq 0x148(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x148(%rsp), %rax
movq 0x30(%rax), %rdx
movq 0x148(%rsp), %rax
movq 0x18(%rax), %rcx
leaq 0x10(%rsp), %rdi
callq 0x13d60
cmpl $0x0, %eax
je 0x29cbf
jmp 0x29c15
leaq 0x10(%rsp), %rdi
callq 0x13e00
cmpl $0x0, %eax
je 0x29cbd
leaq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x148(%rsp), %rax
movzbl 0x38(%rax), %eax
movl %eax, %ecx
leaq 0x15dd6(%rip), %rax     # 0x3fa30
movq (%rax,%rcx,8), %rdi
movq 0x148(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x138(%rsp), %rdx
movl $0x1, %r9d
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x1, (%rsp)
movl $0x3, 0x8(%rsp)
movb $0x0, %al
callq 0x1f3b0
movq 0x150(%rsp), %rdi
movq 0x148(%rsp), %rsi
movq 0x138(%rsp), %rdx
leaq 0x63d(%rip), %rcx       # 0x2a2f0
callq 0x20700
jmp 0x29c15
jmp 0x29cd9
movq 0x148(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0xcf8a(%rip), %rdi      # 0x36c5c
movb $0x0, %al
callq 0x8ae0
jmp 0x29d1b
movq 0x148(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x150(%rsp), %rdi
movq 0x148(%rsp), %rsi
movq 0x148(%rsp), %rax
movq 0x28(%rax), %rdx
leaq 0x5da(%rip), %rcx       # 0x2a2f0
callq 0x20700
addq $0x158, %rsp            # imm = 0x158
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rsi, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq $0x0, 0x28(%rsp)
movl 0x34(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x3, %eax
ja 0x29e42
movq 0x10(%rsp), %rax
leaq 0xce8f(%rip), %rcx      # 0x36bfc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x38(%rsp), %rdi
movl $0xc, %edx
movl $0x2, %ecx
movl $0x1, %r8d
movl $0x3, %r9d
movq %rdx, %rsi
movl $0x1, (%rsp)
callq 0x22740
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x34(%rsp), %eax
movq 0x40(%rsp), %rdx
movl $0x1, %ecx
movl $0x4, %r9d
movq %r9, %r8
movl %eax, (%rsp)
callq 0x22c30
movq %rax, 0x28(%rsp)
jmp 0x29e54
movq 0x38(%rsp), %rdi
movl $0x10, %edx
movl $0x1, %r8d
movl $0x5, %r9d
movq %rdx, %rsi
movl %r8d, %ecx
movl $0x2, (%rsp)
callq 0x22740
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x2, %ecx
movl $0x10, %r9d
movq %r9, %r8
movl $0x2, (%rsp)
callq 0x22c30
movq %rax, 0x28(%rsp)
jmp 0x29e54
leaq 0xce5b(%rip), %rdi      # 0x36c94
movb $0x0, %al
callq 0x8ae0
jmp 0x29e54
movl 0x34(%rsp), %esi
leaq 0xce72(%rip), %rdi      # 0x36cbf
movb $0x0, %al
callq 0x8ae0
movq 0x28(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32i386.c
// Function: aros_targetlink
static int aros_targetlink(struct GlobalVars *gv,struct LinkedSection *ls,
                           struct Section *s)
/* returns 1, if target requires the combination of the two sections, */
/* returns -1, if target doesn't want to combine them, */
/* returns 0, if target doesn't care - standard linking rules are used. */
{
  if (!gv->dest_object && !gv->use_ldscript) {
    if ((!strncmp(ls->name,sdata_name,6) && !strncmp(s->name,sbss_name,5)
         && *(ls->name+6) == *(s->name+5)) ||
        (!strncmp(ls->name,sbss_name,5) && !strncmp(s->name,sdata_name,6)
         && *(ls->name+5) == *(s->name+6)))
      /* .sdata/.sbss, .sdata2/.sbss2, etc. are always combined */
      return (1);
  }
  return (0);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, 0x54(%rax)
jne 0x2a008
movq 0x18(%rsp), %rax
cmpl $0x0, 0x244(%rax)
jne 0x2a008
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0xb65d(%rip), %rsi      # 0x355b1
movl $0x6, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x29fa0
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0xb645(%rip), %rsi      # 0x355b8
movl $0x5, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x29fa0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movsbl 0x6(%rax), %eax
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rcx
movsbl 0x5(%rcx), %ecx
cmpl %ecx, %eax
je 0x29ffc
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0xb608(%rip), %rsi      # 0x355b8
movl $0x5, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x2a006
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0xb5e2(%rip), %rsi      # 0x355b1
movl $0x6, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x2a006
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movsbl 0x5(%rax), %eax
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rcx
movsbl 0x6(%rcx), %ecx
cmpl %ecx, %eax
jne 0x2a006
movl $0x1, 0x24(%rsp)
jmp 0x2a010
jmp 0x2a008
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32i386.c
// Function: aros_lnksym
static struct Symbol *aros_lnksym(struct GlobalVars *gv,struct Section *sec,
                                  struct Reloc *xref)
{
  struct Symbol *sym;

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

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

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x0, 0x54(%rax)
jne 0x2a15a
movq 0x38(%rsp), %rax
cmpl $0x0, 0x244(%rax)
jne 0x2a15a
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0x16e6c(%rip), %rdi     # 0x40ed0
callq 0x5130
cmpl $0x0, %eax
jne 0x2a158
movq 0x38(%rsp), %rdi
movq 0x38(%rsp), %rax
movzbl 0x50(%rax), %eax
movl %eax, %ecx
leaq 0x159a7(%rip), %rax     # 0x3fa30
movq (%rax,%rcx,8), %rax
movslq 0x9c(%rax), %rdx
leaq 0x16e35(%rip), %rsi     # 0x40ed0
movl $0x2, %ecx
movl $0x1, %r9d
xorl %eax, %eax
movl %r9d, %r8d
movl $0x2, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x101f0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movl $0x80000000, 0x48(%rax) # imm = 0x80000000
movq 0x38(%rsp), %rdi
leaq 0xb509(%rip), %rsi      # 0x355e5
callq 0x10350
cmpq $0x0, %rax
jne 0x2a14c
movq 0x38(%rsp), %rdi
movq 0x38(%rsp), %rax
movzbl 0x50(%rax), %eax
movl %eax, %ecx
leaq 0x15932(%rip), %rax     # 0x3fa30
movq (%rax,%rcx,8), %rax
movslq 0x9c(%rax), %rdx
leaq 0xb4d5(%rip), %rsi      # 0x355e5
movl $0x1, %r9d
xorl %eax, %eax
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x2, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x101f0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movb $0x2, 0x40(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0x48(%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x2a173
jmp 0x2a15a
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x21fb0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32i386.c
// Function: aros_setlnksym
static void aros_setlnksym(struct GlobalVars *gv,struct Symbol *xdef)
{
  if ((xdef->flags & SYMF_LNKSYM) && (xdef->extra & SYMX_SPECIAL)) {
    struct LinkedSection *ls;

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

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzbl 0x41(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2a1f2
movq 0x8(%rsp), %rax
movl 0x48(%rax), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
je 0x2a1f2
movq 0x8(%rsp), %rax
movl 0x48(%rax), %eax
testl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x2a1e1
jmp 0x2a1c2
movq 0x10(%rsp), %rdi
callq 0x132b0
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x60(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x8(%rsp), %rax
movzbl 0x41(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x41(%rax)
jmp 0x2a201
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x22160
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32i386.c
// Function: aros_writeexec
static void aros_writeexec(struct GlobalVars *gv,FILE *f)
/* creates a target-elfaros executable file, which in reality */
/* is a relocatable object too, but all symbol references have */
/* been resolved */
{
  struct LinkedSection *ls;

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

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

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x1c0(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0x2a2c7
movq (%rsp), %rax
movzbl 0x21(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x2a2b8
movq (%rsp), %rax
movq 0x48(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x50(%rax)
jmp 0x2a2ba
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
jmp 0x2a28e
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl $0x3, %edx
xorl %ecx, %ecx
leaq 0xc1(%rip), %r8         # 0x2a3a0
callq 0x26a50
addq $0x18, %rsp
retq
nopl (%rax)