// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]vlink/t_aout.c
// Function: aoutstd_read
void aoutstd_read(struct GlobalVars *gv,struct LinkFile *lf,
                  struct aout_hdr *hdr)
/* read an a.out file with standard relocations */
{
  /*int so = (GETFLAGS(hdr)&EX_DPMASK) == (EX_DYNAMIC|EX_PIC);*/
  int be;
  struct ObjectUnit *u;

  /* determine endianess */
  if (fff[lf->format]->endianess < 0) {
    if (gv->endianess < 0) {
      /* unknown endianess, default to BE */
      be = gv->endianess = host_endianess();
      error(128,lf->pathname,endian_name[be]);
    }
    else
      be = gv->endianess;
  }
  else
    be = fff[lf->format]->endianess;

  if (lf->type == ID_LIBARCH)  /* check ar-member for correct format */
    aout_check_ar_type(fff[lf->format],lf->pathname,hdr);

  u = create_objunit(gv,lf,lf->objname);

  aout_make_sections(u,hdr,be);   /* create up to 3 sections */
  aout_symbols(gv,u,hdr,be);      /* read all symbols */

  aoutstd_relocs(gv,u,hdr,be,(struct relocation_info *)    /* .text relocs */
                 (((uint8_t *)hdr)+aout_treloffset(hdr,be)),
                 read32(be,&hdr->a_trsize),
                 find_sect_type(u,ST_CODE,SP_READ|SP_EXEC),0);
  aoutstd_relocs(gv,u,hdr,be,(struct relocation_info *)    /* .data relocs */
                 (((uint8_t *)hdr)+aout_dreloffset(hdr,be)),
                 read32(be,&hdr->a_drsize),
                 find_sect_type(u,ST_DATA,SP_READ|SP_WRITE),
                 read32(be,hdr->a_text));

  /* add new object unit to the appropriate list */
  add_objunit(gv,u,FALSE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, 0x38(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
movzbl 0x38(%rsi), %eax
leaq 0x14fc5(%rip), %r14     # 0x2f190
movq (%r14,%rax,8), %rax
movb 0xaa(%rax), %bpl
testb %bpl, %bpl
jns 0x1a214
movb 0x202(%r15), %bpl
testb %bpl, %bpl
jns 0x1a214
callq 0x65e9
movl %eax, %ebp
movb %al, 0x202(%r15)
movq 0x10(%rbx), %rsi
movsbq %al, %rax
leaq 0x14f6c(%rip), %rcx     # 0x2f170
movq (%rcx,%rax,8), %rdx
movl $0x80, %edi
xorl %eax, %eax
callq 0x6c19
movq %r15, 0x40(%rsp)
cmpb $0x8, 0x39(%rbx)
jne 0x1a2b1
movzbl 0x38(%rbx), %eax
movq (%r14,%rax,8), %r15
movq 0x10(%rbx), %r14
movq 0x38(%rsp), %r13
movq %r13, %rdi
callq 0x6607
shrl $0x10, %eax
andl $0x3ff, %eax            # imm = 0x3FF
cmpl 0xa4(%r15), %eax
je 0x1a25c
movq %r13, %rdi
callq 0x6607
testl $0x3ff0000, %eax        # imm = 0x3FF0000
jne 0x1a29d
movq %r13, %rdi
callq 0x6607
cmpw $0xcc, %ax
je 0x1abe9
movzwl %ax, %eax
cmpl $0x107, %eax            # imm = 0x107
je 0x1a2b1
cmpl $0x10b, %eax            # imm = 0x10B
movq 0x38(%rsp), %rdi
je 0x1a28b
cmpl $0x108, %eax            # imm = 0x108
jne 0x1a29d
callq 0x6607
btl $0x1a, %eax
movq (%r15), %rdx
jb 0x1a2a4
pushq $0x28
jmp 0x1a2a6
movq (%r15), %rdx
pushq $0x29
jmp 0x1a2a6
pushq $0x27
popq %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6c19
movsbl %bpl, %r12d
movq 0x20(%rbx), %rdx
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0xb87e
movq %rax, %r15
movq 0x38(%rsp), %r13
leaq 0x4(%r13), %rsi
movl %r12d, %edi
movq %rsi, 0x68(%rsp)
callq 0x664d
testl %eax, %eax
je 0x1a2fc
leaq 0x20(%r13), %rdx
movl %eax, %ecx
leaq 0x62b0(%rip), %rsi      # 0x205a0
pushq $0x1
popq %r8
movq %r15, %rdi
callq 0x1be8c
leaq 0x8(%r13), %rbp
movl %r12d, %edi
movq %rbp, %rsi
callq 0x664d
testl %eax, %eax
je 0x1a336
movl %eax, %ebx
movq %r13, %rdi
movl %r12d, %esi
callq 0x1bf1a
movl %eax, %edx
addq %r13, %rdx
movl %ebx, %ecx
leaq 0x627c(%rip), %rsi      # 0x205a6
pushq $0x2
popq %r8
movq %r15, %rdi
callq 0x1be8c
leaq 0xc(%r13), %rsi
movl %r12d, %edi
callq 0x664d
testl %eax, %eax
je 0x1a36d
movl %eax, %ebx
movq %r13, %rdi
movl %r12d, %esi
callq 0x1bf48
movl %eax, %edx
addq %r13, %rdx
movl %ebx, %ecx
leaq 0x624b(%rip), %rsi      # 0x205ac
pushq $0x3
popq %r8
movq %r15, %rdi
callq 0x1be8c
movq %r15, 0x28(%rsp)
movq 0x10(%r15), %r14
movq %r13, %rdi
movl %r12d, %esi
callq 0x1be67
movl %eax, %ebx
addq %r13, %rbx
leaq 0x10(%r13), %rsi
movl %r12d, %edi
callq 0x664d
movl %eax, %r15d
movq %r13, %rdi
callq 0x6607
movl $0x0, 0x1c(%rsp)
cmpw $0x10b, %ax             # imm = 0x10B
sete %r13b
movl %r12d, %edi
movq 0x68(%rsp), %rsi
callq 0x664d
movl %eax, 0x34(%rsp)
movl %r12d, %edi
movq %rbp, %rsi
callq 0x664d
movl %eax, 0x20(%rsp)
movq 0x28(%r14), %rax
cmpq %rax, %rbx
jb 0x1a3e5
movl %r15d, %ecx
addq %rbx, %rcx
addq 0x30(%r14), %rax
cmpq %rax, %rcx
jbe 0x1a3fe
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rcx
leaq 0x5310(%rip), %rdx      # 0x1f704
pushq $0x55
popq %rdi
xorl %eax, %eax
callq 0x6c19
pushq $0xc
popq %rcx
movl %r15d, %eax
xorl %edx, %edx
divl %ecx
movl %eax, 0x64(%rsp)
testl %edx, %edx
je 0x1a42d
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rcx
leaq 0x52e5(%rip), %rdx      # 0x1f704
pushq $0x56
popq %rdi
pushq $0xc
popq %r8
xorl %eax, %eax
callq 0x6c19
movl 0x1c(%rsp), %eax
movb %r13b, %al
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
callq 0x1be42
movq %r14, %r13
movl %eax, %r14d
addq %r15, %r14
cmpq 0x28(%r13), %r14
jb 0x1a474
movl %r12d, %edi
movq %r14, %rsi
callq 0x664d
movl %eax, %eax
addq %r14, %rax
movq 0x28(%r13), %rcx
addq 0x30(%r13), %rcx
cmpq %rcx, %rax
jbe 0x1a48d
movq 0x10(%r13), %rsi
movq 0x20(%r13), %rcx
leaq 0x705b(%rip), %rdx      # 0x214de
pushq $0x55
popq %rdi
xorl %eax, %eax
callq 0x6c19
movq %r13, 0x50(%rsp)
shll $0x5, 0x1c(%rsp)
movl 0x20(%rsp), %eax
addl 0x34(%rsp), %eax
movl %eax, 0x20(%rsp)
xorl %ebp, %ebp
movq 0x38(%rsp), %r14
movl %r12d, 0x24(%rsp)
cmpl 0x64(%rsp), %ebp
jge 0x1ab17
leaq 0x8(%rbx), %rsi
movl %r12d, %edi
callq 0x664d
movq %rax, 0x8(%rsp)
movl %r12d, %edi
movq %rbx, %rsi
callq 0x664d
movq 0x50(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
movl %eax, %ecx
callq 0x1bf6d
movq %rax, %r9
movzbl 0x5(%rbx), %eax
movl %eax, %edx
andl $0xf, %edx
movl %edx, %ecx
shll $0x3, %ecx
movl $0x2020100, %r13d       # imm = 0x2020100
shrl %cl, %r13d
cmpb $0x4, %dl
movl $0x0, %ecx
cmovael %ecx, %r13d
movb 0x4(%rbx), %cl
movl %ecx, %r15d
andb $0x1, %r15b
incb %r15b
shrl $0x4, %eax
cmpl $0x2, %eax
jb 0x1a576
jne 0x1a529
movb $0x3, %r15b
jmp 0x1a576
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rsi
movq 0x20(%rcx), %r8
pushq $0x58
popq %rdi
movq %r9, %rdx
movl %eax, %ecx
xorl %eax, %eax
movb %r15b, 0x48(%rsp)
movl %r13d, %r15d
movq %rbx, %r13
movq %rbp, %rbx
movl %r12d, %ebp
movq %r14, %r12
movq %r9, %r14
callq 0x6c19
movq %r14, %r9
movq %r12, %r14
movl %ebp, %r12d
movq %rbx, %rbp
movq %r13, %rbx
movl %r15d, %r13d
movb 0x48(%rsp), %r15b
movb 0x4(%rbx), %cl
movzbl %cl, %ecx
cmpb $0x20, %cl
jae 0x1a5a3
cmpl $0x1f, %ecx
ja 0x1a8cb
movl %ecx, %eax
leaq 0x7f00(%rip), %rdx      # 0x22490
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %r9, 0x10(%rsp)
jmp 0x1a8f5
movq 0x40(%rsp), %rax
cmpb $0x0, 0x6c(%rax)
jne 0x1aa9b
andl $0x1e, %ecx
cmpl $0x8, %ecx
movq %rbp, 0x58(%rsp)
movq %r9, 0x10(%rsp)
je 0x1a6da
cmpl $0x6, %ecx
je 0x1a68f
cmpl $0x4, %ecx
jne 0x1a726
movq 0x28(%rsp), %r15
movq %r15, %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
pushq $0x5
popq %rdx
callq 0xb758
testq %rax, %rax
jne 0x1a61b
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x5f9e(%rip), %rsi      # 0x205a0
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movl %ebp, %r9d
pushq $0x0
pushq $0x2
pushq $0x5
callq 0xbab3
addq $0x20, %rsp
movq %rax, %r14
movl 0x1c(%rsp), %eax
jmp 0x1a721
movq %r9, 0x10(%rsp)
movq %rbp, 0x58(%rsp)
jmp 0x1a78d
movq %r9, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0xbbcd
movq %rax, 0x48(%rsp)
leaq 0xc(%rbx), %rsi
movl %r12d, %edi
callq 0x664d
movq 0x50(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
movl %eax, %ecx
callq 0x1bf6d
movq 0x48(%rsp), %rsi
movq %rax, %rcx
xorl %r8d, %r8d
movb $0x4, %dil
jmp 0x1a986
movq %r9, 0x10(%rsp)
jmp 0x1a914
movq %r9, 0x10(%rsp)
jmp 0x1a817
movq 0x28(%rsp), %r15
movq %r15, %rdi
pushq $0x2
popq %rbp
movl %ebp, %esi
pushq $0x3
popq %rdx
callq 0xb758
testq %rax, %rax
jne 0x1a6d1
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x5eef(%rip), %rsi      # 0x205a6
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
pushq $0x1
popq %r9
pushq $0x0
pushq $0x2
pushq $0x3
callq 0xbab3
addq $0x20, %rsp
movq %rax, %r14
movl 0x34(%rsp), %eax
jmp 0x1a721
movq 0x28(%rsp), %r15
movq %r15, %rdi
pushq $0x3
popq %rbp
movl %ebp, %esi
movl %ebp, %edx
callq 0xb758
testq %rax, %rax
jne 0x1a71a
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x5eab(%rip), %rsi      # 0x205ac
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movl %ebp, %r9d
pushq $0x0
pushq $0x2
pushq $0x3
callq 0xbab3
addq $0x20, %rsp
movq %rax, %r14
movl 0x20(%rsp), %eax
movl %eax, %r15d
jmp 0x1a72c
xorl %r15d, %r15d
xorl %r14d, %r14d
movzbl 0x4(%rbx), %ebp
movsbl 0x5(%rbx), %r13d
leaq 0x6(%rbx), %rsi
movl 0x24(%rsp), %r12d
movl %r12d, %edi
callq 0x663d
movq 0x8(%rsp), %r10
subl %r15d, %r10d
subq $0x8, %rsp
movswl %ax, %r9d
movq 0x30(%rsp), %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
movl %ebp, %ecx
movl %r13d, %r8d
pushq %r10
callq 0xad71
popq %rax
popq %rcx
movq 0x38(%rsp), %r14
movq 0x58(%rsp), %rbp
jmp 0x1aa9b
movq %r9, 0x10(%rsp)
movq %rbp, 0x58(%rsp)
movb $0x3, %r15b
movq 0x28(%rsp), %r12
movq %r12, %rdi
pushq $0x3
popq %rbp
movl %ebp, %esi
movl %ebp, %edx
callq 0xb758
testq %rax, %rax
je 0x1a7c0
movq %rax, %rsi
movb $0x2, %dil
xorl %r11d, %r11d
movl 0x20(%rsp), %r8d
xorl %ecx, %ecx
movq 0x58(%rsp), %rbp
jmp 0x1a93c
subq $0x20, %rsp
andl $0x0, 0x10(%rsp)
movl $0x2, 0x8(%rsp)
movl $0x3, (%rsp)
movq %r12, %rdi
leaq 0x5dca(%rip), %rsi      # 0x205ac
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0xbab3
xorl %ecx, %ecx
addq $0x20, %rsp
movq %rax, %rsi
movb $0x2, %dil
movl 0x20(%rsp), %r8d
xorl %r11d, %r11d
movq 0x58(%rsp), %rbp
jmp 0x1a989
movq %r9, 0x10(%rsp)
movb $0x3, %r15b
movq 0x28(%rsp), %r12
movq %r12, %rdi
pushq $0x2
popq %rsi
pushq $0x3
popq %rdx
callq 0xb758
testq %rax, %rax
je 0x1a842
movq %rax, %rsi
movb $0x2, %dil
xorl %r11d, %r11d
movl 0x34(%rsp), %r8d
jmp 0x1a93a
subq $0x20, %rsp
andl $0x0, 0x10(%rsp)
movl $0x2, 0x8(%rsp)
movl $0x3, (%rsp)
movq %r12, %rdi
leaq 0x5d42(%rip), %rsi      # 0x205a6
xorl %edx, %edx
xorl %ecx, %ecx
pushq $0x2
popq %r8
pushq $0x1
popq %r9
callq 0xbab3
xorl %ecx, %ecx
addq $0x20, %rsp
movq %rax, %rsi
movb $0x2, %dil
movl 0x34(%rsp), %r8d
jmp 0x1a986
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rcx
pushq $0x60
popq %rdi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x6c19
jmp 0x1aa9b
movq %r9, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0xbbcd
movq %rax, %rsi
xorl %ecx, %ecx
movb $0x4, %r13b
movb $0x1, %dil
movb $0x1, %r15b
jmp 0x1a907
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdx
andl $0x1e, %ecx
leaq 0x7dfd(%rip), %rdi      # 0x226db
movq %r9, %rsi
xorl %eax, %eax
callq 0x6b2c
jmp 0x1aa9b
movq %r9, 0x10(%rsp)
movb $0x3, %r15b
movq 0x28(%rsp), %rdi
callq 0xbbcd
movq %rax, %rsi
xorl %ecx, %ecx
movb $0x1, %dil
xorl %r8d, %r8d
jmp 0x1a986
movq %r9, 0x10(%rsp)
movb $0x3, %r15b
movq 0x28(%rsp), %r12
movq %r12, %rdi
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
callq 0xb758
testq %rax, %rax
je 0x1a943
movq %rax, %rsi
movb $0x2, %dil
xorl %r11d, %r11d
movl 0x1c(%rsp), %r8d
xorl %ecx, %ecx
movq 0x8(%rsp), %rdx
jmp 0x1a997
subq $0x20, %rsp
andl $0x0, 0x10(%rsp)
movl $0x2, 0x8(%rsp)
movl $0x5, (%rsp)
movq %r12, %rdi
leaq 0x5c3b(%rip), %rsi      # 0x205a0
xorl %edx, %edx
xorl %ecx, %ecx
pushq $0x1
popq %r8
movl %r8d, %r9d
callq 0xbab3
xorl %ecx, %ecx
addq $0x20, %rsp
movq %rax, %rsi
movb $0x2, %dil
movl 0x1c(%rsp), %r8d
xorl %r11d, %r11d
movq 0x8(%rsp), %rdx
testq %rsi, %rsi
je 0x1aa96
leal 0x1(%rbp), %r12d
cmpl 0x64(%rsp), %r12d
jge 0x1aa39
movb 0x10(%rbx), %al
andb $0x1e, %al
cmpb $0xc, %al
jne 0x1aa39
movl %r8d, 0x60(%rsp)
movq %r11, 0x80(%rsp)
movb %dil, 0x7(%rsp)
movq %rcx, 0x70(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x8(%rsp)
leaq 0xc(%rbx), %rsi
movl 0x24(%rsp), %r14d
movl %r14d, %edi
movq %rsi, 0x78(%rsp)
callq 0x664d
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl %r14d, %edx
movl %eax, %ecx
callq 0x1bf6d
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x5160
testl %eax, %eax
je 0x1aaa6
movl %ebp, %r12d
movq 0x8(%rsp), %rdx
movq 0x48(%rsp), %rsi
movq 0x70(%rsp), %rcx
movb 0x7(%rsp), %dil
movq 0x80(%rsp), %r11
movl 0x60(%rsp), %r8d
jmp 0x1aa3c
movl %ebp, %r12d
subl %r8d, %edx
movslq %edx, %r8
movzbl %r13b, %eax
movzbl %dil, %r9d
subq $0x8, %rsp
cmpb $0x1, %r15b
jne 0x1aa6e
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rdx
pushq %r11
pushq %rax
pushq $0x0
callq 0xa7c3
addq $0x20, %rsp
jmp 0x1aa8e
movzbl %r15b, %r10d
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rdx
pushq $0x1
pushq %r11
pushq %r10
pushq %rax
pushq $0x0
callq 0xa5d5
addq $0x30, %rsp
movl %r12d, %ebp
movq 0x38(%rsp), %r14
movl 0x24(%rsp), %r12d
incl %ebp
addq $0xc, %rbx
jmp 0x1a4af
addq $0x14, %rbx
movl 0x24(%rsp), %edi
movq %rbx, %rsi
callq 0x664d
movl %eax, %r11d
movq 0x8(%rsp), %rdx
movq 0x48(%rsp), %rsi
movq 0x70(%rsp), %rcx
movb 0x7(%rsp), %dil
movl 0x60(%rsp), %r8d
movq 0x78(%rsp), %rbx
jmp 0x1aa3c
movb $0x3, %r15b
movq 0x8(%rsp), %rax
testl %eax, %eax
je 0x1aa9b
movq %r9, 0x10(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %r12
callq 0xbb2a
movq %rax, %rsi
xorl %ecx, %ecx
movb $0x3, %dil
xorl %r8d, %r8d
movl %r12d, %r11d
pushq $0x2
popq %rax
movl %eax, %edx
jmp 0x1a98e
movq %r14, %rdi
movl %r12d, %esi
callq 0x1bf48
movl %eax, %ebx
addq %r14, %rbx
leaq 0x18(%r14), %rsi
movl %r12d, %edi
callq 0x664d
movq %r14, %r13
movl %eax, %r14d
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
movq 0x28(%rsp), %rbp
movq %rbp, %rdi
callq 0xb758
movq 0x40(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl %r12d, %ecx
movq %rbx, %r8
movl %r14d, %r9d
pushq $0x0
pushq %rax
callq 0x19ae4
popq %rax
popq %rcx
movq %r13, %rdi
movl %r12d, %esi
callq 0x1abfb
movl %eax, %ebx
addq %r13, %rbx
leaq 0x1c(%r13), %rsi
movl %r12d, %edi
callq 0x664d
movl %eax, 0x8(%rsp)
pushq $0x2
popq %rsi
pushq $0x3
popq %rdx
movq %rbp, %rdi
callq 0xb758
movq %rax, %r15
movl %r12d, %edi
movq 0x68(%rsp), %rsi
callq 0x664d
movq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl %r12d, %ecx
movq %rbx, %r8
movl 0x8(%rsp), %r9d
pushq %rax
pushq %r15
callq 0x19ae4
popq %rax
popq %rcx
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb95b
pushq $0x54
popq %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6c19
jmp 0x1a2b1