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

```asm
<bot>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  sub    $0xc0,%rsp
  movd   0x70(%rdi),%xmm1
  movd   0xa0(%rdi),%xmm2
  movd   0x78(%rdi),%xmm4
  movd   0x74(%rdi),%xmm7
  lea    0x8(%rsp),%rdx
  lea    0xc(%rsp),%rcx
  movd   0xa4(%rdi),%xmm0
  movd   0x80(%rdi),%xmm3
  movd   0x9c(%rdi),%xmm8
  punpckldq %xmm4,%xmm7
  movd   0x58(%rdi),%xmm5
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  punpckldq %xmm1,%xmm0
  movd   0x40(%rdi),%xmm4
  movd   0x88(%rdi),%xmm1
  punpckldq %xmm2,%xmm8
  movd   0x84(%rdi),%xmm6
  movd   0x68(%rdi),%xmm2
  movl   $0x0,0x8(%rsp)
  punpcklqdq %xmm0,%xmm8
  movd   0x7c(%rdi),%xmm0
  movl   $0x0,0xc(%rsp)
  punpckldq %xmm1,%xmm6
  movd   0x38(%rdi),%xmm1
  punpckldq %xmm3,%xmm0
  movd   0x60(%rdi),%xmm3
  punpcklqdq %xmm0,%xmm7
  movd   0x54(%rdi),%xmm0
  punpckldq %xmm5,%xmm0
  movd   0x5c(%rdi),%xmm5
  punpcklqdq %xmm0,%xmm6
  movd   0x64(%rdi),%xmm0
  punpckldq %xmm3,%xmm5
  movd   0x44(%rdi),%xmm3
  punpckldq %xmm2,%xmm0
  movd   0x50(%rdi),%xmm2
  punpcklqdq %xmm0,%xmm5
  movd   0x3c(%rdi),%xmm0
  punpckldq %xmm4,%xmm0
  movd   0x6c(%rdi),%xmm4
  punpckldq %xmm1,%xmm4
  movd   0x48(%rdi),%xmm1
  punpcklqdq %xmm0,%xmm4
  movd   0x4c(%rdi),%xmm0
  punpckldq %xmm1,%xmm3
  punpckldq %xmm2,%xmm0
  movd   0x28(%rdi),%xmm2
  punpcklqdq %xmm0,%xmm3
  movd   0x24(%rdi),%xmm0
  punpckldq %xmm2,%xmm0
  movd   0x1c(%rdi),%xmm2
  movd   0x20(%rdi),%xmm1
  movaps %xmm8,0x20(%rsp)
  movd   0x30(%rdi),%xmm11
  movd   0xc(%rdi),%xmm9
  movaps %xmm7,0x30(%rsp)
  punpckldq %xmm1,%xmm2
  movd   (%rdi),%xmm1
  movd   0x8(%rdi),%xmm12
  movaps %xmm6,0x40(%rsp)
  punpcklqdq %xmm0,%xmm2
  movd   0x34(%rdi),%xmm0
  movd   0x94(%rdi),%xmm10
  movaps %xmm5,0x50(%rsp)
  movd   0x98(%rdi),%xmm13
  mov    0x14(%rdi),%rax
  movaps %xmm4,0x60(%rsp)
  punpckldq %xmm1,%xmm0
  movd   0x2c(%rdi),%xmm1
  movd   0x90(%rdi),%xmm14
  movaps %xmm3,0x70(%rsp)
  punpckldq %xmm13,%xmm10
  mov    %rax,0xb0(%rsp)
  punpckldq %xmm11,%xmm1
  movaps %xmm2,0x80(%rsp)
  punpcklqdq %xmm0,%xmm1
  movd   0x10(%rdi),%xmm0
  movaps %xmm1,0x90(%rsp)
  punpckldq %xmm0,%xmm9
  movd   0x4(%rdi),%xmm0
  punpckldq %xmm12,%xmm0
  punpcklqdq %xmm9,%xmm0
  movd   0x8c(%rdi),%xmm9
  lea    0x10(%rsp),%rdi
  movaps %xmm0,0xa0(%rsp)
  punpckldq %xmm14,%xmm9
  punpcklqdq %xmm10,%xmm9
  movaps %xmm9,0x10(%rsp)
  call   <nxtMoveAV@plt>
  movslq %eax,%rdx
  mov    (%rbx,%rdx,4),%r8d
  test   %r8d,%r8d
  jne    L75
  cmp    $0x6,%eax
  jle    L76
L75:
  mov    (%rbx),%eax
  test   %eax,%eax
  je     L76
  mov    0x4(%rbx),%edi
  test   %edi,%edi
  je     L0
  mov    0x8(%rbx),%esi
  test   %esi,%esi
  je     L103
  mov    0xc(%rbx),%ecx
  test   %ecx,%ecx
  je     L62
  mov    0x10(%rbx),%edx
  test   %edx,%edx
  je     L35
  mov    0x14(%rbx),%eax
  test   %eax,%eax
  je     L56
  cmpl   $0x1,0x18(%rbx)
  sbb    %eax,%eax
  and    $0x6,%eax
L76:
  mov    0xb8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L118
  add    $0xc0,%rsp
  pop    %rbx
  ret
L0:
  mov    $0x1,%eax
  jmp    L76
L35:
  mov    $0x4,%eax
  jmp    L76
L62:
  mov    $0x3,%eax
  jmp    L76
L103:
  mov    $0x2,%eax
  jmp    L76
L56:
  mov    $0x5,%eax
  jmp    L76
L118:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int bot(int grid[6][7], int move) {
  int i, j, k;
  int mygrid[6][7];
  int lastX = 0, lastY = 0;
  int l = 0;
  for (j = 5; j >= 0; j--, l++)
    for (k = 0; k < 7; k++)
      mygrid[l][k] = grid[j][k];
  i = nxtMoveAV(mygrid, move, &lastX, &lastY);
  if (grid[0][i] == 0 && i < 7)
    return i;
  else {
    for (j = 0; j < 7; j++)
      if (grid[0][j] == 0)
        return j;
  }
  return 0;
}
```