LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: sc_input
static void sc_input(struct GlobalVars *gv)
/* INPUT(file1 [file2...]) */
{
  if (startofblock('(')) {
    char c,*fname;

    while (fname = getfilename()) {
      struct InputFile *ifn = alloc(sizeof(struct InputFile));

      if (strlen(fname)>2 && !strncmp(fname,"-l",2)) {
        fname += 2;
        while (isspace((unsigned)*fname))
          fname++;
        ifn->lib = TRUE;
        ifn->dynamic = gv->dynamic;
        ifn->so_ver = 0;  /* @@@ */
      }
      else
        ifn->lib = FALSE;
      ifn->name = allocstring(fname);
      ifn->flags = 0;  /* @@@ add support for clr/set flags? */
      addtail(&gv->inputlist,&ifn->n);

      if ((c = getchr()) == ',')
        continue;
      back(1);
      if (c=='\0' || c==')')
        break;
    }

    endofblock('(',')');
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x28, %edi
callq 0x17e00
cmpl $0x0, %eax
je 0x148b6
jmp 0x1476e
callq 0x18110
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x148a7
movl $0x28, %edi
callq 0x71f0
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x50c0
cmpq $0x2, %rax
jbe 0x1482c
movq 0x10(%rsp), %rdi
leaq 0x21443(%rip), %rsi     # 0x35bf4
movl $0x2, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x1482c
movq 0x10(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
callq 0x5260
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x147ff
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x147ce
movq 0x8(%rsp), %rax
movl $0x1, 0x18(%rax)
movq 0x20(%rsp), %rax
movl 0x240(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x1c(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0x20(%rax)
jmp 0x14838
movq 0x8(%rsp), %rax
movl $0x0, 0x18(%rax)
movq 0x10(%rsp), %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movw $0x0, 0x24(%rax)
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
callq 0x7470
callq 0x18790
movb %al, 0x1f(%rsp)
movsbl %al, %eax
cmpl $0x2c, %eax
jne 0x14882
jmp 0x1476e
movl $0x1, %edi
callq 0x18830
movsbl 0x1f(%rsp), %eax
cmpl $0x0, %eax
je 0x148a0
movsbl 0x1f(%rsp), %eax
cmpl $0x29, %eax
jne 0x148a2
jmp 0x148a7
jmp 0x1476e
movl $0x28, %edi
movl $0x29, %esi
callq 0x17f10
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: sc_provide
static void sc_provide(struct GlobalVars *gv)
/* PROVIDE(symbol = expression); */
{
  if (startofblock('(')) {
    char *symname;

    if (symname = getword()) {
      if (getchr()=='=' && *symname!='\0') {
        symbol_assignment(gv,symname,SYMF_PROVIDED);
      }
      else {
        error(66,scriptname,getlineno(),'=');  /* '=' expected */
        back(1);
      }
    }
    else
      error(78,scriptname,getlineno());
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x28, %edi
callq 0x17e00
cmpl $0x0, %eax
je 0x14977
callq 0x167b0
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x14951
callq 0x18790
movsbl %al, %eax
cmpl $0x3d, %eax
jne 0x1491c
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1491c
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x8, %edx
callq 0x15a10
jmp 0x1494f
movq 0x300cd(%rip), %rax     # 0x449f0
movq %rax, 0x10(%rsp)
callq 0x18f50
movq 0x10(%rsp), %rsi
movl %eax, %edx
movl $0x42, %edi
movl $0x3d, %ecx
movb $0x0, %al
callq 0x8c00
movl $0x1, %edi
callq 0x18830
jmp 0x14975
movq 0x30098(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movl $0x4e, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x14977
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: sc_searchdir
static void sc_searchdir(struct GlobalVars *gv)
/* SEARCH_DIR(path) */
{
  if (startofblock('(')) {
    char *path;

    if (path = getfilename()) {
      struct LibPath *libp = alloc(sizeof(struct LibPath));

      libp->path = allocstring(path);
      addtail(&gv->libpaths,&libp->n);
    }
    else
      error(78,scriptname,getlineno());

    endofblock('(',')');
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x28, %edi
callq 0x17e00
cmpl $0x0, %eax
je 0x14a11
callq 0x18110
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x149de
movl $0x18, %edi
callq 0x71f0
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x7470
jmp 0x14a02
movq 0x3000b(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movl $0x4e, %edi
movb $0x0, %al
callq 0x8c00
movl $0x28, %edi
movl $0x29, %esi
callq 0x17f10
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: update_address
void update_address(struct MemoryDescr *rmd,struct MemoryDescr *dmd,
                    unsigned long addbytes)
{
  const char *secname = current_ls ? current_ls->name : defmemname;

  rmd->current += (lword)addbytes;
  if (rmd->current > rmd->org + rmd->len) {
    /* Fatal: Size of memory region exceeded! */
    error(63,rmd->name,secname,rmd->current);
  }
  if (dmd != rmd) {
    dmd->current += addbytes;
    if (dmd->current > dmd->org + dmd->len) {
      /* Fatal: Size of memory region exceeded! */
      error(63,dmd->name,secname,dmd->current);
    }
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x2ff0d(%rip)     # 0x449d8
je 0x14ade
movq 0x2ff04(%rip), %rax     # 0x449d8
movq 0x18(%rax), %rax
movq %rax, (%rsp)
jmp 0x14ae9
movq 0x2b393(%rip), %rax     # 0x3fe78
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x20(%rsp), %rdx
addq 0x18(%rdx), %rcx
cmpq %rcx, %rax
jle 0x14b47
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rcx
movl $0x3f, %edi
movb $0x0, %al
callq 0x8c00
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x14baa
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x18(%rsp), %rdx
addq 0x18(%rdx), %rcx
cmpq %rcx, %rax
jle 0x14ba8
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rcx
movl $0x3f, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x14baa
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: free_patterns
void free_patterns(char *fpat,char **spatlist)
/* free file-pattern and section-pattern list, allocated in next_pattern() */
{
  char **p;

  if (fpat)
    free(fpat);

  if (p = spatlist) {
    while (*p) {
      free(*p);
      p++;
    }
    free(spatlist);
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x14c20
movq 0x10(%rsp), %rdi
callq 0x5030
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x14c5f
jmp 0x14c31
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0x14c55
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x5030
movq (%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
jmp 0x14c31
movq 0x8(%rsp), %rdi
callq 0x5030
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: test_pattern
int test_pattern(struct GlobalVars *gv,char **fpat,char ***spatlist)
/* Returns next file/section-patterns, but doesn't execute any commands
   or assignments. It will remember the initial parsing state to
   do it a second time for real with next_pattern(). */
{
  char c,*keyword;

  if (!secdefbase) {
    secdefbase = gettxtptr();
    secdefline = getlineno();
  }
  *fpat = NULL;
  *spatlist = NULL;
  level = 2;

  do {
    while (keyword = getpattern()) {
      if (check_command(gv,keyword,SCMDF_IGNORE)) {
        continue;
      }
      else {
        c = getchr();
        if (c == '=') {
          skip_expr(0);
        }
        else if (c == '(') {
          if (parse_pattern(gv,keyword,fpat,spatlist))
            return 1;
        }
        else {
          /* unknown keyword ignored */
          error(65,scriptname,getlineno(),keyword);
          back(1);
        }
      }
    }
  }
  while (getchr() == ';');
  back(1);

  level = 1;
  return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x2fd55(%rip)     # 0x449e0
jne 0x14ca4
callq 0x18860
movq %rax, 0x2fd47(%rip)     # 0x449e0
callq 0x18f50
movl %eax, 0x2fd44(%rip)     # 0x449e8
movq 0x20(%rsp), %rax
movq $0x0, (%rax)
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
movl $0x2, 0x2fd26(%rip)     # 0x449ec
jmp 0x14cc8
callq 0x14dc0
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x14d81
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl $0x8000, %edx           # imm = 0x8000
callq 0x14dd0
cmpl $0x0, %eax
je 0x14cf7
jmp 0x14cc8
callq 0x18790
movb %al, 0x17(%rsp)
movsbl 0x17(%rsp), %eax
cmpl $0x3d, %eax
jne 0x14d13
xorl %edi, %edi
callq 0x14f40
jmp 0x14d7a
movsbl 0x17(%rsp), %eax
cmpl $0x28, %eax
jne 0x14d47
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x14fa0
cmpl $0x0, %eax
je 0x14d45
movl $0x1, 0x34(%rsp)
jmp 0x14db0
jmp 0x14d78
movq 0x2fca2(%rip), %rax     # 0x449f0
movq %rax, (%rsp)
callq 0x18f50
movq (%rsp), %rsi
movl %eax, %edx
movq 0x8(%rsp), %rcx
movl $0x41, %edi
movb $0x0, %al
callq 0x8c00
movl $0x1, %edi
callq 0x18830
jmp 0x14d7a
jmp 0x14d7c
jmp 0x14cc8
jmp 0x14d83
callq 0x18790
movsbl %al, %eax
cmpl $0x3b, %eax
je 0x14cc6
movl $0x1, %edi
callq 0x18830
movl $0x1, 0x2fc44(%rip)     # 0x449ec
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: check_command
static int check_command(struct GlobalVars *gv,char *name,uint32_t flags)
{
  struct ScriptCmd *scptr;

  for (scptr=ldCommands; scptr->name; scptr++) {
    if (!strcmp(scptr->name,name))
      break;
  }

  if (scptr->name) {
    if (scptr->flags & flags) {
      if (scptr->cmdptr) {
        scptr->cmdptr(gv);  /* execute linker-script command */
      }
      else {
        error(69,scriptname,getlineno(),name);  /* command ignored */
        if (scptr->flags & SCMDF_PAREN)
          skipblock(0,'(',')');
      }
    }
    else {
      if (!(flags & SCMDF_IGNORE)) {
        /* command not allowed outside SECTIONS block */
        error(107,scriptname,getlineno(),name);
      }
      if (scptr->flags & SCMDF_PAREN)
        skipblock(0,'(',')');
      if (scptr->flags & SCMDF_SEMIC)
        skip_expr(0);
    }
    return 1;
  }

  return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
leaq 0x2af57(%rip), %rax     # 0x3fd40
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x14e24
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0x14e12
jmp 0x14e24
jmp 0x14e14
movq 0x10(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x10(%rsp)
jmp 0x14dee
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x14f2f
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
andl 0x1c(%rsp), %eax
cmpl $0x0, %eax
je 0x14eb2
movq 0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x14e62
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rsp), %rdi
callq *%rax
jmp 0x14eb0
movq 0x2fb87(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movq 0x20(%rsp), %rcx
movl $0x45, %edi
movb $0x0, %al
callq 0x8c00
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x14eae
xorl %edi, %edi
movl $0x28, %esi
movl $0x29, %edx
callq 0x187c0
jmp 0x14eb0
jmp 0x14f25
movl 0x1c(%rsp), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x14ee7
movq 0x2fb29(%rip), %rax     # 0x449f0
movq %rax, (%rsp)
callq 0x18f50
movq (%rsp), %rsi
movl %eax, %edx
movq 0x20(%rsp), %rcx
movl $0x6b, %edi
movb $0x0, %al
callq 0x8c00
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x14f0a
xorl %edi, %edi
movl $0x28, %esi
movl $0x29, %edx
callq 0x187c0
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x14f23
xorl %edi, %edi
callq 0x14f40
jmp 0x14f25
movl $0x1, 0x34(%rsp)
jmp 0x14f37
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: skip_expr
static void skip_expr(int provided)
/* skip normal or provided expression */
{
  char c;

  if (provided)
    skipblock(1,'(',')');

  do {
    c = getchr();
  }
  while (c!=';' && c!='\0');
}

// Assembly:
pushq %rax
movl %edi, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x14f60
movl $0x1, %edi
movl $0x28, %esi
movl $0x29, %edx
callq 0x187c0
jmp 0x14f62
callq 0x18790
movb %al, 0x3(%rsp)
movsbl 0x3(%rsp), %ecx
xorl %eax, %eax
cmpl $0x3b, %ecx
movb %al, 0x2(%rsp)
je 0x14f8a
movsbl 0x3(%rsp), %eax
cmpl $0x0, %eax
setne %al
movb %al, 0x2(%rsp)
movb 0x2(%rsp), %al
testb $0x1, %al
jne 0x14f62
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: find_phdr
static struct Phdr *find_phdr(struct GlobalVars *gv,const char *name,
                              struct MemoryDescr *vmreg,
                              struct MemoryDescr *lmreg)
{
  struct Phdr *p;

  if (p = gv->phdrlist) {
    do {
      if (!strcmp(p->name,name) && p->vmregion==vmreg && p->lmregion==lmreg)
        break;
    }
    while (p = p->next);
  }
  return p;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x1f8(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x161ac
jmp 0x16160
movq (%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0x16197
movq (%rsp), %rax
movq 0x10(%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x16197
movq (%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x8(%rsp), %rax
jne 0x16197
jmp 0x161aa
jmp 0x16199
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
jne 0x16160
jmp 0x161ac
movq (%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: guess_special_segment
static uint16_t guess_special_segment(const char *secname,const char **segname)
{
  uint16_t type;

  if (!strncmp(secname,".interp",7)) {
    *segname = defint;
    type = PT_INTERP;
  }
  else if (!strncmp(secname,".dynamic",8)) {
    *segname = defdyn;
    type = PT_DYNAMIC;
  }
  else if (!strncmp(secname,".note",5)) {
    *segname = defnot;
    type = PT_NOTE;
  }
  else {
    *segname = NULL;
    type = 0;
  }

  return type;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x1fb04(%rip), %rsi     # 0x35cde
movl $0x7, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x16201
movq 0x29cc0(%rip), %rcx     # 0x3feb0
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movw $0x3, 0x6(%rsp)
jmp 0x1627e
movq 0x10(%rsp), %rdi
leaq 0x1fad9(%rip), %rsi     # 0x35ce6
movl $0x8, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x16234
movq 0x29c95(%rip), %rcx     # 0x3feb8
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movw $0x2, 0x6(%rsp)
jmp 0x1627c
movq 0x10(%rsp), %rdi
leaq 0x1faaf(%rip), %rsi     # 0x35cef
movl $0x5, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x16267
movq 0x29c6a(%rip), %rcx     # 0x3fec0
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movw $0x4, 0x6(%rsp)
jmp 0x1627a
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
movw $0x0, 0x6(%rsp)
jmp 0x1627c
jmp 0x1627e
movw 0x6(%rsp), %ax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: change_address
static void change_address(struct MemoryDescr *md,lword newval)
{
  const char *secname = current_ls ? current_ls->name : defmemname;

  md->current = newval;
  if ((md->current < md->org) || (md->current > md->org + md->len)) {
    /* Fatal: Size of memory region exceeded! */
    error(63,md->name,secname,md->current);
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
cmpq $0x0, 0x2df62(%rip)     # 0x449d8
je 0x16a8a
movq 0x2df59(%rip), %rax     # 0x449d8
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x16a96
movq 0x293e7(%rip), %rax     # 0x3fe78
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jl 0x16ae2
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x20(%rsp), %rdx
addq 0x18(%rdx), %rcx
cmpq %rcx, %rax
jle 0x16b05
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rcx
movl $0x3f, %edi
movb $0x0, %al
callq 0x8c00
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: add_memblock
static struct MemoryDescr *add_memblock(const char *name,lword org,lword len)
{
  struct MemoryDescr *last,*new = alloc(sizeof(struct MemoryDescr));

  if (last = memory_blocks) {
    while (last->next)
      last = last->next;
    last->next = new;
  }
  else
    memory_blocks = new;

  new->next = NULL;
  new->name = allocstring(name);
  new->org = new->current = org;
  if (org+len < org)
    len -= org+len+1;
  new->len = len;
  return new;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl $0x28, %edi
callq 0x71f0
movq %rax, (%rsp)
movq 0x2df18(%rip), %rax     # 0x44a50
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x16b6d
jmp 0x16b45
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x16b5f
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x16b45
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
jmp 0x16b78
movq (%rsp), %rax
movq %rax, 0x2ded8(%rip)     # 0x44a50
movq (%rsp), %rax
movq $0x0, (%rax)
movq 0x20(%rsp), %rdi
callq 0x72d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rax)
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
addq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jge 0x16bd9
movq 0x18(%rsp), %rcx
addq 0x10(%rsp), %rcx
addq $0x1, %rcx
movq 0x10(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq (%rsp), %rax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: make_ld_objunit
static struct ObjectUnit *make_ld_objunit(struct GlobalVars *gv)
/* creates a LinkFile node and a ObjectUnit for symbols defined
   by the linker script */
{
  char namebuf[MAXLEN];
  const char *n;
  struct ObjectUnit *ou;

  snprintf(namebuf,MAXLEN,"Linker Script <%s>",scriptname);
  n = allocstring(namebuf);
  if (ou = art_objunit(gv,n,NULL,0)) {
    ou->flags |= OUF_LINKED | OUF_SCRIPT;
    /*ou->lnkfile->type = ID_OBJECT; @@@ should stay ID_ARTIFICIAL? */
    addhead(&gv->selobjects,&ou->n);
  }
  return ou;
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x110(%rsp)
leaq 0x10(%rsp), %rdi
movq 0x2d925(%rip), %rcx     # 0x449f0
movl $0x100, %esi            # imm = 0x100
leaq 0x1ec32(%rip), %rdx     # 0x35d09
movb $0x0, %al
callq 0x50e0
leaq 0x10(%rsp), %rdi
callq 0x72d0
movq %rax, 0x8(%rsp)
movq 0x110(%rsp), %rdi
movq 0x8(%rsp), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x12350
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x17140
movq (%rsp), %rax
movzwl 0x80(%rax), %ecx
orl $0x8001, %ecx           # imm = 0x8001
movw %cx, 0x80(%rax)
movq 0x110(%rsp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq (%rsp), %rsi
callq 0x7410
movq (%rsp), %rax
addq $0x118, %rsp            # imm = 0x118
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: define_memory
static void define_memory(struct GlobalVars *gv)
/* Syntax: */
/* <memblockname> [(attr)]: o[rg] = <base address>, l[en] = <maxlen> */
{
  char memname[MAXLEN];
  char *str,c;
  lword org,len;

  if (startofblock('{')) {
    while (str = getword()) {
      strcpy(memname,str);
      if ((c = getchr()) == '(') {
        /* @@@ memory attributes are ignored! */
        skipblock(1,'(',')');
        c = getchr();
      }
      if (c == ':') {
        org = readmemparam("ORIGIN");
        if (getchr() == ',') {
          len = readmemparam("LENGTH");
          add_memblock(memname,org,len);
        }
        else
          error(66,scriptname,getlineno(),',');  /* ',' expected */
      }
      else
        error(66,scriptname,getlineno(),':');    /* ':' expected */
    }
    endofblock('{','}');
  }
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movl $0x7b, %edi
callq 0x17e00
cmpl $0x0, %eax
je 0x1727a
jmp 0x17174
callq 0x167b0
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x1726b
leaq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x5060
callq 0x18790
movb %al, 0x27(%rsp)
movsbl %al, %eax
cmpl $0x28, %eax
jne 0x171c5
movl $0x1, %edi
movl $0x28, %esi
movl $0x29, %edx
callq 0x187c0
callq 0x18790
movb %al, 0x27(%rsp)
movsbl 0x27(%rsp), %eax
cmpl $0x3a, %eax
jne 0x1723f
leaq 0x1eb46(%rip), %rdi     # 0x35d1c
callq 0x183c0
movq %rax, 0x18(%rsp)
callq 0x18790
movsbl %al, %eax
cmpl $0x2c, %eax
jne 0x17214
leaq 0x1eb2f(%rip), %rdi     # 0x35d23
callq 0x183c0
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x16b10
jmp 0x1723d
movq 0x2d7d5(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movl $0x42, %edi
movl $0x2c, %ecx
movb $0x0, %al
callq 0x8c00
jmp 0x17266
movq 0x2d7aa(%rip), %rax     # 0x449f0
movq %rax, (%rsp)
callq 0x18f50
movq (%rsp), %rsi
movl %eax, %edx
movl $0x42, %edi
movl $0x3a, %ecx
movb $0x0, %al
callq 0x8c00
jmp 0x17174
movl $0x7b, %edi
movl $0x7d, %esi
callq 0x17f10
addq $0x138, %rsp            # imm = 0x138
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: startofblock
static bool startofblock(char c)
{
  if (getchr() != c) {
    error(66,scriptname,getlineno(),c);
    back(1);
    return FALSE;
  }
  return TRUE;
}

// Assembly:
subq $0x18, %rsp
movb %dil, %al
movb %al, 0x13(%rsp)
callq 0x18790
movsbl %al, %eax
movsbl 0x13(%rsp), %ecx
cmpl %ecx, %eax
je 0x17e59
movq 0x2cbcd(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movsbl 0x13(%rsp), %ecx
movl $0x42, %edi
movb $0x0, %al
callq 0x8c00
movl $0x1, %edi
callq 0x18830
movl $0x0, 0x14(%rsp)
jmp 0x17e61
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: getsection
static struct LinkedSection *getsection(struct GlobalVars *gv)
{
  struct LinkedSection *ls = NULL;
  char *sname;

  if (sname = getword()) {
    if (!(ls = find_lnksec(gv,sname,0,0,0,0)))
      error(79,scriptname,getlineno(),sname);  /* Undefined section */
  }
  else
    error(78,scriptname,getlineno());

  return ls;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
callq 0x167b0
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x17ee3
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
xorl %r9d, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x12110
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
jne 0x17ee1
movq 0x2cb31(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movq 0x10(%rsp), %rcx
movl $0x4f, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x17f05
movq 0x2cb06(%rip), %rax     # 0x449f0
movq %rax, (%rsp)
callq 0x18f50
movq (%rsp), %rsi
movl %eax, %edx
movl $0x4e, %edi
movb $0x0, %al
callq 0x8c00
movq 0x18(%rsp), %rax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: endofblock
static bool endofblock(char c1,char c2)
{
  if (getchr() != c2) {
    error(66,scriptname,getlineno(),c2);
    skipblock(1,c1,c2);
    return FALSE;
  }
  return TRUE;
}

// Assembly:
subq $0x18, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, 0x13(%rsp)
movb %al, 0x12(%rsp)
callq 0x18790
movsbl %al, %eax
movsbl 0x12(%rsp), %ecx
cmpl %ecx, %eax
je 0x17f7c
movq 0x2cab6(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movsbl 0x12(%rsp), %ecx
movl $0x42, %edi
movb $0x0, %al
callq 0x8c00
movb 0x13(%rsp), %al
movl $0x1, %edi
movsbl %al, %esi
movsbl 0x12(%rsp), %edx
callq 0x187c0
movl $0x0, 0x14(%rsp)
jmp 0x17f84
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: term_absexp
static lword term_absexp(void)
{
  lword val = 0;

  if (getchr() == '(') {
    if (!parse_expr(-1,&val))
      error(67,scriptname,getlineno());  /* Absolute number expected */
    if (getchr() != ')') {
      error(66,scriptname,getlineno(),')');  /* ')' expected */
      skipblock(1,'(',')');
    }
  }
  else
    error(66,scriptname,getlineno(),'(');  /* '(' expected */

  return val;
}

// Assembly:
subq $0x28, %rsp
movq $0x0, 0x20(%rsp)
callq 0x18790
movsbl %al, %eax
cmpl $0x28, %eax
jne 0x18034
movq $-0x1, %rdi
leaq 0x20(%rsp), %rsi
callq 0x18a10
cmpl $0x0, %eax
jne 0x17fe8
movq 0x2ca25(%rip), %rax     # 0x449f0
movq %rax, 0x18(%rsp)
callq 0x18f50
movq 0x18(%rsp), %rsi
movl %eax, %edx
movl $0x43, %edi
movb $0x0, %al
callq 0x8c00
callq 0x18790
movsbl %al, %eax
cmpl $0x29, %eax
je 0x18032
movq 0x2c9f4(%rip), %rax     # 0x449f0
movq %rax, 0x10(%rsp)
callq 0x18f50
movq 0x10(%rsp), %rsi
movl %eax, %edx
movl $0x42, %edi
movl $0x29, %ecx
movb $0x0, %al
callq 0x8c00
movl $0x1, %edi
movl $0x28, %esi
movl $0x29, %edx
callq 0x187c0
jmp 0x1805d
movq 0x2c9b5(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movl $0x42, %edi
movl $0x28, %ecx
movb $0x0, %al
callq 0x8c00
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: set_ctors_type
static void set_ctors_type(struct GlobalVars *gv,uint8_t type)
{
  if (gv->collect_ctors_type!=CCDT_NONE &&
      gv->collect_ctors_type!=type)
    error(71,scriptname,getlineno());  /* multiple constructor types */

  gv->collect_ctors_type = type;

  if (new_ls_name)
    gv->collect_ctors_secname = new_ls_name;
}

// Assembly:
subq $0x18, %rsp
movb %sil, %al
movq %rdi, 0x10(%rsp)
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rax
movzbl 0x203(%rax), %eax
cmpl $0x0, %eax
je 0x180c8
movq 0x10(%rsp), %rax
movzbl 0x203(%rax), %eax
movzbl 0xf(%rsp), %ecx
cmpl %ecx, %eax
je 0x180c8
movq 0x2c943(%rip), %rax     # 0x449f0
movq %rax, (%rsp)
callq 0x18f50
movq (%rsp), %rsi
movl %eax, %edx
movl $0x47, %edi
movb $0x0, %al
callq 0x8c00
movb 0xf(%rsp), %cl
movq 0x10(%rsp), %rax
movb %cl, 0x203(%rax)
cmpq $0x0, 0x2c969(%rip)     # 0x44a48
je 0x180f4
movq 0x2c960(%rip), %rcx     # 0x44a48
movq 0x10(%rsp), %rax
movq %rcx, 0x208(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: getfilename
static char *getfilename(void)
{
  if (getchr() == '\"') {
    back(1);
    return getquoted();
  }

  back(1);
  return getarg(27);
}

// Assembly:
pushq %rax
callq 0x18790
movsbl %al, %eax
cmpl $0x22, %eax
jne 0x18133
movl $0x1, %edi
callq 0x18830
callq 0x18930
movq %rax, (%rsp)
jmp 0x1814b
movl $0x1, %edi
callq 0x18830
movl $0x1b, %edi
callq 0x18870
movq %rax, (%rsp)
movq (%rsp), %rax
popq %rcx
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: scriptsymbol
static void scriptsymbol(struct GlobalVars *gv,char *name,
                         lword val,uint8_t type,uint8_t flags)
{
  struct Symbol *sym;
  struct Symbol **chain = &script_obj->objsyms[elf_hash(name)%OBJSYMHTABSIZE];

  while (sym = *chain) {
    if (!strcmp(name,sym->name)) {
      error(109,scriptname,getlineno(),name);  /* already defined */
      return;
    }
    chain = &sym->obj_chain;
  }
  sym = alloczero(sizeof(struct Symbol));
  if (check_protection(gv,name))
    flags |= SYMF_PROTECTED;

  sym->name = allocstring(name);
  sym->value = val;
  sym->type = type;
  sym->flags = flags;
  sym->bind = SYMB_GLOBAL;

  /* These symbols will be moved from scriptsymbols list into
     LinkedSection.symbols during linker_copy() - at least
     the remaining, absolute ones. */
  if (addglobsym(gv,sym)) {
    *chain = sym;
    addtail(&gv->scriptsymbols,&sym->n);
  }
  else
    free(sym);
}

// Assembly:
subq $0x48, %rsp
movb %r8b, %al
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movb %cl, 0x2f(%rsp)
movb %al, 0x2e(%rsp)
movq 0x2c8bb(%rip), %rax     # 0x44a40
movq 0x48(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0x8760
movq %rax, %rcx
movq 0x10(%rsp), %rax
andq $0x1f, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x18219
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0x18209
movq 0x2c80e(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movq 0x38(%rsp), %rcx
movl $0x6d, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x182d0
movq 0x20(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x18(%rsp)
jmp 0x181b0
movl $0x50, %edi
callq 0x7290
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xf6e0
cmpl $0x0, %eax
je 0x18248
movzbl 0x2e(%rsp), %eax
orl $0x4, %eax
movb %al, 0x2e(%rsp)
movq 0x38(%rsp), %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x30(%rax)
movb 0x2f(%rsp), %cl
movq 0x20(%rsp), %rax
movb %cl, 0x40(%rax)
movb 0x2e(%rsp), %cl
movq 0x20(%rsp), %rax
movb %cl, 0x41(%rax)
movq 0x20(%rsp), %rax
movb $0x2, 0x43(%rax)
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xf750
cmpl $0x0, %eax
je 0x182c6
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x40(%rsp), %rdi
addq $0x190, %rdi            # imm = 0x190
movq 0x20(%rsp), %rsi
callq 0x7470
jmp 0x182d0
movq 0x20(%rsp), %rdi
callq 0x5030
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: get_dummy_sec
static struct Section *get_dummy_sec(const char *name)
/* return dummy section of our artificial script-object with name */
{
  struct Section *sec;

  for (sec=(struct Section *)script_obj->sections.first;
       sec->n.next!=NULL; sec=(struct Section *)sec->n.next) {
    if (!strcmp(sec->name,name))
      break;
  }
  if (sec->n.next == NULL)
    ierror("get_dummy_sec(): Dummy section \"%s\" not found",name);
  return sec;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x2c750(%rip), %rax     # 0x44a40
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x1832f
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0x1831e
jmp 0x1832f
jmp 0x18320
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x182f9
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1834d
movq 0x10(%rsp), %rsi
leaq 0x1d93c(%rip), %rdi     # 0x35c82
movb $0x0, %al
callq 0x8ae0
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: find_memblock
static struct MemoryDescr *find_memblock(char *name)
{
  struct MemoryDescr *md = memory_blocks;

  while (md) {
    if (!strcmp(md->name,name))
      return (md);
    md = md->next;
  }
  return NULL;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x2c6e0(%rip), %rax     # 0x44a50
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x183aa
movq (%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x5130
cmpl $0x0, %eax
jne 0x1839d
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x183b3
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
jmp 0x18374
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: readmemparam
static lword readmemparam(char *key)
{
  char *str;
  lword val = 0;

  if (str = getword()) {
    if (toupper((unsigned char)*str) == *key) {
      if (getchr() == '=') {
        if (!parse_expr(-1,&val))
          error(67,scriptname,getlineno());  /* Absolute number expected */
      }
      else
        error(66,scriptname,getlineno(),'=');
    }
    else
      error(68,scriptname,getlineno(),key);  /* keyword expected */
  }
  else
    error(68,scriptname,getlineno(),key);
  return val;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
callq 0x167b0
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x1849e
movq 0x28(%rsp), %rax
movzbl (%rax), %edi
callq 0x5070
movq 0x30(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x18473
callq 0x18790
movsbl %al, %eax
cmpl $0x3d, %eax
jne 0x18448
movq $-0x1, %rdi
leaq 0x20(%rsp), %rsi
callq 0x18a10
cmpl $0x0, %eax
jne 0x18446
movq 0x2c5c7(%rip), %rax     # 0x449f0
movq %rax, 0x18(%rsp)
callq 0x18f50
movq 0x18(%rsp), %rsi
movl %eax, %edx
movl $0x43, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x18471
movq 0x2c5a1(%rip), %rax     # 0x449f0
movq %rax, 0x10(%rsp)
callq 0x18f50
movq 0x10(%rsp), %rsi
movl %eax, %edx
movl $0x42, %edi
movl $0x3d, %ecx
movb $0x0, %al
callq 0x8c00
jmp 0x1849c
movq 0x2c576(%rip), %rax     # 0x449f0
movq %rax, 0x8(%rsp)
callq 0x18f50
movq 0x8(%rsp), %rsi
movl %eax, %edx
movq 0x30(%rsp), %rcx
movl $0x44, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x184c5
movq 0x2c54b(%rip), %rax     # 0x449f0
movq %rax, (%rsp)
callq 0x18f50
movq (%rsp), %rsi
movl %eax, %edx
movq 0x30(%rsp), %rcx
movl $0x44, %edi
movb $0x0, %al
callq 0x8c00
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ldscript.c
// Function: use_segment
static void use_segment(struct GlobalVars *gv,const char *name,uint32_t type,
                        struct MemoryDescr *vmreg,struct MemoryDescr *lmreg)
{
  struct Phdr *p;

  if (p = find_phdr(gv,name,vmreg,lmreg)) {
    if (p->type == PT_NULL)
      return;
  }
  else {
    if (!(p = add_phdr(gv,name,type,0,ADDR_NONE,vmreg,lmreg)))
      return;
  }
  p->flags |= PHDR_USED;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq 0x16130
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x1851f
movq 0x8(%rsp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x1851d
jmp 0x18568
jmp 0x18558
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movq 0x18(%rsp), %r9
movq 0x10(%rsp), %rax
xorl %ecx, %ecx
movq $-0x1, %r8
movq %rax, (%rsp)
callq 0x17660
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x18556
jmp 0x18568
jmp 0x18558
movq 0x8(%rsp), %rax
movzwl 0x24(%rax), %ecx
orl $0x10, %ecx
movw %cx, 0x24(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/pmatch.c
// Function: patternlist_match
bool patternlist_match(char **patlist,const char *str)
/* match string against a list of patterns */
{
  if (patlist) {
    while (*patlist) {
      if (pattern_match(*patlist,str))
        return (TRUE);
      patlist++;
    }
  }
  return (FALSE);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x185f4
jmp 0x185b7
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x185f2
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rsi
callq 0x18570
cmpl $0x0, %eax
je 0x185e2
movl $0x1, 0x14(%rsp)
jmp 0x185fc
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
jmp 0x185b7
jmp 0x185f4
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: skip
void skip(void)
/* skips blanks, tabs, newlines and comments */
{
  s = skipblanks(s);
  while (*s == '/' && *(s+1) == '*') {
    /* skip comment */
    s += 2;
    while (*s && (*s!='*' || *(s+1)!='/')) {
      if (*s=='\n')
        line++;
      s++;
    }
    s += 2;
    s = skipblanks(s);
  }
}

// Assembly:
pushq %rax
movq 0x2c448(%rip), %rdi     # 0x44a60
callq 0x18720
movq %rax, 0x2c43c(%rip)     # 0x44a60
movq 0x2c435(%rip), %rax     # 0x44a60
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2f, %ecx
movb %al, 0x7(%rsp)
jne 0x1864e
movq 0x2c420(%rip), %rax     # 0x44a60
movsbl 0x1(%rax), %eax
cmpl $0x2a, %eax
sete %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1865b
jmp 0x1871d
movq 0x2c3fe(%rip), %rax     # 0x44a60
addq $0x2, %rax
movq %rax, 0x2c3f3(%rip)     # 0x44a60
movq 0x2c3ec(%rip), %rax     # 0x44a60
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x6(%rsp)
je 0x186b4
movq 0x2c3d7(%rip), %rax     # 0x44a60
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2a, %ecx
movb %al, 0x5(%rsp)
jne 0x186ac
movq 0x2c3c2(%rip), %rax     # 0x44a60
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, 0x5(%rsp)
movb 0x5(%rsp), %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x186be
jmp 0x186f3
movq 0x2c39b(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x186dc
movl 0x2c395(%rip), %eax     # 0x44a68
addl $0x1, %eax
movl %eax, 0x2c38c(%rip)     # 0x44a68
movq 0x2c37d(%rip), %rax     # 0x44a60
addq $0x1, %rax
movq %rax, 0x2c372(%rip)     # 0x44a60
jmp 0x1866d
movq 0x2c366(%rip), %rax     # 0x44a60
addq $0x2, %rax
movq %rax, 0x2c35b(%rip)     # 0x44a60
movq 0x2c354(%rip), %rdi     # 0x44a60
callq 0x18720
movq %rax, 0x2c348(%rip)     # 0x44a60
jmp 0x18624
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: skipblanks
static char *skipblanks(char *sp)
{
  unsigned char c = (unsigned char)*sp;

  while (isspace(c)) {
    if (c == '\n')
      line++;
    c = (unsigned char)*(++sp);
  }
  return sp;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movb (%rax), %al
movb %al, 0xf(%rsp)
callq 0x5260
movq (%rax), %rax
movzbl 0xf(%rsp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x18785
movzbl 0xf(%rsp), %eax
cmpl $0xa, %eax
jne 0x1876b
movl 0x2c306(%rip), %eax     # 0x44a68
addl $0x1, %eax
movl %eax, 0x2c2fd(%rip)     # 0x44a68
movq 0x10(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rsp)
movb 0x1(%rax), %al
movb %al, 0xf(%rsp)
jmp 0x18734
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: getchr
char getchr(void)
{
  char c;

  skip();
  if (c = *s)
    s++;
  return c;
}

// Assembly:
pushq %rax
callq 0x18610
movq 0x2c2c3(%rip), %rax     # 0x44a60
movb (%rax), %al
movb %al, 0x7(%rsp)
cmpb $0x0, %al
je 0x187b9
movq 0x2c2b2(%rip), %rax     # 0x44a60
addq $0x1, %rax
movq %rax, 0x2c2a7(%rip)     # 0x44a60
movb 0x7(%rsp), %al
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: skipblock
void skipblock(int level,char start,char end)
/* skips a block between the two specified start- and end-characters */
{
  char c;

  while (c = getchr()) {
    if (c == start) {
      ++level;
    }
    else if (c == end) {
      if (--level <= 0)
        break;
    }
  }
}

// Assembly:
pushq %rax
movb %dl, %al
movb %sil, %cl
movl %edi, 0x4(%rsp)
movb %cl, 0x3(%rsp)
movb %al, 0x2(%rsp)
callq 0x18790
movb %al, 0x1(%rsp)
cmpb $0x0, %al
je 0x18820
movsbl 0x1(%rsp), %eax
movsbl 0x3(%rsp), %ecx
cmpl %ecx, %eax
jne 0x187fa
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x1881e
movsbl 0x1(%rsp), %eax
movsbl 0x2(%rsp), %ecx
cmpl %ecx, %eax
jne 0x1881c
movl 0x4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rsp)
cmpl $0x0, %eax
jg 0x1881a
jmp 0x18820
jmp 0x1881c
jmp 0x1881e
jmp 0x187d2
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: getarg
char *getarg(uint8_t mask)
{
/* table of valid characters, */
/* 0=invalid, 1=valid in whole word, 2=valid, but not as first char */
/* 4=symbols for pattern-matching, 11(+16)=valid for file names */
  static uint8_t validchars[256] = {
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,8,0,0,0,8,0,0,0,0,4,8,0,8,1,12, /* * . / */
    2,2,2,2,2,2,2,2,2,2,8,0,0,8,0,4,  /* 0-9 ? */
    8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,  /* A-O */
    1,1,1,1,1,1,1,1,1,1,1,8,0,8,8,1,  /* P-Z _ */
    0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,  /* a-o */
    1,1,1,1,1,1,1,1,1,1,1,8,0,8,0,0,  /* p-z */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16
  };
  static char buffer[MAXLEN];
  char *bp = buffer;

  /* try to read next word into buffer */
  skip();
  while (validchars[(unsigned char)*s] & mask) {
    mask |= 2;
    *bp++ = *s++;
    if (bp >= &buffer[MAXLEN-1])
      break;  /* buffer overflow */
  }
  *bp = '\0';

  if (buffer[0])
    return buffer;

  return NULL;  /* no valid word read */
}

// Assembly:
subq $0x18, %rsp
movb %dil, %al
movb %al, 0xf(%rsp)
leaq 0x2c1ee(%rip), %rax     # 0x44a70
movq %rax, (%rsp)
callq 0x18610
movq 0x2c1ce(%rip), %rax     # 0x44a60
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x27632(%rip), %rax     # 0x3fed0
movzbl (%rax,%rcx), %eax
movzbl 0xf(%rsp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x188f9
movzbl 0xf(%rsp), %eax
orl $0x2, %eax
movb %al, 0xf(%rsp)
movq 0x2c19f(%rip), %rax     # 0x44a60
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x2c191(%rip)     # 0x44a60
movb (%rax), %cl
movq (%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rsp)
movb %cl, (%rax)
leaq 0x2c187(%rip), %rax     # 0x44a70
addq $0xff, %rax
cmpq %rax, (%rsp)
jb 0x188f7
jmp 0x188f9
jmp 0x1888b
movq (%rsp), %rax
movb $0x0, (%rax)
cmpb $0x0, 0x2c169(%rip)     # 0x44a70
je 0x18917
leaq 0x2c160(%rip), %rax     # 0x44a70
movq %rax, 0x10(%rsp)
jmp 0x18920
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: getquoted
char *getquoted(void)
/* return characters between "quotes" */
{
  skip();
  if (*s == '\"') {
    static char buffer[MAXLEN];
    char c,*bp=buffer;

    s++;

    while (c = *s) {
      s++;

      if (c == '\n') {
        line++;
        break;  /* @@@ newline breaks string? */
      }
      else if (c == '\"')
        break;

      *bp++ = c;
      if (bp >= &buffer[MAXLEN-1])
        break;  /* buffer overflow */
    }
    *bp = '\0';
    return buffer;
  }

  return NULL;
}

// Assembly:
subq $0x18, %rsp
callq 0x18610
movq 0x2c120(%rip), %rax     # 0x44a60
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x189f6
leaq 0x2c21d(%rip), %rax     # 0x44b70
movq %rax, (%rsp)
movq 0x2c102(%rip), %rax     # 0x44a60
addq $0x1, %rax
movq %rax, 0x2c0f7(%rip)     # 0x44a60
movq 0x2c0f0(%rip), %rax     # 0x44a60
movb (%rax), %al
movb %al, 0xf(%rsp)
cmpb $0x0, %al
je 0x189e1
movq 0x2c0df(%rip), %rax     # 0x44a60
addq $0x1, %rax
movq %rax, 0x2c0d4(%rip)     # 0x44a60
movsbl 0xf(%rsp), %eax
cmpl $0xa, %eax
jne 0x189a7
movl 0x2c0cc(%rip), %eax     # 0x44a68
addl $0x1, %eax
movl %eax, 0x2c0c3(%rip)     # 0x44a68
jmp 0x189e1
movsbl 0xf(%rsp), %eax
cmpl $0x22, %eax
jne 0x189b3
jmp 0x189e1
jmp 0x189b5
movb 0xf(%rsp), %cl
movq (%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rsp)
movb %cl, (%rax)
leaq 0x2c19f(%rip), %rax     # 0x44b70
addq $0xff, %rax
cmpq %rax, (%rsp)
jb 0x189df
jmp 0x189e1
jmp 0x18969
movq (%rsp), %rax
movb $0x0, (%rax)
leaq 0x2c181(%rip), %rax     # 0x44b70
movq %rax, 0x10(%rsp)
jmp 0x189ff
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: parse_expr
int parse_expr(lword current_addr,lword *result)
/* Tries to parse the input stream. Returns !0 for an absolute result.
   If current_addr = -1 then '.' is not defined and only references
   to absolute symbols are allowed.
   If current_addr = -2 then no expression evaluation takes place
   at all. The expression is just skipped. */
{
  lword saved_caddr = caddr;
  struct Expr *tree;
  int abs;

  caddr = current_addr;
  skip();
  tree = expression();
  abs = caddr==-2 ? 1 : eval_expr(tree,result);
  free_expr(tree);
  caddr = saved_caddr;
  return abs;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x2c24b(%rip), %rax     # 0x44c70
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x2c23a(%rip)     # 0x44c70
callq 0x18610
callq 0x18aa0
movq %rax, 0x8(%rsp)
cmpq $-0x2, 0x2c223(%rip)    # 0x44c70
jne 0x18a59
movl $0x1, %eax
movl %eax, (%rsp)
jmp 0x18a6b
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x18b50
movl %eax, (%rsp)
movl (%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
callq 0x18f10
movq 0x10(%rsp), %rax
movq %rax, 0x2c1e8(%rip)     # 0x44c70
movl 0x4(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: expression
static struct Expr *expression(void)
{
  struct Expr *left,*new;

  left = logical_and_expr();
  skip();
  while (s[0]=='|' && s[1]=='|') {
    s += 2;
    skip();
    new = new_expr();
    new->type = LOR;
    skip();
    new->left = left;
    new->right = logical_and_expr();
    left = new;
  }
  return left;
}

// Assembly:
subq $0x18, %rsp
callq 0x18fb0
movq %rax, 0x10(%rsp)
callq 0x18610
movq 0x2bfa6(%rip), %rax     # 0x44a60
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x7c, %ecx
movb %al, 0x7(%rsp)
jne 0x18add
movq 0x2bf91(%rip), %rax     # 0x44a60
movsbl 0x1(%rax), %eax
cmpl $0x7c, %eax
sete %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x18ae7
jmp 0x18b46
movq 0x2bf72(%rip), %rax     # 0x44a60
addq $0x2, %rax
movq %rax, 0x2bf67(%rip)     # 0x44a60
callq 0x18610
callq 0x19060
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl $0x8, (%rax)
callq 0x18610
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
callq 0x18fb0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x18ab3
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: free_expr
static void free_expr(struct Expr *tree)
{
  if (tree) {
    free_expr(tree->left);
    free_expr(tree->right);
    free(tree);
  }
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
je 0x18f3f
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x18f10
movq (%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x18f10
movq (%rsp), %rdi
callq 0x5030
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/expr.c
// Function: init_parser
void init_parser(struct GlobalVars *gvptr,const char *scname,
                 const char *base,int lineno)
{
  gv = gvptr;
  scriptname = scname;
  s = (char *)base;
  line = lineno;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movl %ecx, -0x1c(%rsp)
movq -0x8(%rsp), %rax
movq %rax, 0x2bcf9(%rip)     # 0x44c78
movq -0x10(%rsp), %rax
movq %rax, 0x2bcf5(%rip)     # 0x44c80
movq -0x18(%rsp), %rax
movq %rax, 0x2bac9(%rip)     # 0x44a60
movl -0x1c(%rsp), %eax
movl %eax, 0x2bac7(%rip)     # 0x44a68
retq
nopw %cs:(%rax,%rax)