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

```asm
<estostr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0x0,-0x50(%rbp)
  movl   $0x0,-0x4c(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%ecx
  movslq %ecx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x48(%rbp)
  movslq %ecx,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %ecx,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  movslq %ecx,%rax
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  mov    %rsp,%rdx
  sub    %rsi,%rdx
L103:
  cmp    %rdx,%rsp
  je     L82
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L103
L82:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L28
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L28:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %ecx,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movl   $0x0,-0x54(%rbp)
  jmp    L31
L222:
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L199
  movl   $0x1,-0x4c(%rbp)
  jmp    L56
L199:
  cmpl   $0x0,-0x4c(%rbp)
  je     L149
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x74,%eax
  je     L210
  cmp    $0x74,%eax
  jg     L115
  cmp    $0x72,%eax
  je     L24
  cmp    $0x72,%eax
  jg     L115
  cmp    $0x6e,%eax
  je     L213
  cmp    $0x6e,%eax
  jg     L115
  cmp    $0x30,%eax
  je     L120
  cmp    $0x5c,%eax
  je     L10
  jmp    L115
L213:
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  movb   $0xa,(%rdx,%rax,1)
  jmp    L32
L24:
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  movb   $0xd,(%rdx,%rax,1)
  jmp    L32
L210:
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  movb   $0x9,(%rdx,%rax,1)
  jmp    L32
L120:
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  movb   $0x0,(%rdx,%rax,1)
  jmp    L32
L10:
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  movb   $0x5c,(%rdx,%rax,1)
  jmp    L32
L115:
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  movb   $0x5c,(%rdx,%rax,1)
  addl   $0x1,-0x50(%rbp)
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  mov    %cl,(%rdx,%rax,1)
  nop
L32:
  addl   $0x1,-0x50(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L56
L149:
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x40(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  mov    %cl,(%rdx,%rax,1)
  addl   $0x1,-0x50(%rbp)
L56:
  addl   $0x1,-0x54(%rbp)
L31:
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x54(%rbp)
  jle    L222
  mov    -0x40(%rbp),%rdx
  mov    -0x68(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L63
  call   <__stack_chk_fail@plt>
L63:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
char *estostr(char *s) {
  int i, j = 0;
  int f = 0;
  char ss[strlen(s) + 1];
  memset(ss, 0, sizeof ss);
  for (i = 0; i < strlen(s) + 1; i++) {
    if (s[i] == '\\') {
      f = 1;
      continue;
    }
    if (f) {
      switch (s[i]) {
      case 'n':
        ss[j] = '\n';
        break;
      case 'r':
        ss[j] = '\r';
        break;
      case 't':
        ss[j] = '\t';
        break;
      case '0':
        ss[j] = '\0';
        break;
      case '\\':
        ss[j] = '\\';
        break;
      default:
        ss[j] = '\\';
        j++;
        ss[j] = s[i];
        break;
      }
      j++;
      f = 0;
      continue;
    }
    ss[j] = s[i];
    j++;
  }
  return strcpy(s, ss);
}
```