// File: /workspace/github_c_makefile_star2_O3/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, 0x30(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
movzbl 0x38(%rsi), %eax
leaq 0x137ec(%rip), %r14     # 0x2f180
movq (%r14,%rax,8), %rax
movb 0xaa(%rax), %bpl
testb %bpl, %bpl
jns 0x1b9df
movb 0x202(%r12), %bpl
testb %bpl, %bpl
jns 0x1b9df
callq 0x690b
movl %eax, %ebp
movb %al, 0x202(%r12)
movq 0x10(%rbx), %rsi
movsbq %al, %rax
leaq 0x13791(%rip), %rcx     # 0x2f160
movq (%rcx,%rax,8), %rdx
movl $0x80, %edi
xorl %eax, %eax
callq 0x6f14
cmpb $0x8, 0x39(%rbx)
jne 0x1ba8a
movzbl 0x38(%rbx), %eax
movq (%r14,%rax,8), %r15
movq 0x10(%rbx), %r14
movq 0x30(%rsp), %rdi
callq 0x6929
shrl $0x10, %eax
andl $0x3ff, %eax            # imm = 0x3FF
cmpl 0xa4(%r15), %eax
je 0x1ba2b
movq 0x30(%rsp), %rdi
callq 0x6929
testl $0x3ff0000, %eax        # imm = 0x3FF0000
je 0x1ba2b
movq (%r15), %rdx
movl $0x29, %edi
jmp 0x1ba80
movq 0x30(%rsp), %rdi
callq 0x6929
movzwl %ax, %eax
cmpl $0x107, %eax            # imm = 0x107
jg 0x1ba53
cmpl $0xcc, %eax
je 0x1c439
cmpl $0x107, %eax            # imm = 0x107
je 0x1ba8a
jmp 0x1ba21
cmpl $0x10b, %eax            # imm = 0x10B
je 0x1ba61
cmpl $0x108, %eax            # imm = 0x108
jne 0x1ba21
movq 0x30(%rsp), %rdi
callq 0x6929
btl $0x1a, %eax
movq (%r15), %rdx
jb 0x1ba7b
movl $0x28, %edi
jmp 0x1ba80
movl $0x27, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6f14
movsbl %bpl, %ebp
movq 0x20(%rbx), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xbeac
movq %rax, %r13
movq 0x30(%rsp), %r15
leaq 0x4(%r15), %rsi
movl %ebp, (%rsp)
movl %ebp, %edi
movq %rsi, 0x68(%rsp)
callq 0x696f
testl %eax, %eax
je 0x1bad7
leaq 0x20(%r15), %rdx
movl %eax, %ecx
leaq 0x6ac7(%rip), %rsi      # 0x22590
movq %r13, %rdi
movl $0x1, %r8d
callq 0x1d78e
leaq 0x8(%r15), %rsi
movl (%rsp), %r14d
movl %r14d, %edi
movq %rsi, 0x8(%rsp)
callq 0x696f
testl %eax, %eax
je 0x1bb30
movl %eax, %ebx
movq %r15, %rdi
callq 0x6929
movzwl %ax, %ebp
movl %r14d, %edi
movq 0x68(%rsp), %rsi
callq 0x696f
leal 0x20(%rax), %edx
cmpl $0x10b, %ebp            # imm = 0x10B
cmovel %eax, %edx
addq %r15, %rdx
movl %ebx, %ecx
leaq 0x6a74(%rip), %rsi      # 0x22596
movq %r13, %rdi
movl $0x2, %r8d
callq 0x1d78e
movq %r12, 0x50(%rsp)
leaq 0xc(%r15), %rsi
movl %r14d, %edi
callq 0x696f
testl %eax, %eax
je 0x1bb82
movl %eax, %ebx
movq %r15, %rdi
movl %r14d, %esi
callq 0x1d81e
movl %eax, %edx
addq %r15, %rdx
movl %ebx, %ecx
subq $0x8, %rsp
leaq 0x6a38(%rip), %rsi      # 0x2259c
movq %r13, %rdi
movl $0x3, %r8d
movl $0x3, %r9d
pushq $0x0
pushq $0x2
pushq $0x3
callq 0xc11b
addq $0x20, %rsp
movq %r13, 0x38(%rsp)
movq 0x10(%r13), %rbp
movq %r15, %rdi
movl %r14d, %esi
callq 0x1d74e
movl %eax, %r12d
addq %r15, %r12
movq %r15, %r13
addq $0x10, %r15
movl %r14d, %edi
movq %r15, %rsi
callq 0x696f
movl %eax, %ebx
movq %r13, %rdi
callq 0x6929
movzwl %ax, %eax
cmpl $0x10b, %eax            # imm = 0x10B
sete 0x60(%rsp)
movl %r14d, %edi
movq 0x68(%rsp), %rsi
callq 0x696f
movl %eax, 0x2c(%rsp)
movl %r14d, %edi
movq 0x8(%rsp), %rsi
callq 0x696f
movl %eax, 0x1c(%rsp)
movq 0x28(%rbp), %rax
movl %ebx, %r14d
cmpq %rax, %r12
jb 0x1bc00
leaq (%r12,%r14), %rcx
addq 0x30(%rbp), %rax
cmpq %rax, %rcx
jbe 0x1bc1b
movq 0x10(%rbp), %rsi
movq 0x20(%rbp), %rcx
leaq 0x5af5(%rip), %rdx      # 0x21704
movl $0x55, %edi
xorl %eax, %eax
callq 0x6f14
movq %r14, 0x8(%rsp)
imull $0xaaaaaaab, %ebx, %eax # imm = 0xAAAAAAAB
rorl $0x2, %eax
cmpl $0x15555556, %eax       # imm = 0x15555556
jb 0x1bc51
movq 0x10(%rbp), %rsi
movq 0x20(%rbp), %rcx
leaq 0x5ac5(%rip), %rdx      # 0x21704
movl $0xc, %r8d
movl $0x56, %edi
xorl %eax, %eax
callq 0x6f14
movq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbp, 0x48(%rsp)
movl (%rsp), %ebp
movl %ebp, %esi
callq 0x1d74e
movl %eax, %r13d
movl %ebp, %edi
movq 0x48(%rsp), %rbp
movq %r15, %rsi
movq %r14, %r15
callq 0x696f
movl %eax, %r14d
addl %r13d, %r14d
addq %r15, %r14
cmpq 0x28(%rbp), %r14
jb 0x1bca9
movl (%rsp), %edi
movq %r14, %rsi
callq 0x696f
movl %eax, %eax
addq %r14, %rax
movq 0x28(%rbp), %rcx
addq 0x30(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x1bcc4
movq 0x10(%rbp), %rsi
movq 0x20(%rbp), %rcx
leaq 0x7806(%rip), %rdx      # 0x234be
movl $0x55, %edi
xorl %eax, %eax
callq 0x6f14
cmpl $0xc, %ebx
movl (%rsp), %r14d
jae 0x1bdbf
movq %r15, %rdi
movl %r14d, %esi
callq 0x1d81e
movl %eax, %ebx
addq %r15, %rbx
leaq 0x18(%r15), %r12
movl %r14d, %edi
movq %r12, %rsi
callq 0x696f
movq %r15, %r13
movl %eax, %r15d
movq 0x38(%rsp), %rbp
movq %rbp, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xbd7f
movq 0x50(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl %r14d, %ecx
movq %rbx, %r8
movl %r15d, %r9d
pushq $0x0
pushq %rax
callq 0x1b20a
addq $0x10, %rsp
movq %r13, %rdi
movl %r14d, %esi
callq 0x1d81e
movl %eax, %ebx
movl %r14d, %edi
movq %r12, %rsi
callq 0x696f
addl %eax, %ebx
addq %r13, %rbx
leaq 0x1c(%r13), %rsi
movl %r14d, %edi
callq 0x696f
movl %eax, 0x8(%rsp)
movq %rbp, %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0xbd7f
movq %rax, %r15
movl %r14d, %edi
movq 0x68(%rsp), %rsi
callq 0x696f
movq 0x50(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl %r14d, %ecx
movq %rbx, %r8
movl 0x8(%rsp), %r9d
pushq %rax
pushq %r15
callq 0x1b20a
addq $0x10, %rsp
movq %r12, %rdi
movq %rbp, %rsi
xorl %edx, %edx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbf8e
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
imulq 0x8(%rsp), %rcx
xorl %eax, %eax
movb 0x60(%rsp), %dl
movb %dl, %al
shrq $0x23, %rcx
movq %rcx, 0x60(%rsp)
shll $0x5, %eax
movl %eax, 0x44(%rsp)
movl 0x1c(%rsp), %eax
addl 0x2c(%rsp), %eax
movl %eax, 0x1c(%rsp)
xorl %ebp, %ebp
leaq 0x8(%r12), %rsi
movl %r14d, %edi
callq 0x696f
movq %rax, 0x8(%rsp)
movl %r14d, %edi
movq %r12, %rsi
callq 0x696f
movq 0x48(%rsp), %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %eax, %ecx
callq 0x1d86a
movq %rax, %r9
movzbl 0x5(%r12), %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(%r12), %cl
movl %ecx, %ebx
andb $0x1, %bl
incb %bl
shrl $0x4, %eax
cmpl $0x2, %eax
jb 0x1beac
jne 0x1be61
movb $0x3, %bl
jmp 0x1beac
movq 0x48(%rsp), %rcx
movq 0x10(%rcx), %rsi
movq 0x20(%rcx), %r8
movl $0x58, %edi
movq %r9, %rdx
movl %eax, %ecx
xorl %eax, %eax
movq %r12, %r14
movl %ebx, %r12d
movq %rbp, %rbx
movl %r13d, %ebp
movq %r15, %r13
movq %r9, %r15
callq 0x6f14
movq %r15, %r9
movq %r13, %r15
movl %ebp, %r13d
movq %rbx, %rbp
movl %r12d, %ebx
movq %r14, %r12
movl (%rsp), %r14d
movb 0x4(%r12), %cl
movzbl %cl, %ecx
cmpb $0x20, %cl
jae 0x1bed9
cmpl $0x1f, %ecx
ja 0x1c1ee
movl %ecx, %eax
leaq 0x899a(%rip), %rdx      # 0x24860
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %r9, 0x10(%rsp)
jmp 0x1c217
movq 0x50(%rsp), %rax
cmpb $0x0, 0x6c(%rax)
jne 0x1c3b8
andl $0x1e, %ecx
cmpl $0x8, %ecx
movq 0x38(%rsp), %r14
movq %r9, 0x10(%rsp)
je 0x1c011
cmpl $0x6, %ecx
je 0x1bfc4
cmpl $0x4, %ecx
jne 0x1c063
movq %r14, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xbd7f
testq %rax, %rax
jne 0x1bf54
subq $0x8, %rsp
movq %r14, %rdi
leaq 0x665b(%rip), %rsi      # 0x22590
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
pushq $0x5
callq 0xc11b
addq $0x20, %rsp
movq %rax, %rbx
movl 0x44(%rsp), %eax
jmp 0x1c05c
movq %r9, 0x10(%rsp)
jmp 0x1c0cc
movq %r9, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0xc25f
movq %rax, 0x20(%rsp)
leaq 0xc(%r12), %rsi
movl %r14d, %edi
callq 0x696f
movq 0x48(%rsp), %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %eax, %ecx
callq 0x1d86a
movq 0x20(%rsp), %rsi
movq %rax, %rcx
xorl %r9d, %r9d
movb $0x4, %dil
jmp 0x1c2a1
movq %r9, 0x10(%rsp)
jmp 0x1c235
movq %r9, 0x10(%rsp)
jmp 0x1c140
movq %r14, %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0xbd7f
testq %rax, %rax
jne 0x1c008
subq $0x8, %rsp
movq %r14, %rdi
leaq 0x65ad(%rip), %rsi      # 0x22596
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
pushq $0x3
callq 0xc11b
addq $0x20, %rsp
movq %rax, %rbx
movl 0x2c(%rsp), %eax
jmp 0x1c05c
movq %r14, %rdi
movl $0x3, %esi
movl $0x3, %edx
callq 0xbd7f
testq %rax, %rax
jne 0x1c055
subq $0x8, %rsp
movq %r14, %rdi
leaq 0x6566(%rip), %rsi      # 0x2259c
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x3, %r8d
movl $0x3, %r9d
pushq $0x0
pushq $0x2
pushq $0x3
callq 0xc11b
addq $0x20, %rsp
movq %rax, %rbx
movl 0x1c(%rsp), %eax
movq %rax, 0x20(%rsp)
jmp 0x1c06e
movq $0x0, 0x20(%rsp)
xorl %ebx, %ebx
movzbl 0x4(%r12), %r15d
movsbl 0x5(%r12), %r13d
leaq 0x6(%r12), %rsi
movl (%rsp), %r14d
movl %r14d, %edi
callq 0x695f
movq 0x8(%rsp), %r10
subl 0x20(%rsp), %r10d
subq $0x8, %rsp
movswl %ax, %r9d
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %rdx
movl %r15d, %ecx
movl %r13d, %r8d
pushq %r10
callq 0xb2ca
addq $0x10, %rsp
movq 0x30(%rsp), %r15
jmp 0x1c3b8
movq %r9, 0x10(%rsp)
movb $0x3, %bl
movq 0x38(%rsp), %r14
movq %r14, %rdi
movl $0x3, %esi
movl $0x3, %edx
callq 0xbd7f
testq %rax, %rax
je 0x1c0fa
movq %rax, %rsi
movb $0x2, %dil
xorl %eax, %eax
movl 0x1c(%rsp), %r9d
jmp 0x1c25e
subq $0x8, %rsp
movq %r14, %rdi
leaq 0x6494(%rip), %rsi      # 0x2259c
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x3, %r8d
movl $0x3, %r9d
pushq $0x0
pushq $0x2
pushq $0x3
callq 0xc11b
xorl %ecx, %ecx
addq $0x20, %rsp
movq %rax, %rsi
movb $0x2, %dil
movl 0x1c(%rsp), %r9d
jmp 0x1c2a1
movq %r9, 0x10(%rsp)
movb $0x3, %bl
movq 0x38(%rsp), %r14
movq %r14, %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0xbd7f
testq %rax, %rax
je 0x1c16e
movq %rax, %rsi
movb $0x2, %dil
xorl %eax, %eax
movl 0x2c(%rsp), %r9d
jmp 0x1c25e
subq $0x8, %rsp
movq %r14, %rdi
leaq 0x641a(%rip), %rsi      # 0x22596
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
pushq $0x3
callq 0xc11b
xorl %ecx, %ecx
addq $0x20, %rsp
movq %rax, %rsi
movb $0x2, %dil
movl 0x2c(%rsp), %r9d
jmp 0x1c2a1
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x20(%rax), %rcx
movl $0x60, %edi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x6f14
jmp 0x1c3b8
movq %r9, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0xc25f
movq %rax, %rsi
xorl %ecx, %ecx
movb $0x4, %r13b
movb $0x1, %dil
movb $0x1, %bl
jmp 0x1c229
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rdx
andl $0x1e, %ecx
leaq 0x88aa(%rip), %rdi      # 0x24aab
movq %r9, %rsi
xorl %eax, %eax
callq 0x52b0
jmp 0x1c3b8
movq %r9, 0x10(%rsp)
movb $0x3, %bl
movq 0x38(%rsp), %rdi
callq 0xc25f
movq %rax, %rsi
xorl %ecx, %ecx
movb $0x1, %dil
xorl %r9d, %r9d
jmp 0x1c2a1
movq %r9, 0x10(%rsp)
movb $0x3, %bl
movq 0x38(%rsp), %r14
movq %r14, %rdi
movl $0x1, %esi
movl $0x5, %edx
callq 0xbd7f
testq %rax, %rax
je 0x1c267
movq %rax, %rsi
movb $0x2, %dil
xorl %eax, %eax
movl 0x44(%rsp), %r9d
xorl %ecx, %ecx
movq 0x8(%rsp), %rdx
jmp 0x1c2b1
subq $0x8, %rsp
movq %r14, %rdi
leaq 0x631b(%rip), %rsi      # 0x22590
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
pushq $0x2
pushq $0x5
callq 0xc11b
xorl %ecx, %ecx
addq $0x20, %rsp
movq %rax, %rsi
movb $0x2, %dil
movl 0x44(%rsp), %r9d
xorl %eax, %eax
movq 0x8(%rsp), %rdx
testq %rsi, %rsi
je 0x1c3b4
leal 0x1(%rbp), %r14d
cmpl 0x60(%rsp), %r14d
jge 0x1c359
movb 0x10(%r12), %r8b
andb $0x1e, %r8b
cmpb $0xc, %r8b
jne 0x1c359
movl %r9d, 0x5c(%rsp)
movq %rax, 0x80(%rsp)
movb %dil, 0x7(%rsp)
movq %rcx, 0x70(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x8(%rsp)
leaq 0xc(%r12), %rsi
movl (%rsp), %r15d
movl %r15d, %edi
movq %rsi, 0x78(%rsp)
callq 0x696f
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl %r15d, %edx
movl %eax, %ecx
callq 0x1d86a
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x5160
testl %eax, %eax
je 0x1c3cd
movl %ebp, %r14d
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rsi
movq 0x70(%rsp), %rcx
movb 0x7(%rsp), %dil
movq 0x80(%rsp), %rax
movl 0x5c(%rsp), %r9d
jmp 0x1c35c
movl %ebp, %r14d
subl %r9d, %edx
movslq %edx, %r8
movzbl %r13b, %r11d
movzbl %dil, %r9d
cmpb $0x1, %bl
movq 0x50(%rsp), %rdi
jne 0x1c38d
subq $0x8, %rsp
movq 0x18(%rsp), %rdx
pushq %rax
pushq %r11
pushq $0x0
callq 0xacd9
addq $0x20, %rsp
jmp 0x1c3ac
subq $0x8, %rsp
movzbl %bl, %r10d
movq 0x18(%rsp), %rdx
pushq $0x1
pushq %rax
pushq %r10
pushq %r11
pushq $0x0
callq 0xaad4
addq $0x30, %rsp
movl %r14d, %ebp
movq 0x30(%rsp), %r15
movl (%rsp), %r14d
incl %ebp
addq $0xc, %r12
cmpl 0x60(%rsp), %ebp
jl 0x1bdf0
jmp 0x1bcd1
addq $0x14, %r12
movl (%rsp), %edi
movq %r12, %rsi
callq 0x696f
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rsi
movq 0x70(%rsp), %rcx
movb 0x7(%rsp), %dil
movl 0x5c(%rsp), %r9d
movq 0x78(%rsp), %r12
jmp 0x1c35c
movb $0x3, %bl
movq 0x8(%rsp), %rax
testl %eax, %eax
je 0x1c3b8
movq %r9, 0x10(%rsp)
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, %r14
callq 0xc195
movq %rax, %rsi
xorl %ecx, %ecx
movb $0x3, %dil
xorl %r9d, %r9d
movl %r14d, %eax
movl $0x2, %edx
jmp 0x1c2a8
movl $0x54, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x6f14
jmp 0x1ba8a