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

```asm
<djikstras>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xe8,%rsp
  mov    %edi,-0xb4(%rbp)
  mov    %esi,-0xb8(%rbp)
  mov    %edx,-0xbc(%rbp)
  mov    %ecx,-0xc0(%rbp)
  mov    %r8,-0xc8(%rbp)
  mov    %r9,-0xd0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    -0xc0(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x90(%rbp)
  movslq %edx,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    -0xc0(%rbp),%r12d
  movslq %r12d,%rax
  sub    $0x1,%rax
  mov    %rax,-0x88(%rbp)
  movslq %r12d,%rax
  mov    %rax,-0x100(%rbp)
  movq   $0x0,-0xf8(%rbp)
  mov    %rsp,%rax
  mov    %rax,%r13
  mov    -0xc0(%rbp),%esi
  mov    -0xbc(%rbp),%edi
  movslq %esi,%rax
  sub    $0x1,%rax
  mov    %rax,-0x80(%rbp)
  movslq %esi,%rax
  mov    %rax,-0x110(%rbp)
  movq   $0x0,-0x108(%rbp)
  movslq %esi,%rax
  lea    0x0(,%rax,4),%rbx
  movslq %edi,%rax
  sub    $0x1,%rax
  mov    %rax,-0x78(%rbp)
  movslq %esi,%rax
  mov    %rax,-0xf0(%rbp)
  movq   $0x0,-0xe8(%rbp)
  movslq %edi,%rax
  mov    %rax,-0xe0(%rbp)
  movq   $0x0,-0xd8(%rbp)
  mov    -0xf0(%rbp),%r8
  mov    -0xe8(%rbp),%r9
  mov    %r9,%rdx
  imul   -0xe0(%rbp),%rdx
  mov    -0xd8(%rbp),%rax
  imul   %r8,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    %r8,%rax
  mulq   -0xe0(%rbp)
  add    %rdx,%rcx
  mov    %rcx,%rdx
  movslq %esi,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %edi,%rax
  mov    %rax,%r10
  mov    $0x0,%r11d
  mov    %r15,%rdx
  imul   %r10,%rdx
  mov    %r11,%rax
  imul   %r14,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    %r14,%rax
  mul    %r10
  add    %rdx,%rcx
  mov    %rcx,%rdx
  movslq %esi,%rdx
  movslq %edi,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L177:
  cmp    %rdx,%rsp
  je     L11
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L177
L11:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L159
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L159:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x70(%rbp)
  mov    -0xd0(%rbp),%r8
  mov    -0x70(%rbp),%rdi
  mov    -0xc0(%rbp),%ecx
  mov    -0xbc(%rbp),%edx
  mov    -0xb8(%rbp),%esi
  mov    -0xb4(%rbp),%eax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <initialize@plt>
  movq   $0x0,-0x68(%rbp)
  movl   $0x0,-0xa4(%rbp)
  jmp    L237
L215:
  movl   $0x1,-0xa4(%rbp)
  movq   $0x270f,-0x98(%rbp)
  movl   $0x0,-0xa0(%rbp)
  jmp    L63
L33:
  movl   $0x0,-0x9c(%rbp)
  jmp    L72
L29:
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x70(%rbp),%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rsi
  mov    -0xa0(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  mov    (%rax,%rdx,4),%eax
  test   %eax,%eax
  jne    L55
  mov    -0xa0(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x9c(%rbp),%eax
  cltq
  movq   $0xffffffffffffffff,(%rdx,%rax,8)
L55:
  addl   $0x1,-0x9c(%rbp)
L72:
  mov    -0x9c(%rbp),%eax
  cmp    -0xc0(%rbp),%eax
  jl     L29
  addl   $0x1,-0xa0(%rbp)
L63:
  mov    -0xa0(%rbp),%eax
  cmp    -0xbc(%rbp),%eax
  jl     L33
  movl   $0x0,-0xa0(%rbp)
  jmp    L117
L90:
  movl   $0x0,-0x9c(%rbp)
  jmp    L22
L186:
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x70(%rbp),%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rsi
  mov    -0xa0(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  mov    (%rax,%rdx,4),%eax
  test   %eax,%eax
  je     L128
  mov    -0x70(%rbp),%r8
  mov    -0xc8(%rbp),%rdi
  mov    -0xc0(%rbp),%ecx
  mov    -0xbc(%rbp),%edx
  mov    -0x9c(%rbp),%esi
  mov    -0xa0(%rbp),%eax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <get_minimal@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rcx
  mov    -0xa0(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x9c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,8),%rax
  add    %rcx,%rax
  cmp    %rax,-0x98(%rbp)
  jl     L128
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x68(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x68(%rbp),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x50(%rbp)
  mov    -0xa0(%rbp),%eax
  cltq
  mov    %rax,-0x48(%rbp)
  mov    -0x9c(%rbp),%eax
  cltq
  mov    %rax,-0x40(%rbp)
  mov    -0x50(%rbp),%rax
  cmp    $0xf423e,%rax
  jg     L113
  mov    -0x50(%rbp),%rdx
  mov    -0xa0(%rbp),%eax
  movslq %eax,%rcx
  movslq %r12d,%rax
  imul   %rcx,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0xd0(%rbp),%rax
  add    %rax,%rcx
  mov    -0x9c(%rbp),%eax
  cltq
  mov    (%rcx,%rax,8),%rax
  cmp    %rax,%rdx
  jle    L113
  mov    -0x50(%rbp),%rax
  jmp    L167
L113:
  mov    -0xa0(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x9c(%rbp),%eax
  cltq
  mov    (%rdx,%rax,8),%rax
L167:
  mov    %rax,-0x98(%rbp)
L128:
  addl   $0x1,-0x9c(%rbp)
L22:
  mov    -0x9c(%rbp),%eax
  cmp    -0xc0(%rbp),%eax
  jl     L186
  addl   $0x1,-0xa0(%rbp)
L117:
  mov    -0xa0(%rbp),%eax
  cmp    -0xbc(%rbp),%eax
  jl     L90
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x60(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    -0x70(%rbp),%rax
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movl   $0x1,(%rax,%rdx,4)
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x58(%rbp),%rax
  mov    -0x98(%rbp),%rdx
  mov    %rdx,(%rcx,%rax,8)
  movl   $0x0,-0xa0(%rbp)
  jmp    L44
L227:
  movl   $0x0,-0x9c(%rbp)
  jmp    L115
L229:
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x70(%rbp),%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rsi
  mov    -0xa0(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  mov    (%rax,%rdx,4),%eax
  test   %eax,%eax
  jne    L92
  movl   $0x0,-0xa4(%rbp)
L92:
  addl   $0x1,-0x9c(%rbp)
L115:
  mov    -0x9c(%rbp),%eax
  cmp    -0xc0(%rbp),%eax
  jl     L229
  addl   $0x1,-0xa0(%rbp)
L44:
  mov    -0xa0(%rbp),%eax
  cmp    -0xbc(%rbp),%eax
  jl     L227
L237:
  cmpl   $0x0,-0xa4(%rbp)
  je     L215
  mov    %r13,%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L138
  call   <__stack_chk_fail@plt>
L138:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void djikstras(int x, int y, int m, int n, long tiles[m][n], long L[m][n]) {
  bool S[m][n];
  initialize(x, y, m, n, S, L);
  long *p = 0;
  bool done = false;
  while (!done) {
    done = true;
    int i, j;
    long t[5], min = 9999;
    for (i = 0; i < m; i++)
      for (j = 0; j < n; j++) {
        if (!S[i][j])
          L[i][j] = -1;
      }
    for (i = 0; i < m; i++)
      for (j = 0; j < n; j++)
        if (S[i][j]) {
          p = get_minimal(i, j, m, n, tiles, S);
          if (p[2] + L[i][j] <= min) {
            t[0] = p[0];
            t[1] = p[1];
            t[2] = p[2];
            t[3] = i;
            t[4] = j;
            min = (t[2] < 999999 && t[2] > L[i][j] ? t[2] : L[i][j]);
          }
        }
    S[t[0]][t[1]] = true;
    L[t[0]][t[1]] = min;
    for (i = 0; i < m; i++)
      for (j = 0; j < n; j++)
        if (!S[i][j])
          done = false;
  }
}
```