user: What is the c source code of the assembly code below:

```asm
<movement>:
  endbr64
  push   %r15
  push   %r14
  mov    %r9,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x38,%rsp
  mov    0x78(%rsp),%rax
  mov    0x70(%rsp),%r15
  mov    %rdi,(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %rax,0x10(%rsp)
  mov    0x80(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  cmpl   $0x1,0x88(%rsp)
  movl   $0xfffffffe,0x24(%rsp)
  jne    L294
  lea    D41(%rip),%rbp
  nopl   0x0(%rax)
L225:
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0x24(%rsp),%eax
  lea    0x1(%rax),%edx
  cmp    $0xc,%edx
  ja     L225
  cmp    $0xffffffff,%eax
  je     L41
L201:
  mov    %eax,(%rbx)
L285:
  movl   $0x1,(%r15)
  movslq (%rbx),%rax
  lea    (%r12,%rax,4),%rax
  mov    (%rax),%edx
  test   %edx,%edx
  jne    L73
  movl   $0x1,(%rax)
L73:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L211
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L294:
  lea    D43(%rip),%rdi
  call   <printf@plt>
  movslq (%rbx),%rax
  cmp    $0x3,%eax
  jg     L16
L179:
  test   $0x3,%al
  jne    L109
L42:
  mov    %eax,%edx
  and    $0x80000003,%edx
  cmp    $0x3,%edx
  je     L318
  lea    D0(%rip),%rdi
  call   <printf@plt>
  movslq (%rbx),%rax
L318:
  cmp    $0x7,%eax
  jle    L110
L272:
  cmpl   $0xffffffff,0x0(%r13,%rax,4)
  je     L74
L189:
  lea    0x24(%rsp),%rdi
  call   <getint@plt>
  mov    0x24(%rsp),%eax
  test   %eax,%eax
  je     L73
  cmp    $0x1,%eax
  je     L153
  cmp    $0x4,%eax
  je     L205
  cmp    $0x6,%eax
  je     L197
  cmp    $0x8,%eax
  je     L253
  cmp    $0xffffffff,%eax
  jne    L125
  movslq (%rbx),%rax
  cmpl   $0xffffffff,0x0(%r13,%rax,4)
  je     L68
L125:
  lea    D15(%rip),%rdi
  call   <printf@plt>
  jmp    L73
L41:
  mov    0x10(%rsp),%rax
  addl   $0x1,(%r14)
  mov    %r12,%rcx
  mov    %r13,%rsi
  mov    0x8(%rsp),%rdx
  mov    (%rsp),%rdi
  movl   $0x0,(%rax)
  mov    0x18(%rsp),%rax
  movl   $0x0,(%rax)
  call   <genmap@plt>
  movslq (%rbx),%rax
  lea    (%r12,%rax,4),%rax
  mov    (%rax),%ecx
  test   %ecx,%ecx
  jne    L257
  movl   $0x1,(%rax)
L257:
  movl   $0x1,(%r15)
  jmp    L73
  nopl   (%rax)
L205:
  mov    (%rbx),%eax
  test   $0x3,%al
  je     L125
  sub    $0x1,%eax
  mov    %eax,(%rbx)
  jmp    L285
L197:
  mov    (%rbx),%eax
  mov    %eax,%edx
  and    $0x80000003,%edx
  cmp    $0x3,%edx
  je     L125
  add    $0x1,%eax
  mov    %eax,(%rbx)
  jmp    L285
  nopl   (%rax)
L109:
  lea    D10(%rip),%rdi
  call   <printf@plt>
  movslq (%rbx),%rax
  jmp    L42
  nopl   0x0(%rax)
L16:
  lea    D29(%rip),%rdi
  call   <printf@plt>
  movslq (%rbx),%rax
  jmp    L179
  nopl   0x0(%rax)
L110:
  lea    D68(%rip),%rdi
  call   <printf@plt>
  movslq (%rbx),%rax
  jmp    L272
  nopl   0x0(%rax)
L74:
  lea    D13(%rip),%rdi
  call   <printf@plt>
  jmp    L189
  nopl   0x0(%rax)
L153:
  subl   $0x4,(%rbx)
  jmp    L285
  nopl   0x0(%rax,%rax,1)
L253:
  mov    (%rbx),%eax
  cmp    $0x7,%eax
  jg     L125
  add    $0x4,%eax
  jmp    L201
L68:
  mov    0x10(%rsp),%rax
  addl   $0x1,(%r14)
  mov    %r12,%rcx
  mov    %r13,%rsi
  mov    0x8(%rsp),%rdx
  mov    (%rsp),%rdi
  movl   $0x0,(%rax)
  mov    0x18(%rsp),%rax
  movl   $0x0,(%rax)
  call   <genmap@plt>
  jmp    L285
L211:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D41
data_type: string
name: read_data
arguments: data_tag: D43
data_type: string
name: read_data
arguments: data_tag: D0
data_type: string
name: read_data
arguments: data_tag: D15
data_type: string
name: read_data
arguments: data_tag: D10
data_type: string
name: read_data
arguments: data_tag: D29
data_type: string
name: read_data
arguments: data_tag: D68
data_type: string
name: read_data
arguments: data_tag: D13
data_type: string

tool: D41: Where do you want to teleport?


tool: D43: Where do you want to go?
[0]: Nowhere


tool: D0: [6]: East


tool: D15: That's not an available direction!


tool: D10: [4]: West


tool: D29: [1]: North


tool: D68: [8]: South


tool: D13: [-1]: Down


assistant: ```c
void movement(int *future, int *map, int *loot, int *vision, int *pos, int *floor, int *start, int *antimag, int *checkcurse, int free) {
  int e = -2;
  if (free == 1) {
    do {
      printf("Where do you want to teleport?\n");
    } while ((e < -1) || (e > 11));
    if (e >= 0) {
      *pos = e;
      *start = 1;
      if (*(vision + *pos) == 0)
        *(vision + *pos) = 1;
      return;
    } else {
      *floor = *floor + 1;
      *antimag = 0;
      *checkcurse = 0;
      genmap(future, map, loot, vision);
      if (*(vision + *pos) == 0)
        *(vision + *pos) = 1;
      *start = 1;
      return;
    }
  }
  printf("Where do you want to go?\n[0]: Nowhere\n");
  if (*pos - 4 >= 0) {
    printf("[1]: North\n");
  }
  if (*pos % 4) {
    printf("[4]: West\n");
  }
  if (*pos % 4 != 3) {
    printf("[6]: East\n");
  }
  if (*pos + 4 < 12) {
    printf("[8]: South\n");
  }
  if (*(map + *pos) == -1) {
    printf("[-1]: Down\n");
  }
  getint(&e);
  if (e == 0)
    return;
  if ((e == 1) && (pos - 4 >= 0)) {
    *pos = *pos - 4;
    *start = 1;
    if (*(vision + *pos) == 0)
      *(vision + *pos) = 1;
    return;
  }
  if ((e == 4) && (*pos % 4)) {
    *pos = *pos - 1;
    *start = 1;
    if (*(vision + *pos) == 0)
      *(vision + *pos) = 1;
    return;
  }
  if ((e == 6) && (*(pos) % 4 != 3)) {
    *pos = *pos + 1;
    *start = 1;
    if (*(vision + *pos) == 0)
      *(vision + *pos) = 1;
    return;
  }
  if ((e == 8) && (*pos + 4 < 12)) {
    *pos = *pos + 4;
    *start = 1;
    if (*(vision + *pos) == 0)
      *(vision + *pos) = 1;
    return;
  }
  if ((e == -1) && (*(map + *pos) == -1)) {
    *floor = *floor + 1;
    *antimag = 0;
    *checkcurse = 0;
    genmap(future, map, loot, vision);
    *start = 1;
    if (*(vision + *pos) == 0)
      *(vision + *pos) = 1;
    return;
  }
  printf("That's not an available direction!\n");
}
```