user: Converte this assembly snippet into its equivalent C code:

```asm
<get_case_conflict_localfilename>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdx,(%rsp)
  mov    %ecx,0xc(%rsp)
  call   <opendir@plt>
  test   %rax,%rax
  je     L52
  mov    %rax,%rbp
  lea    D26(%rip),%rbx
  lea    D41(%rip),%r13
  nopl   0x0(%rax)
L0:
  mov    %rbp,%rdi
  call   <readdir@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L5
  mov    (%r12),%rdi
  mov    %rbx,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L0
  mov    (%r12),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L0
  mov    %r14,%rdi
  call   <strlwr@plt>
  mov    (%r12),%rdi
  mov    %rax,%r15
  call   <strlwr@plt>
  mov    %r15,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L0
  mov    (%r12),%rdi
  mov    %r14,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L0
  mov    (%rsp),%rdi
  call   <strlen@plt>
  mov    (%r12),%r8
  mov    %rax,0x10(%rsp)
  mov    %r8,%rdi
  mov    %r8,0x18(%rsp)
  call   <strlen@plt>
  mov    0x10(%rsp),%rdx
  lea    0x2(%rdx,%rax,1),%rdi
  call   <malloc@plt>
  mov    (%rsp),%rdi
  mov    %rax,%r15
  call   <strlen@plt>
  mov    0x18(%rsp),%rdi
  mov    %rax,0x10(%rsp)
  call   <strlen@plt>
  mov    0x10(%rsp),%rdx
  xor    %esi,%esi
  mov    %r15,%rdi
  lea    0x2(%rdx,%rax,1),%rdx
  call   <memset@plt>
  mov    (%r12),%rcx
  mov    (%rsp),%rdx
  mov    %r15,%rdi
  lea    D32(%rip),%rsi
  call   <sprintf@plt>
  mov    0xc(%rsp),%edx
  mov    (%rsp),%rdi
  mov    %r15,%rsi
  call   <is_server_exist@plt>
  mov    %r15,%rdi
  mov    %eax,0x10(%rsp)
  call   <free@plt>
  mov    0x10(%rsp),%edx
  test   %edx,%edx
  je     L0
  mov    (%r12),%r13
  mov    %r13,%rdi
  call   <strlen@plt>
  lea    0x13(%rax),%rdi
  call   <malloc@plt>
  mov    %r13,%rdi
  mov    %rax,%rbx
  call   <strlen@plt>
  xor    %esi,%esi
  mov    %rbx,%rdi
  lea    0x13(%rax),%rdx
  call   <memset@plt>
  mov    (%r12),%rdx
  mov    %rbx,%rdi
  mov    %rbx,%r12
  lea    D4(%rip),%rcx
  lea    D31(%rip),%rsi
  call   <sprintf@plt>
  nopw   0x0(%rax,%rax,1)
L5:
  mov    %rbp,%rdi
  call   <closedir@plt>
L6:
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L52:
  xor    %r12d,%r12d
  jmp    L6
```

tool_calls: name: extract_symbolic_data
arguments: label: D26
type: string
name: extract_symbolic_data
arguments: label: D41
type: string
name: extract_symbolic_data
arguments: label: D32
type: string
name: extract_symbolic_data
arguments: label: D4
type: string
name: extract_symbolic_data
arguments: label: D31
type: string

tool: D26: .

tool: D41: ..

tool: D32: %s/%s

tool: D4: (big-low-conflict)

tool: D31: %s

assistant: ```c
char *get_case_conflict_localfilename(char *localfolder, char *filename, char *serfolder, int index) {
  DIR *pDir;
  struct dirent *ent = NULL;
  pDir = opendir(localfolder);
  char *suffix = "(big-low-conflict)";
  int exist = 0;
  if (NULL == pDir) {
    return NULL;
  }
  char *tmp_name = NULL;
  while (NULL != (ent = readdir(pDir))) {
    if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."))
      continue;
    if (!strcmp(strlwr(ent->d_name), strlwr(filename)) && strcmp(ent->d_name, filename)) {
      char *serfullname = malloc(strlen(serfolder) + strlen(ent->d_name) + 1 + 1);
      memset(serfullname, 0, strlen(serfolder) + strlen(ent->d_name) + 1 + 1);
      sprintf(serfullname, "%s/%s", serfolder, ent->d_name);
      exist = is_server_exist(serfolder, serfullname, index);
      free(serfullname);
      serfullname = NULL;
      ;
      if (exist) {
        tmp_name = malloc(strlen(ent->d_name) + strlen(suffix) + 1);
        memset(tmp_name, 0, strlen(ent->d_name) + strlen(suffix) + 1);
        sprintf(tmp_name, "%s", ent->d_name, suffix);
        break;
      }
    }
  }
  closedir(pDir);
  return tmp_name;
}
```