user: Translate the below assembly code into C programming language:

```asm
<anda>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x5c(%rbp)
  movl   $0x0,-0x58(%rbp)
  movl   $0x0,-0x54(%rbp)
  jmp    L229
L67:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  lea    -0x1e(%rax),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x30,%al
  je     L21
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  add    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x68(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <marca_ghost@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <print_maze@plt>
  jmp    L263
L21:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x30,%al
  je     L323
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  sub    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x68(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <marca_ghost@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <print_maze@plt>
  jmp    L263
L323:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x30,%al
  je     L284
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x68(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <marca_ghost@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <print_maze@plt>
  jmp    L263
L284:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x30,%al
  je     L263
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  sub    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x68(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <marca_ghost@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <print_maze@plt>
L263:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x37,%al
  jne    L67
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x37,%al
  jne    L67
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x37,%al
  jne    L67
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  lea    -0x1e(%rax),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x37,%al
  jne    L67
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x37,%al
  je     L88
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x37,%al
  je     L88
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x37,%al
  je     L88
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  lea    -0x1e(%rax),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x37,%al
  jne    L222
L88:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    $0x2,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  sub    $0x2,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  add    $0x2,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x68(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x2,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x68(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,-0x24(%rbp)
L222:
  lea    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <zera_vetor@plt>
  mov    -0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x30,%al
  je     L326
  mov    -0x40(%rbp),%edx
  mov    -0x78(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <pow@plt>
  mov    %rax,%rbx
  mov    -0x3c(%rbp),%eax
  mov    -0x78(%rbp),%rdx
  add    $0x4,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <pow@plt>
  add    %rbx,%rax
  mov    %rax,%rdi
  call   <sqrt@plt>
  mov    %eax,-0x50(%rbp)
L326:
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x30,%al
  je     L86
  mov    -0x38(%rbp),%edx
  mov    -0x78(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <pow@plt>
  mov    %rax,%rbx
  mov    -0x34(%rbp),%eax
  mov    -0x78(%rbp),%rdx
  add    $0x4,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <pow@plt>
  add    %rbx,%rax
  mov    %rax,%rdi
  call   <sqrt@plt>
  mov    %eax,-0x4c(%rbp)
L86:
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x30,%al
  je     L279
  mov    -0x30(%rbp),%edx
  mov    -0x78(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <pow@plt>
  mov    %rax,%rbx
  mov    -0x2c(%rbp),%eax
  mov    -0x78(%rbp),%rdx
  add    $0x4,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <pow@plt>
  add    %rbx,%rax
  mov    %rax,%rdi
  call   <sqrt@plt>
  mov    %eax,-0x48(%rbp)
L279:
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x30,%al
  je     L213
  mov    -0x28(%rbp),%edx
  mov    -0x78(%rbp),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <pow@plt>
  mov    %rax,%rbx
  mov    -0x24(%rbp),%eax
  mov    -0x78(%rbp),%rdx
  add    $0x4,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    $0x2,%esi
  mov    %eax,%edi
  call   <pow@plt>
  add    %rbx,%rax
  mov    %rax,%rdi
  call   <sqrt@plt>
  mov    %eax,-0x44(%rbp)
L213:
  movl   $0x0,-0x5c(%rbp)
  jmp    L109
L81:
  movl   $0x0,-0x58(%rbp)
  jmp    L164
L200:
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%edx
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  jge    L288
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  mov    %eax,-0x54(%rbp)
  jmp    L226
L288:
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%edx
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,4),%eax
  cmp    %eax,%edx
  jle    L226
  mov    -0x58(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  mov    %eax,-0x54(%rbp)
L226:
  addl   $0x1,-0x58(%rbp)
L164:
  cmpl   $0x3,-0x58(%rbp)
  jle    L200
  addl   $0x1,-0x5c(%rbp)
L109:
  cmpl   $0x3,-0x5c(%rbp)
  jle    L81
  mov    -0x50(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L187
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    $0x2,%eax
  cltq
  movb   $0x42,(%rdx,%rax,1)
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <print_maze@plt>
  jmp    L229
L187:
  mov    -0x4c(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L78
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  sub    $0x2,%eax
  cltq
  movb   $0x42,(%rdx,%rax,1)
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <print_maze@plt>
  jmp    L229
L78:
  mov    -0x48(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L322
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  lea    0x3c(%rax),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movb   $0x42,(%rdx,%rax,1)
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <print_maze@plt>
  jmp    L229
L322:
  mov    -0x44(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jne    L229
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  lea    -0x3c(%rax),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movb   $0x42,(%rdx,%rax,1)
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <print_maze@plt>
L229:
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x54,%al
  jne    L263
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x54,%al
  jne    L263
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x54,%al
  jne    L263
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  lea    -0x1e(%rax),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x54,%al
  jne    L263
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L176
  call   <__stack_chk_fail@plt>
L176:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void anda(int ghost[2], char maze[23][30], int target[2]) {
  int dist[4], i = 0, j = 0, menor = 0, vet[8];
  while (maze[ghost[0]][ghost[1] + 1] != 'T' || maze[ghost[0]][ghost[1] - 1] != 'T' || maze[ghost[0] + 1][ghost[1]] != 'T' || maze[ghost[0] - 1][ghost[1]] != 'T') {
    while (maze[ghost[0]][ghost[1] + 1] != '7' || maze[ghost[0]][ghost[1] - 1] != '7' || maze[ghost[0] + 1][ghost[1]] != '7' || maze[ghost[0] - 1][ghost[1]] != '7') {
      if (maze[ghost[0] - 1][ghost[1]] != '0') {
        ghost[1]++;
        marca_ghost(maze, ghost);
        print_maze(maze);
      } else if (maze[ghost[0]][ghost[1] - 1] != '0') {
        ghost[1]--;
        marca_ghost(maze, ghost);
        print_maze(maze);
      } else if (maze[ghost[0] + 1][ghost[1]] != '0') {
        ghost[0]++;
        marca_ghost(maze, ghost);
        print_maze(maze);
      } else if (maze[ghost[0]][ghost[1] - 1] != '0') {
        ghost[1]--;
        marca_ghost(maze, ghost);
        print_maze(maze);
      }
    }
    if (maze[ghost[0]][ghost[1] + 1] == '7' || (maze[ghost[0]][ghost[1] - 1] == '7') || (maze[ghost[0] + 1][ghost[1]] == '7') || (maze[ghost[0] - 1][ghost[1]] == '7')) {
      vet[0] = ghost[0];
      vet[1] = ghost[1] + 2;
      vet[2] = ghost[0];
      vet[3] = ghost[1] - 2;
      vet[4] = ghost[0] + 2;
      vet[5] = ghost[1];
      vet[6] = ghost[0] - 2;
      vet[7] = ghost[1];
    }
    zera_vetor(dist);
    if (maze[vet[0]][vet[1]] != '0') {
      dist[0] = sqrt(pow((vet[0] - target[0]), 2) + pow((vet[1] - target[1]), 2));
    }
    if (maze[vet[2]][vet[3]] != '0') {
      dist[1] = sqrt(pow((vet[2] - target[0]), 2) + pow((vet[3] - target[1]), 2));
    }
    if (maze[vet[4]][vet[5]] != '0') {
      dist[2] = sqrt(pow((vet[4] - target[0]), 2) + pow((vet[5] - target[1]), 2));
    }
    if (maze[vet[6]][vet[7]] != '0') {
      dist[3] = sqrt(pow((vet[6] - target[0]), 2) + pow((vet[7] - target[1]), 2));
    }
    for (i = 0; i < 4; i++) {
      for (j = 0; j < 4; j++) {
        if (dist[i] < dist[j]) {
          menor = vet[i];
        } else if (dist[j] > dist[i]) {
          menor = vet[j];
        }
      }
    }
    if (menor == dist[0]) {
      maze[ghost[0]][ghost[1] + 2] = 'B';
      print_maze(maze);
    } else if (menor == dist[1]) {
      maze[ghost[0]][ghost[1] - 2] = 'B';
      print_maze(maze);
    } else if (menor == dist[2]) {
      maze[ghost[0] + 2][ghost[1]] = 'B';
      print_maze(maze);
    } else if (menor == dist[3]) {
      maze[ghost[0] - 2][ghost[1]] = 'B';
      print_maze(maze);
    }
  }
}
```