// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/ar.c
// Function: ar_extract
bool ar_extract(struct ar_info *ai)
/* fill ar_info structure with informations about the next */
/* archive member */
{
  struct ar_hdr *ah;
  uint8_t *p;
  bool cont;
  unsigned long size;

  do {
    cont = FALSE;
    if (ai->next==NULL || ai->arlen<sizeof(struct ar_hdr))
      return FALSE;  /* archive ends here */

    ah = ai->next;
    p = ((uint8_t *)ah) + sizeof(struct ar_hdr);
    ai->arlen -= sizeof(struct ar_hdr);
    ai->name[0] = 0;
    sscanf(ah->ar_size,"%lu",&ai->size);  /* file size */

    if (!strncmp(ah->ar_name,"/ ",2) ||             /* GNU symbol table */
        !strncmp(ah->ar_name,"__.SYMDEF ",10))      /* BSD symbol table */
      cont = TRUE;

    if (!strncmp(ah->ar_name,"ARFILENAMES/",12) ||  /* GNU long names 1 */
        !strncmp(ah->ar_name,"// ",3)) {            /* GNU long names 2 */
      ai->long_names = p;
      cont = TRUE;
    }

    if (ai->long_names &&                           /* long name (GNU) */
        (ah->ar_name[0]=='/' || ah->ar_name[0]==' ') &&
        (ah->ar_name[1]>='0' && ah->ar_name[1]<='9')) {
      int i,offset;
      char c,*s,*d=ai->name;

      sscanf(&ah->ar_name[1],"%d",&offset);  /* name offset */
      s = ai->long_names + offset;
      for (i=0; i<MAXARNAME; i++) {
        c = *s++;
        if (c==0 || c=='/' || c=='\n')
          break;
        *d++ = c;
      }
      *d = 0;
    }
    else if (!strncmp(ah->ar_name,"#1/",3)) {  /* ext. name fmt. #1 (BSD) */
      int d,len;

      sscanf(&ah->ar_name[3],"%d",&d);  /* ext.fmt. name length */
      if (d > ai->arlen)
        error(37,ai->arname,ai->name);  /* Malformatted archive member */
      len = (d>MAXARNAME) ? MAXARNAME : d;
      memcpy(ai->name,p,len);
      ai->name[len] = 0;
      p += d;  /* set real beginning of file and size */
      ai->size -= d;
      ai->arlen -= d;
    }
    else {  /* normal file name < 16 chars */
      char *n = &ah->ar_name[16];
      int len;

      for (len=16; len>0; len--)
        if (*(--n) != ' ')
          break;
      if (len && *n=='/')  /* GNU */
        --len;
      memcpy(ai->name,ah->ar_name,len);
      ai->name[len] = 0;
    }

    if (strncmp(ah->ar_fmag,ARFMAG,2))
      error(42,ai->arname,ai->name);  /* consistency check failed */
    ai->header = ah;
    ai->data = p;
    size = ((unsigned long)(p + ai->size) & 1) ? (ai->size+1) : ai->size;
    ai->next = (struct ar_hdr *)(p + size);
    if ((long)(ai->arlen -= size) < 0)
      error(37,ai->arname,ai->name);  /* Malformatted archive member */
  }
  while (cont);
  return TRUE;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x68(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x13e29
movq 0x68(%rsp), %rax
cmpq $0x3c, 0x10(%rax)
jae 0x13e36
movl $0x0, 0x74(%rsp)
jmp 0x142bd
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x3c, %rax
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
subq $0x3c, %rcx
movq %rcx, 0x10(%rax)
movq 0x68(%rsp), %rax
movb $0x0, 0x20(%rax)
movq 0x60(%rsp), %rdi
addq $0x30, %rdi
movq 0x68(%rsp), %rdx
addq $0x130, %rdx            # imm = 0x130
leaq 0x21bdc(%rip), %rsi     # 0x35a64
movb $0x0, %al
callq 0x51c0
movq 0x60(%rsp), %rdi
leaq 0x21be6(%rip), %rsi     # 0x35a81
movl $0x2, %edx
callq 0x5050
cmpl $0x0, %eax
je 0x13ec5
movq 0x60(%rsp), %rdi
leaq 0x21bb2(%rip), %rsi     # 0x35a68
movl $0xa, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x13ecd
movl $0x1, 0x54(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x21b9a(%rip), %rsi     # 0x35a73
movl $0xc, %edx
callq 0x5050
cmpl $0x0, %eax
je 0x13f03
movq 0x60(%rsp), %rdi
leaq 0x21b8c(%rip), %rsi     # 0x35a80
movl $0x3, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x13f19
movq 0x58(%rsp), %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x18(%rax)
movl $0x1, 0x54(%rsp)
movq 0x68(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x14025
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x13f47
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x14025
movq 0x60(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x30, %eax
jl 0x14025
movq 0x60(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x39, %eax
jg 0x14025
movq 0x68(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rdi
addq $0x1, %rdi
leaq 0x2241d(%rip), %rsi     # 0x363a6
leaq 0x40(%rsp), %rdx
movb $0x0, %al
callq 0x51c0
movq 0x68(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x40(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x44(%rsp)
cmpl $0xff, 0x44(%rsp)
jge 0x14018
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rsp)
movb (%rax), %al
movb %al, 0x3f(%rsp)
movsbl 0x3f(%rsp), %eax
cmpl $0x0, %eax
je 0x13ff2
movsbl 0x3f(%rsp), %eax
cmpl $0x2f, %eax
je 0x13ff2
movsbl 0x3f(%rsp), %eax
cmpl $0xa, %eax
jne 0x13ff4
jmp 0x14018
movb 0x3f(%rsp), %cl
movq 0x28(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x28(%rsp)
movb %cl, (%rax)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x13fb3
movq 0x28(%rsp), %rax
movb $0x0, (%rax)
jmp 0x141b2
movq 0x60(%rsp), %rdi
leaq 0x21a53(%rip), %rsi     # 0x35a84
movl $0x3, %edx
callq 0x5050
cmpl $0x0, %eax
jne 0x14122
movq 0x60(%rsp), %rdi
addq $0x3, %rdi
leaq 0x22352(%rip), %rsi     # 0x363a6
leaq 0x24(%rsp), %rdx
movb $0x0, %al
callq 0x51c0
movslq 0x24(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x1408d
movq 0x68(%rsp), %rax
movq (%rax), %rsi
movq 0x68(%rsp), %rdx
addq $0x20, %rdx
movl $0x25, %edi
movb $0x0, %al
callq 0x8c00
cmpl $0xff, 0x24(%rsp)
jle 0x140a2
movl $0xff, %eax
movl %eax, 0x10(%rsp)
jmp 0x140aa
movl 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
addq $0x20, %rdi
movq 0x58(%rsp), %rsi
movslq 0x20(%rsp), %rdx
callq 0x5170
movq 0x68(%rsp), %rax
movslq 0x20(%rsp), %rcx
movb $0x0, 0x20(%rax,%rcx)
movl 0x24(%rsp), %ecx
movq 0x58(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movslq 0x24(%rsp), %rdx
movq 0x68(%rsp), %rax
movq 0x130(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x130(%rax)
movslq 0x24(%rsp), %rdx
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
jmp 0x141b0
movq 0x60(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x18(%rsp)
movl $0x10, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jle 0x1416a
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rsp)
movsbl -0x1(%rax), %eax
cmpl $0x20, %eax
je 0x1415b
jmp 0x1416a
jmp 0x1415d
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x14138
cmpl $0x0, 0x14(%rsp)
je 0x14189
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x14189
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x68(%rsp), %rdi
addq $0x20, %rdi
movq 0x60(%rsp), %rsi
movslq 0x14(%rsp), %rdx
callq 0x5170
movq 0x68(%rsp), %rax
movslq 0x14(%rsp), %rcx
movb $0x0, 0x20(%rax,%rcx)
jmp 0x141b2
movq 0x60(%rsp), %rdi
addq $0x3a, %rdi
leaq 0x218c6(%rip), %rsi     # 0x35a88
movl $0x2, %edx
callq 0x5050
cmpl $0x0, %eax
je 0x141ee
movq 0x68(%rsp), %rax
movq (%rax), %rsi
movq 0x68(%rsp), %rdx
addq $0x20, %rdx
movl $0x2a, %edi
movb $0x0, %al
callq 0x8c00
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x120(%rax)
movq 0x58(%rsp), %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x128(%rax)
movq 0x58(%rsp), %rax
movq 0x68(%rsp), %rcx
addq 0x130(%rcx), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x14242
movq 0x68(%rsp), %rax
movq 0x130(%rax), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x14253
movq 0x68(%rsp), %rax
movq 0x130(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rcx
addq 0x48(%rsp), %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x10(%rcx), %rax
subq %rdx, %rax
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jge 0x142a8
movq 0x68(%rsp), %rax
movq (%rax), %rsi
movq 0x68(%rsp), %rdx
addq $0x20, %rdx
movl $0x25, %edi
movb $0x0, %al
callq 0x8c00
jmp 0x142aa
cmpl $0x0, 0x54(%rsp)
jne 0x13e09
movl $0x1, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)