// File: /workspace/github_c_makefile_star2_O1/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, 0x14(%rsp)
movl %ecx, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
xorl %ecx, %ecx
movq 0x28(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x1c97c
movq 0xb0(%rax), %r14
movq (%r14), %rax
testq %rax, %rax
je 0x1c97c
movq %r14, %rbx
movq %rax, %r14
movzbl 0x42(%rbx), %ecx
cmpl $0x5, %ecx
jae 0x1c7ab
shlb $0x3, %cl
movl $0x20100, %r13d         # imm = 0x20100
shrq %cl, %r13
jmp 0x1c7bb
leaq 0x8367(%rip), %rdi      # 0x24b19
movl %ecx, %esi
xorl %eax, %eax
callq 0x52b0
movzbl 0x43(%rbx), %esi
leal -0x1(%rsi), %r12d
cmpb $0x3, %r12b
jae 0x1c7e8
leal (,%r12,8), %ecx
movl $0x100, %r15d           # imm = 0x100
shrl %cl, %r15d
movl %r12d, %ecx
andb $0x7, %cl
movb $0x4, %bpl
shrb %cl, %bpl
jmp 0x1c7f9
xorl %r15d, %r15d
leaq 0x834f(%rip), %rdi      # 0x24b41
xorl %eax, %eax
callq 0x52b0
movl 0x24(%rsp), %ecx
testb %cl, %cl
sete %al
cmpb %cl, %r13b
sete %cl
cmpb 0x20(%rsp), %r12b
jne 0x1c782
orb %cl, %al
je 0x1c782
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xcbff
testl %eax, %eax
jne 0x1c782
movq %rbx, %rdi
callq 0x6789
movzbl 0x42(%rbx), %eax
cmpl $0x3, %eax
je 0x1c782
movl 0x30(%rbx), %edx
movb $0x1f, %cl
cmpl $0x4, %eax
jne 0x1c857
xorl %r15d, %r15d
jmp 0x1c925
movl 0x44(%rbx), %edi
movzbl 0x40(%rbx), %esi
testb $0x1, %bpl
je 0x1c87f
cmpl $0x1, %esi
je 0x1c8a3
cmpl $0x2, %esi
jne 0x1c8aa
leaq 0x809e(%rip), %rax      # 0x24913
movq 0x18(%rsp), %rcx
movb (%rcx,%rax), %cl
jmp 0x1c8a5
movl %edx, %ebp
leal -0x1(%rsi), %eax
cmpl $0x3, %eax
ja 0x1c910
leaq 0x806c(%rip), %rcx      # 0x24900
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
orb $0x2, %r15b
jmp 0x1c908
movb $0xe, %cl
movl %edi, %r15d
jmp 0x1c925
movl %edi, %r15d
leaq 0x82b8(%rip), %rdi      # 0x24b6c
xorl %eax, %eax
movl %edx, %ebp
jmp 0x1c91c
movb $0x1, %cl
movl %edi, %edx
jmp 0x1c84f
movq 0x20(%rbx), %rdi
orb $0xa, %r15b
movl 0x14(%rsp), %ebp
movl %ebp, (%rsp)
movzbl %r12b, %edx
movzbl %r15b, %r8d
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x1ca08
movq 0x28(%rbx), %rdi
movl %ebp, (%rsp)
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
jmp 0x1c96f
leaq 0x8011(%rip), %rax      # 0x24910
movq 0x18(%rsp), %rcx
orb (%rcx,%rax), %r15b
movl %r15d, %ecx
movl %edi, %r15d
jmp 0x1c923
movl %edi, %r15d
leaq 0x8282(%rip), %rdi      # 0x24b9c
xorl %eax, %eax
callq 0x52b0
xorl %ecx, %ecx
movl %ebp, %edx
movq 0x20(%rbx), %rdi
movl 0x14(%rsp), %eax
movl %eax, (%rsp)
movzbl %r12b, %r12d
movzbl %r13b, %r13d
movzbl %cl, %r8d
movl %edx, %esi
movl %r12d, %edx
movl %r13d, %ecx
xorl %r9d, %r9d
callq 0x1ca08
testl %r15d, %r15d
je 0x1c782
movq 0x20(%rbx), %rdi
movl 0x14(%rsp), %eax
movl %eax, (%rsp)
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl $0xc, %r8d
xorl %r9d, %r9d
callq 0x1ca08
jmp 0x1c782
movq 0x18(%rsp), %rcx
incq %rcx
cmpq $0x3, %rcx
jne 0x1c764
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq