user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<_XcursorThemeInherits>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x2008(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L171
  lea    D14(%rip),%rsi
  mov    %rsp,%rbx
  lea    D1(%rip),%r12
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L171
  nopw   0x0(%rax,%rax,1)
L192:
  mov    %rbp,%rdx
  mov    $0x2000,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L80
  mov    $0x8,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L192
  movzbl 0x8(%rsp),%edx
  lea    0x8(%rsp),%rax
  cmp    $0x20,%dl
  jne    L147
  nopl   0x0(%rax)
L175:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x20,%dl
  je     L175
L147:
  cmp    $0x3d,%dl
  jne    L192
  cmpb   $0x20,0x1(%rax)
  lea    0x1(%rax),%rbx
  jne    L73
  nopl   0x0(%rax)
L214:
  add    $0x1,%rbx
  cmpb   $0x20,(%rbx)
  je     L214
L73:
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L80
  movabs $0xf7ffeffefffff9ff,%rsi
  movzbl (%rbx),%eax
  mov    %r12,%rdx
  test   %al,%al
  je     L164
  nopw   0x0(%rax,%rax,1)
L25:
  cmp    $0x3b,%al
  jbe    L70
L249:
  cmp    %rdx,%r12
  je     L96
  movb   $0x3a,(%rdx)
  add    $0x1,%rdx
  jmp    L96
  nopw   0x0(%rax,%rax,1)
L187:
  lea    -0x9(%rax),%ecx
  cmp    $0x1,%cl
  jbe    L25
  cmp    $0x20,%al
  je     L25
L96:
  cmp    $0x3b,%al
  je     L252
  cmp    $0x2c,%al
  je     L252
  add    $0x1,%rbx
  mov    %al,(%rdx)
  add    $0x1,%rdx
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L187
L164:
  movb   $0x0,(%rdx)
L85:
  mov    %rbp,%rdi
  call   <fclose@plt>
L50:
  mov    0x2008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  add    $0x2010,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L70:
  bt     %rax,%rsi
  jb     L238
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  jmp    L25
L252:
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L25
  jmp    L164
  nopl   0x0(%rax)
L171:
  xor    %r12d,%r12d
  jmp    L50
L238:
  test   %al,%al
  je     L164
  jmp    L249
  cs nopw 0x0(%rax,%rax,1)
L80:
  xor    %r12d,%r12d
  jmp    L85
L42:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D14
data_type: string
name: unpack_data
arguments: label: D1
data_type: string

tool: D14: r

tool: D1: Inherits

assistant: ```c
char *_XcursorThemeInherits(const char *full) {
  char line[8192];
  char *result = NULL;
  FILE *f;
  if (!full)
    return NULL;
  f = fopen(full, "r");
  if (f) {
    while (fgets(line, sizeof(line), f)) {
      if (!strncmp(line, "Inherits", 8)) {
        char *l = line + 8;
        char *r;
        while (*l == ' ')
          l++;
        if (*l != '=')
          continue;
        l++;
        while (*l == ' ')
          l++;
        result = malloc(strlen(l) + 1);
        if (result) {
          r = result;
          while (*l) {
            while (((*l) == ';' || (*l) == ',') || ((*l) == ' ' || (*l) == '\t' || (*l) == '\n'))
              l++;
            if (!*l)
              break;
            if (r != result)
              *r++ = ':';
            while (*l && !((*l) == ' ' || (*l) == '\t' || (*l) == '\n') && !((*l) == ';' || (*l) == ','))
              *r++ = *l++;
          }
          *r++ = '\0';
        }
        break;
      }
    }
    fclose(f);
  }
  return result;
}
```