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

```asm
<SetupFiles>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <mkdtemp@plt>
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x58(%rbp)
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x54(%rbp)
  mov    -0x58(%rbp),%edx
  mov    -0x54(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L2:
  cmp    %rdx,%rsp
  je     L21
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L2
L21:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L16
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L16:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x58(%rbp),%edx
  mov    -0x50(%rbp),%rcx
  mov    -0x40(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x40(%rbp),%rdx
  mov    -0x58(%rbp),%eax
  cltq
  movb   $0x2f,(%rdx,%rax,1)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x40(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x54(%rbp),%edx
  mov    -0x70(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x58(%rbp),%edx
  mov    -0x54(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    -0x40(%rbp),%rdx
  cltq
  movb   $0x0,(%rdx,%rax,1)
  mov    D7(%rip),%rax
  mov    (%rax),%edx
  mov    D21(%rip),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    D8(%rip),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <open@plt>
  mov    -0x78(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x50(%rbp),%rax
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L32
  call   <__stack_chk_fail@plt>
L32:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
char *SetupFiles(char *tempDir, char *hashFile, int *hashFD) {
  char *tempName = mkdtemp(tempDir);
  int tempSize = strlen(tempName);
  int hashSize = strlen(hashFile);
  char hashTemp[tempSize + hashSize + 2];
  memcpy(hashTemp, tempName, tempSize);
  hashTemp[tempSize] = '/';
  memcpy(hashTemp + tempSize + 1, hashFile, hashSize);
  hashTemp[tempSize + hashSize + 1] = '\0';
  *hashFD = open(hashTemp, O_CREAT | O_WRONLY | O_TRUNC);
  return tempName;
}
```