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

```asm
<get_minimal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %esi,-0x68(%rbp)
  mov    %edx,-0x6c(%rbp)
  mov    %ecx,-0x70(%rbp)
  mov    %r8,-0x78(%rbp)
  mov    %r9,-0x80(%rbp)
  mov    -0x70(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x30(%rbp)
  cltq
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    -0x70(%rbp),%ebx
  movslq %ebx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  movslq %ebx,%rax
  mov    %rax,%r10
  mov    $0x0,%r11d
  movq   $0x7f,-0x58(%rbp)
  movq   $0x80,-0x50(%rbp)
  movq   $0x80,-0x48(%rbp)
  movq   $0x80,-0x40(%rbp)
  movq   $0x80,-0x38(%rbp)
  cmpl   $0x0,-0x64(%rbp)
  jle    L187
  mov    -0x64(%rbp),%eax
  sub    $0x1,%eax
  movslq %eax,%rdx
  movslq %ebx,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jne    L187
  mov    -0x64(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x70(%rbp),%r8d
  mov    -0x6c(%rbp),%ecx
  mov    -0x68(%rbp),%edx
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x78(%rbp)
  mov    %r8d,%r9d
  mov    %ecx,%r8d
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %eax,%edi
  call   <w@plt>
  add    $0x10,%rsp
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L187:
  mov    -0x6c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x64(%rbp)
  jge    L46
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  movslq %ebx,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jne    L46
  mov    -0x64(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x70(%rbp),%r8d
  mov    -0x6c(%rbp),%ecx
  mov    -0x68(%rbp),%edx
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x78(%rbp)
  mov    %r8d,%r9d
  mov    %ecx,%r8d
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %eax,%edi
  call   <w@plt>
  add    $0x10,%rsp
  mov    %rax,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L46:
  cmpl   $0x0,-0x68(%rbp)
  jle    L144
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  movslq %ebx,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jne    L144
  mov    -0x68(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x70(%rbp),%r8d
  mov    -0x6c(%rbp),%edi
  mov    -0x64(%rbp),%edx
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x78(%rbp)
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <w@plt>
  add    $0x10,%rsp
  mov    %rax,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L144:
  mov    -0x70(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x68(%rbp)
  jge    L110
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  movslq %ebx,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    (%rdx,%rax,4),%eax
  test   %eax,%eax
  jne    L110
  mov    -0x68(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x70(%rbp),%r8d
  mov    -0x6c(%rbp),%edi
  mov    -0x64(%rbp),%edx
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%eax
  sub    $0x8,%rsp
  push   -0x78(%rbp)
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <w@plt>
  add    $0x10,%rsp
  mov    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L110:
  mov    -0x50(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jge    L6
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L6:
  mov    -0x48(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jge    L162
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L162:
  mov    -0x40(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jge    L7
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L7:
  mov    -0x38(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jge    L64
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L64:
  mov    -0x50(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jne    L17
  mov    -0x64(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    %rax,D99(%rip)
  mov    -0x68(%rbp),%eax
  cltq
  mov    %rax,D9(%rip)
  jmp    L11
L17:
  mov    -0x48(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jne    L124
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    %rax,D91(%rip)
  mov    -0x68(%rbp),%eax
  cltq
  mov    %rax,D91(%rip)
  jmp    L11
L124:
  mov    -0x40(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jne    L72
  mov    -0x64(%rbp),%eax
  cltq
  mov    %rax,D91(%rip)
  mov    -0x68(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    %rax,D91(%rip)
  jmp    L11
L72:
  mov    -0x38(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jne    L11
  mov    -0x64(%rbp),%eax
  cltq
  mov    %rax,D91(%rip)
  mov    -0x68(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    %rax,D91(%rip)
L11:
  mov    -0x58(%rbp),%rax
  mov    %rax,D91(%rip)
  lea    D91(%rip),%rax
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
long *get_minimal(int row, int col, int m, int n, long tiles[m][n], bool S[m][n]) {
  static long coord[3] = {-1, -1, LONG_MAX};
  long min = LONG_MAX - 1;
  long up = LONG_MAX, down = LONG_MAX, left = LONG_MAX, rigth = LONG_MAX;
  if (row > 0 && !S[row - 1][col]) {
    up = w(row, col, row - 1, col, m, n, tiles);
    min = up;
  }
  if (row < m - 1 && !S[row + 1][col]) {
    down = w(row, col, row + 1, col, m, n, tiles);
    min = down;
  }
  if (col > 0 && !S[row][col - 1]) {
    left = w(row, col, row, col - 1, m, n, tiles);
    min = left;
  }
  if (col < n - 1 && !S[row][col + 1]) {
    rigth = w(row, col, row, col + 1, m, n, tiles);
    min = rigth;
  }
  if (up < min)
    min = up;
  if (down < min)
    min = down;
  if (left < min)
    min = left;
  if (rigth < min)
    min = rigth;
  if (up == min) {
    coord[0] = row - 1;
    coord[1] = col;
  } else if (down == min) {
    coord[0] = row + 1;
    coord[1] = col;
  } else if (left == min) {
    coord[0] = row;
    coord[1] = col - 1;
  } else if (rigth == min) {
    coord[0] = row;
    coord[1] = col + 1;
  }
  coord[2] = min;
  return coord;
}
```