// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_check_ar_type
void elf32_check_ar_type(struct FFFuncs *ff,const char *name,
                         struct Elf32_Ehdr *ehdr,unsigned char class,
                         unsigned char endian,uint32_t ver,int nmach,...)
/* check all library archive members before conversion */
{
  bool be = (endian == ELFDATA2MSB);
  uint16_t m = read16(be,ehdr->e_machine);
  va_list vl;

  va_start(vl,nmach);
  if (!strncmp(ehdr->e_ident,ELFid,4)) {
    /* ELF identification found */
    if (ehdr->e_ident[EI_CLASS]==class && ehdr->e_ident[EI_DATA]==endian &&
        ehdr->e_ident[EI_VERSION]==(unsigned char)ver &&
        read32(be,ehdr->e_version)==ver && nmach>0) {
      while (nmach--) {
        if (va_arg(vl,int) == m)
          m = 0;
      }
      if (m == 0) {
        switch (read16(be,ehdr->e_type)) {
          case ET_REL:
            goto check_ar_exit;
          case ET_EXEC:  /* no executables in library archives */
            error(40,name,ff->tname);
            break;
          case ET_DYN:  /* no shared objects in library archives */
            error(39,name,ff->tname);
            break;
          default:  /* illegal fmt. / file corrupted */
            break;
        }
      }
    }
  }
  error(41,name,ff->tname);

check_ar_exit:
  va_end(vl);
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
testb %al, %al
je 0x1f3f2
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movb %r8b, %al
movl 0x120(%rsp), %r8d
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq %rdx, 0x100(%rsp)
movb %cl, 0xff(%rsp)
movb %al, 0xfe(%rsp)
movl %r9d, 0xf8(%rsp)
movzbl 0xfe(%rsp), %eax
cmpl $0x2, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0xf4(%rsp)
movl 0xf4(%rsp), %edi
movq 0x100(%rsp), %rsi
addq $0x12, %rsi
callq 0x8010
movw %ax, 0xf2(%rsp)
leaq 0xd0(%rsp), %rax
leaq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x128(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x30, (%rax)
movq 0x100(%rsp), %rdi
leaq 0x20ea2(%rip), %rsi     # 0x40340
movl $0x4, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x1f662
movq 0x100(%rsp), %rax
movzbl 0x4(%rax), %eax
movzbl 0xff(%rsp), %ecx
cmpl %ecx, %eax
jne 0x1f660
movq 0x100(%rsp), %rax
movzbl 0x5(%rax), %eax
movzbl 0xfe(%rsp), %ecx
cmpl %ecx, %eax
jne 0x1f660
movq 0x100(%rsp), %rax
movzbl 0x6(%rax), %eax
movl 0xf8(%rsp), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x1f660
movl 0xf4(%rsp), %edi
movq 0x100(%rsp), %rsi
addq $0x14, %rsi
callq 0x8060
cmpl 0xf8(%rsp), %eax
jne 0x1f660
cmpl $0x0, 0x120(%rsp)
jle 0x1f660
jmp 0x1f53c
movl 0x120(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x120(%rsp)
cmpl $0x0, %eax
je 0x1f5c8
leaq 0xd0(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0xd0(%rsp), %eax
movl %eax, 0x1c(%rsp)
cmpl $0x28, %eax
ja 0x1f58d
movq 0x10(%rsp), %rcx
movl 0x1c(%rsp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, 0x8(%rsp)
jmp 0x1f5a6
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl (%rax), %eax
movzwl 0xf2(%rsp), %ecx
cmpl %ecx, %eax
jne 0x1f5c3
movw $0x0, 0xf2(%rsp)
jmp 0x1f53c
movzwl 0xf2(%rsp), %eax
cmpl $0x0, %eax
jne 0x1f65e
movl 0xf4(%rsp), %edi
movq 0x100(%rsp), %rsi
addq $0x10, %rsi
callq 0x8010
movzwl %ax, %ecx
movl %ecx, 0x4(%rsp)
subw $0x1, %ax
je 0x1f616
jmp 0x1f600
movl 0x4(%rsp), %eax
subl $0x2, %eax
je 0x1f618
jmp 0x1f60b
movl 0x4(%rsp), %eax
subl $0x3, %eax
je 0x1f639
jmp 0x1f65a
jmp 0x1f681
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rax
movq (%rax), %rdx
movl $0x28, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x1f65c
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rax
movq (%rax), %rdx
movl $0x27, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x1f65c
jmp 0x1f65c
jmp 0x1f65e
jmp 0x1f660
jmp 0x1f662
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rax
movq (%rax), %rdx
movl $0x29, %edi
movb $0x0, %al
callq 0x8c00
addq $0x118, %rsp            # imm = 0x118
retq
nopl (%rax)