user: 请将以下的汇编代码转换成C语言代码:

```asm
<ArchFindMember>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %rsi,%r13
  mov    %rdx,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    D62(%rip),%rax
  movslq (%rax),%rax
  add    $0xf,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L53:
  cmp    %rdx,%rsp
  je     L78
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L53
L78:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L99
  orq    $0x0,-0x8(%rsp,%rax,1)
L99:
  mov    %rsp,%r14
  mov    %rcx,%rsi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L104
  mov    %rax,%rcx
  mov    $0x1,%edx
  mov    D62(%rip),%rax
  mov    (%rax),%esi
  mov    %r14,%rdi
  call   <fread@plt>
  cmp    $0x1,%eax
  jne    L155
  mov    D62(%rip),%rax
  movslq (%rax),%rdx
  mov    D3(%rip),%rax
  mov    (%rax),%rsi
  mov    %r14,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L155
  mov    $0x2f,%esi
  mov    %r13,%rdi
  call   <strrchr@plt>
  lea    0x1(%rax),%rdx
  test   %rax,%rax
  cmovne %rdx,%r13
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %rax,%r15
  mov    $0x8,%r14d
  cmp    %r14,%rax
  cmovbe %rax,%r14
  jmp    L19
L155:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    $0x0,%r12d
L104:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L91
  mov    %r12,%rax
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L72:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    $0x0,%r12d
  jmp    L104
L67:
  mov    0x10(%rbx),%rax
  movb   $0x0,0x7(%rax)
  mov    0x10(%rbx),%rdi
  mov    $0xa,%edx
  mov    $0x0,%esi
  call   <strtol@plt>
  lea    0x1(%rax),%esi
  and    $0xfffffffe,%esi
  mov    D5(%rip),%rax
  mov    (%rax),%edx
  mov    %r12,%rdi
  call   <fseek@plt>
L19:
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x18,%esi
  mov    %rbx,%rdi
  call   <fread@plt>
  cmp    $0x1,%eax
  jne    L27
  mov    $0x8,%edx
  mov    D12(%rip),%rax
  mov    (%rax),%rsi
  mov    (%rbx),%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L72
  mov    0x8(%rbx),%rsi
  mov    %r14,%rdx
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L67
  cmp    $0x7,%r15
  ja     L83
  mov    0x8(%rbx),%rax
  cmpb   $0x20,(%rax,%r14,1)
  jne    L67
L83:
  mov    D5(%rip),%rax
  mov    (%rax),%edx
  mov    $0xffffffe8,%esi
  mov    %r12,%rdi
  call   <fseek@plt>
  jmp    L104
L27:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    $0x0,%r12d
  jmp    L104
L91:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
FILE *ArchFindMember(char *archive, char *member, struct ar_hdr *arhPtr, const char *mode) {
  FILE *arch;
  int size;
  char *cp;
  char magic[SARMAG];
  size_t len, tlen;
  arch = fopen(archive, mode);
  if (arch == NULL) {
    return NULL;
  }
  if ((fread(magic, SARMAG, 1, arch) != 1) || (strncmp(magic, ARMAG, SARMAG) != 0)) {
    fclose(arch);
    return NULL;
  }
  cp = strrchr(member, '/');
  if (cp != NULL) {
    member = cp + 1;
  }
  len = tlen = strlen(member);
  if (len > sizeof(arhPtr->ar_name)) {
    tlen = sizeof(arhPtr->ar_name);
  }
  while (fread((char *)arhPtr, sizeof(struct ar_hdr), 1, arch) == 1) {
    if (strncmp(arhPtr->ar_fmag, ARFMAG, sizeof(arhPtr->ar_fmag)) != 0) {
      fclose(arch);
      return NULL;
    } else if (strncmp(member, arhPtr->ar_name, tlen) == 0) {
      if (tlen != sizeof(arhPtr->ar_name) && arhPtr->ar_name[tlen] != ' ') {
        goto skip;
      } else {
        fseek(arch, -sizeof(struct ar_hdr), SEEK_CUR);
        return (arch);
      }
    } else {
    skip:
      arhPtr->ar_size[sizeof(arhPtr->ar_size) - 1] = '\0';
      size = (int)strtol(arhPtr->ar_size, NULL, 10);
      fseek(arch, (size + 1) & ~1, SEEK_CUR);
    }
  }
  fclose(arch);
  return NULL;
}
```