// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/targets.c
// Function: fixlnksymbols
void fixlnksymbols(struct GlobalVars *gv,struct LinkedSection *def_ls)
{
  struct Symbol *sym,*next;
  int i;

  if (gv->lnksyms) {
    for (i=0; i<LNKSYMHTABSIZE; i++) {
      for (sym=gv->lnksyms[i]; sym; sym=next) {
        next = sym->obj_chain;

        if (sym->flags & SYMF_LNKSYM) {
          if (fff[gv->dest_format]->setlnksym) {
            /* do target-specific symbol modificatios (relsect, value, etc.) */
            fff[gv->dest_format]->setlnksym(gv,sym);

            if (sym->relsect==NULL && def_ls!=NULL) {
              /* @@@ attach absolute symbols to the provided default section */
              if (!listempty(&def_ls->sections))
                sym->relsect = (struct Section *)def_ls->sections.first;
            }
            if (sym->type == SYM_RELOC)
              sym->value += sym->relsect->va;
#if 0 /* @@@ not needed? */
            add_objsymbol(sym->relsect->obj,sym);
#endif
            if (sym->bind >= SYMB_GLOBAL)
              addglobsym(gv,sym);  /* make it globally visible */
            /* add to final output section */
            addtail(&sym->relsect->lnksec->symbols,&sym->n);
            if (gv->map_file)
              print_symbol(gv->map_file,sym);
          }
        }
      }
      gv->lnksyms[i] = NULL;  /* clear chain, it's unusable now! */
    }
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq $0x0, 0x188(%rax)
je 0x105b3
movl $0x0, 0x4(%rsp)
cmpl $0x10, 0x4(%rsp)
jge 0x105b1
movq 0x20(%rsp), %rax
movq 0x188(%rax), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x10588
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movzbl 0x41(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10577
movq 0x20(%rsp), %rax
movzbl 0x50(%rax), %eax
movl %eax, %ecx
leaq 0x2f5b1(%rip), %rax     # 0x3fa30
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x50(%rax)
je 0x10575
movq 0x20(%rsp), %rax
movzbl 0x50(%rax), %eax
movl %eax, %ecx
leaq 0x2f590(%rip), %rax     # 0x3fa30
movq (%rax,%rcx,8), %rax
movq 0x50(%rax), %rax
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq *%rax
movq 0x10(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x104eb
cmpq $0x0, 0x18(%rsp)
je 0x104eb
movq 0x18(%rsp), %rax
movq 0x60(%rax), %rax
cmpq $0x0, (%rax)
je 0x104e9
movq 0x18(%rsp), %rax
movq 0x60(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rax)
jmp 0x104eb
movq 0x10(%rsp), %rax
movzbl 0x40(%rax), %eax
cmpl $0x2, %eax
jne 0x10513
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x30(%rax), %rcx
movq 0x10(%rsp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq 0x10(%rsp), %rax
movzbl 0x43(%rax), %eax
cmpl $0x2, %eax
jl 0x10530
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xf750
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rdi
addq $0xb0, %rdi
movq 0x10(%rsp), %rsi
callq 0x7470
movq 0x20(%rsp), %rax
cmpq $0x0, 0x90(%rax)
je 0x10573
movq 0x20(%rsp), %rax
movq 0x90(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x9190
jmp 0x10575
jmp 0x10577
jmp 0x10579
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1043e
movq 0x20(%rsp), %rax
movq 0x188(%rax), %rax
movslq 0x4(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x10419
jmp 0x105b3
addq $0x28, %rsp
retq
nopl (%rax,%rax)