// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/t_aout.c
// Function: aout_addsymlist
void aout_addsymlist(struct GlobalVars *gv,struct LinkedSection **ls,
                     uint8_t bind,uint8_t type,int be)
/* add all symbols with specified bind and type to the a.out symbol list */
{
  int i;

  for (i=0; i<3; i++) {
    if (ls[i]) {
      struct Symbol *sym = (struct Symbol *)ls[i]->symbols.first;
      struct Symbol *nextsym;

      while (nextsym = (struct Symbol *)sym->n.next) {
        uint8_t syminfo = aout_getinfo(sym);
        uint8_t symbind = aout_getbind(sym);

        if (symbind == bind && (!type || (syminfo == type))) {
          if (!discard_symbol(gv,sym)) {
            remnode(&sym->n);
            /* add new symbol(s) */
            aout_symconvert(gv,sym,symbind,syminfo,ls,i,be);
          }
        }
        sym = nextsym;
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, 0xc(%rsp)
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
cmpl $0x1, %edx
sete %al
leal 0xa(%rax), %ecx
movl %ecx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
addl $0x2, %eax
movl %eax, 0x1c(%rsp)
movzbl %r15b, %eax
movl %eax, 0x8(%rsp)
xorl %r14d, %r14d
movl %edx, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq (%rax,%r14,8), %rax
testq %rax, %rax
je 0x1c7ec
movq 0xb0(%rax), %rbx
movq (%rbx), %rax
testq %rax, %rax
je 0x1c7ec
movq %rbx, %r13
movq %rax, %rbx
movzbl 0x42(%r13), %ecx
cmpl $0x5, %ecx
jae 0x1c625
shlb $0x3, %cl
movl $0x20100, %r12d         # imm = 0x20100
shrq %cl, %r12
jmp 0x1c635
leaq 0x84cd(%rip), %rdi      # 0x24af9
movl %ecx, %esi
xorl %eax, %eax
callq 0x52b0
movzbl 0x43(%r13), %esi
leal -0x1(%rsi), %eax
cmpb $0x3, %al
jae 0x1c658
testb %bpl, %bpl
sete %cl
cmpb %bpl, %r12b
sete %dl
cmpb %r15b, %al
jne 0x1c5fb
orb %dl, %cl
jne 0x1c670
jmp 0x1c5fb
leaq 0x84c2(%rip), %rdi      # 0x24b21
xorl %eax, %eax
callq 0x52b0
testb %bpl, %bpl
je 0x1c670
cmpb %bpl, %r12b
jne 0x1c5fb
movq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0xcb79
testl %eax, %eax
jne 0x1c5fb
movq %r13, %rdi
callq 0x6759
movzbl 0x42(%r13), %ecx
cmpl $0x3, %ecx
je 0x1c5fb
movl 0x30(%r13), %r15d
movb $0x1f, %al
cmpl $0x4, %ecx
jne 0x1c6d2
movl %r15d, %esi
movq 0x20(%r13), %rdi
movl 0xc(%rsp), %ecx
movl %ecx, (%rsp)
movzbl %r12b, %ecx
movzbl %al, %r8d
movl 0x8(%rsp), %edx
xorl %r9d, %r9d
callq 0x1c881
movl 0x10(%rsp), %r15d
jmp 0x1c5fb
movl 0x44(%r13), %eax
movzbl 0x40(%r13), %esi
cmpb $0x2, 0x10(%rsp)
movl %eax, 0x14(%rsp)
jne 0x1c700
cmpl $0x1, %esi
je 0x1c72d
cmpl $0x2, %esi
jne 0x1c731
leaq 0x81fc(%rip), %rax      # 0x248f3
movb (%r14,%rax), %cl
jmp 0x1c791
leal -0x1(%rsi), %eax
cmpl $0x3, %eax
ja 0x1c781
leaq 0x81d1(%rip), %rcx      # 0x248e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movl 0x1c(%rsp), %ecx
jmpq *%rax
leaq 0x81cd(%rip), %rax      # 0x248f0
movb (%r14,%rax), %cl
orb 0x20(%rsp), %cl
jmp 0x1c791
movb $0xe, %cl
jmp 0x1c791
leaq 0x8414(%rip), %rdi      # 0x24b4c
jmp 0x1c788
movb $0x1, %al
movl 0x14(%rsp), %esi
jmp 0x1c6a9
movq 0x20(%r13), %rdi
movl 0xc(%rsp), %r15d
movl %r15d, (%rsp)
movzbl 0x18(%rsp), %r8d
xorl %esi, %esi
movl 0x8(%rsp), %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x1c881
movq 0x28(%r13), %rdi
movl %r15d, (%rsp)
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
jmp 0x1c6c0
leaq 0x83f4(%rip), %rdi      # 0x24b7c
xorl %eax, %eax
callq 0x52b0
xorl %ecx, %ecx
movq 0x20(%r13), %rdi
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movzbl %r12b, %r12d
movzbl %cl, %r8d
movl %r15d, %esi
movl 0x8(%rsp), %edx
movl %r12d, %ecx
xorl %r9d, %r9d
callq 0x1c881
movl 0x14(%rsp), %esi
testl %esi, %esi
movl 0x10(%rsp), %r15d
je 0x1c5fb
movq 0x20(%r13), %rdi
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movl 0x8(%rsp), %edx
movl %r12d, %ecx
movl $0xc, %r8d
xorl %r9d, %r9d
callq 0x1c881
jmp 0x1c5fb
incq %r14
cmpq $0x3, %r14
jne 0x1c5e2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq