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

```asm
<trace>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%r14
  mov    %rsi,%rbp
  mov    %rsi,(%rsp)
  mov    %edx,0xc(%rsp)
  mov    %ecx,0x18(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %r9,%r13
  mov    0x90(%rsp),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  addl   $0x1,D6(%rip)
  mov    0x4(%rdi),%r12d
  mov    (%rdi),%ebx
  lea    -0x1(%rbx),%eax
  mov    %eax,0x28(%rsp)
  mov    %r12d,0x2c(%rsp)
  mov    %ebx,0x30(%rsp)
  lea    0x1(%r12),%eax
  mov    %eax,0x34(%rsp)
  lea    0x1(%rbx),%eax
  mov    %eax,0x38(%rsp)
  mov    %r12d,0x3c(%rsp)
  mov    %ebx,0x40(%rsp)
  lea    -0x1(%r12),%eax
  mov    %eax,0x44(%rsp)
  mov    $0x3e8,%edi
  call   <usleep@plt>
  movslq %ebx,%rdx
  lea    0x0(,%rdx,8),%rcx
  movslq %r12d,%rax
  mov    -0x8(%r13,%rcx,1),%rsi
  mov    (%rsi,%rax,4),%esi
  mov    0x0(%r13,%rdx,8),%rdx
  cmpl   $0x0,0x4(%rdx,%rax,4)
  sete   0x1f(%rsp)
  mov    0x8(%r13,%rcx,1),%rcx
  cmpl   $0x0,(%rcx,%rax,4)
  sete   0x1e(%rsp)
  cmpl   $0x0,-0x4(%rdx,%rax,4)
  sete   0x1d(%rsp)
  movl   $0x1,(%rdx,%rax,4)
  cmp    %ebx,0x0(%rbp)
  je     L58
L47:
  mov    $0x0,%ebp
  test   %esi,%esi
  je     L28
L20:
  test   %rbp,%rbp
  jne    L91
  cmpb   $0x0,0x1f(%rsp)
  jne    L64
L91:
  test   %rbp,%rbp
  jne    L109
  cmpb   $0x0,0x1e(%rsp)
  jne    L21
L109:
  test   %rbp,%rbp
  jne    L66
  cmpb   $0x0,0x1d(%rsp)
  jne    L94
L66:
  test   %rbp,%rbp
  je     L75
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <increaseWay@plt>
  mov    (%rsp),%r9
  mov    %r14,%r8
  mov    %r15,%rcx
  mov    0x18(%rsp),%edx
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <printBitmap@plt>
L75:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L139
  mov    %rbp,%rax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L58:
  mov    (%rsp),%rax
  cmp    %r12d,0x4(%rax)
  jne    L47
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <increaseWay@plt>
  mov    (%rsp),%r9
  mov    %r14,%r8
  mov    %r15,%rcx
  mov    0x18(%rsp),%edx
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <printBitmap@plt>
  mov    %r15,%rbp
  jmp    L75
L28:
  lea    0x28(%rsp),%rdi
  sub    $0x8,%rsp
  push   %r15
  mov    %r13,%r9
  mov    0x20(%rsp),%r8
  mov    0x28(%rsp),%ecx
  mov    0x1c(%rsp),%edx
  mov    0x10(%rsp),%rsi
  call   <trace>
  mov    %rax,%rbp
  add    $0x10,%rsp
  jmp    L20
L64:
  lea    0x30(%rsp),%rdi
  sub    $0x8,%rsp
  push   %r15
  mov    %r13,%r9
  mov    0x20(%rsp),%r8
  mov    0x28(%rsp),%ecx
  mov    0x1c(%rsp),%edx
  mov    0x10(%rsp),%rsi
  call   <trace>
  mov    %rax,%rbp
  add    $0x10,%rsp
  jmp    L91
L21:
  lea    0x38(%rsp),%rdi
  sub    $0x8,%rsp
  push   %r15
  mov    %r13,%r9
  mov    0x20(%rsp),%r8
  mov    0x28(%rsp),%ecx
  mov    0x1c(%rsp),%edx
  mov    0x10(%rsp),%rsi
  call   <trace>
  mov    %rax,%rbp
  add    $0x10,%rsp
  jmp    L109
L94:
  lea    0x40(%rsp),%rdi
  sub    $0x8,%rsp
  push   %r15
  mov    %r13,%r9
  mov    0x20(%rsp),%r8
  mov    0x28(%rsp),%ecx
  mov    0x1c(%rsp),%edx
  mov    0x10(%rsp),%rsi
  call   <trace>
  mov    %rax,%rbp
  add    $0x10,%rsp
  jmp    L66
L139:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int *trace(int *startPoint, int *exitpoint, int width, int heigth, int **bitmap, int **visited, int *way) {
  static int depth;
  depth++;
  int x = startPoint[1];
  int y = startPoint[0];
  int routes[4] = {0, 0, 0, 0};
  int up[2] = {y - 1, x};
  int right[2] = {y, x + 1};
  int down[2] = {y + 1, x};
  int left[2] = {y, x - 1};
  int *result = NULL;
  usleep(1000);
  if (visited[y - 1][x] == 0)
    routes[0] = 1;
  if (visited[y][x + 1] == 0)
    routes[1] = 1;
  if (visited[y + 1][x] == 0)
    routes[2] = 1;
  if (visited[y][x - 1] == 0)
    routes[3] = 1;
  visited[y][x] = 1;
  if (y == exitpoint[0] && x == exitpoint[1]) {
    increaseWay(way, x, y);
    printBitmap(bitmap, width, heigth, way, startPoint, exitpoint);
    return way;
  }
  if (routes[0] && result == NULL)
    result = trace(up, exitpoint, width, heigth, bitmap, visited, way);
  if (routes[1] && result == NULL)
    result = trace(right, exitpoint, width, heigth, bitmap, visited, way);
  if (routes[2] && result == NULL)
    result = trace(down, exitpoint, width, heigth, bitmap, visited, way);
  if (routes[3] && result == NULL)
    result = trace(left, exitpoint, width, heigth, bitmap, visited, way);
  if (result != NULL) {
    increaseWay(way, x, y);
    printBitmap(bitmap, width, heigth, way, startPoint, exitpoint);
  }
  return result;
}
```