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

```asm
<XcursorScanTheme>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %rdi,%rdi
  je     L192
  mov    %rsi,%r13
  test   %rsi,%rsi
  je     L192
  xor    %eax,%eax
  mov    %rdi,%r12
  call   <XcursorLibraryPath@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L192
  movq   $0x0,(%rsp)
  jmp    L151
  nopw   0x0(%rax,%rax,1)
L133:
  mov    %r15,%rdi
  mov    %rbp,%r15
  call   <free@plt>
L143:
  mov    %r14,%rdi
  call   <_XcursorNextPath@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L207
  test   %bl,%bl
  je     L207
L151:
  mov    %r12,%rsi
  mov    %r14,%rdi
  mov    $0x1,%ebx
  call   <_XcursorBuildThemeDir@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L143
  mov    %r13,%rdx
  lea    D24(%rip),%rsi
  mov    %rax,%rdi
  call   <_XcursorBuildFullname@plt>
  mov    %rax,%rbp
  mov    (%rsp),%rax
  test   %rbp,%rbp
  je     L64
  mov    %rbp,%rdi
  lea    D8(%rip),%rsi
  call   <fopen@plt>
  mov    %rbp,%rdi
  mov    %rax,0x8(%rsp)
  call   <free@plt>
  mov    0x8(%rsp),%rdx
  mov    (%rsp),%rax
  or     %rdx,%rax
  test   %rdx,%rdx
  mov    %rdx,%rbp
  sete   %bl
L64:
  test   %rax,%rax
  jne    L133
  lea    D32(%rip),%rdx
  lea    D21(%rip),%rsi
  mov    %r15,%rdi
  call   <_XcursorBuildFullname@plt>
  mov    %rax,(%rsp)
  test   %rax,%rax
  je     L133
  mov    %rax,%rdi
  call   <_XcursorThemeInherits@plt>
  mov    (%rsp),%rdi
  mov    %rax,0x8(%rsp)
  call   <free@plt>
  mov    0x8(%rsp),%rax
  mov    %rax,(%rsp)
  jmp    L133
  xchg   %ax,%ax
L207:
  mov    (%rsp),%rax
  test   %rax,%rax
  je     L79
  test   %bl,%bl
  je     L185
  mov    %rax,%r15
  lea    D10(%rip),%rbx
L46:
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L41
  mov    %r15,%rdi
  mov    %r13,%rsi
  call   <XcursorScanTheme>
  mov    %r15,%rdi
  mov    %rax,%r14
  call   <_XcursorNextPath@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L120
  test   %r14,%r14
  je     L46
L120:
  mov    (%rsp),%rdi
  mov    %r14,%r15
  call   <free@plt>
L79:
  add    $0x18,%rsp
  mov    %r15,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L185:
  cmpq   $0x0,(%rsp)
  je     L79
  jmp    L50
  nopl   0x0(%rax)
L41:
  mov    %r15,%rsi
  mov    %r13,%rdx
  mov    %rbx,%rdi
  call   <printf@plt>
  mov    %r15,%rdi
  call   <_XcursorNextPath@plt>
  mov    %rax,%r15
  test   %rax,%rax
  jne    L46
L50:
  mov    (%rsp),%rdi
  call   <free@plt>
  jmp    L79
  nopl   (%rax)
L192:
  xor    %r15d,%r15d
  jmp    L79
```

tool_calls: name: extract_symbolic_data
arguments: tag: D24
type_guessed: string
name: extract_symbolic_data
arguments: tag: D8
type_guessed: string
name: extract_symbolic_data
arguments: tag: D32
type_guessed: string
name: extract_symbolic_data
arguments: tag: D21
type_guessed: string
name: extract_symbolic_data
arguments: tag: D10
type_guessed: string

tool: D24: cursors

tool: D8: r

tool: D32: index.theme

tool: 

tool: D10: Not calling XcursorScanTheme because of circular dependency: %s. %s

assistant: ```c
FILE *XcursorScanTheme(const char *theme, const char *name) {
  FILE *f = NULL;
  char *full;
  char *dir;
  const char *path;
  char *inherits = NULL;
  const char *i;
  if (!theme || !name)
    return NULL;
  for (path = XcursorLibraryPath(); path && f == NULL; path = _XcursorNextPath(path)) {
    dir = _XcursorBuildThemeDir(path, theme);
    if (dir) {
      full = _XcursorBuildFullname(dir, "cursors", name);
      if (full) {
        f = fopen(full, "r");
        free(full);
      }
      if (!f && !inherits) {
        full = _XcursorBuildFullname(dir, "", "index.theme");
        if (full) {
          inherits = _XcursorThemeInherits(full);
          free(full);
        }
      }
      free(dir);
    }
  }
  for (i = inherits; i && f == NULL; i = _XcursorNextPath(i)) {
    if (strcmp(i, theme) != 0)
      f = XcursorScanTheme(i, name);
    else
      printf("Not calling XcursorScanTheme because of circular dependency: %s. %s", i, name);
  }
  if (inherits != NULL)
    free(inherits);
  return f;
}
```