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

```asm
<checkers>:
  endbr64
  movslq %r8d,%r8
  mov    %rdx,%r9
  movslq %edi,%r10
  mov    (%rcx,%r8,4),%ecx
  mov    %ecx,%eax
  cltd
  idiv   %edi
  mov    %ecx,%eax
  sub    %edx,%eax
  mov    %edx,%r8d
  cltd
  idiv   %edi
  cltd
  idiv   %esi
  test   %r8d,%r8d
  jle    L220
  sub    $0x1,%edi
  cmp    %r8d,%edi
  jg     L115
  test   %edx,%edx
  jle    L126
  sub    $0x1,%esi
  cmp    %edx,%esi
  jg     L210
  lea    -0x1(%rdx),%ecx
  movslq %r8d,%rsi
  mov    $0x1,%r11d
  movslq %ecx,%rax
  imul   %r10,%rax
  lea    (%r9,%rax,1),%rdi
  cmpb   $0x78,(%rdi,%rsi,1)
  je     L63
  add    %r10,%rax
  lea    -0x1(%r8),%edi
  add    %r9,%rax
  movslq %edi,%rdi
  cmpb   $0x78,(%rax,%rdi,1)
  je     L53
L286:
  movslq %ecx,%rcx
  mov    $0x1,%r11d
  imul   %r10,%rcx
  add    %r9,%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  je     L63
  lea    0x1(%r8),%ecx
L296:
  movslq %ecx,%rdi
  cmpb   $0x78,(%rax,%rdi,1)
  jne    L44
L185:
  mov    $0x2,%r11d
  mov    %r11d,%eax
  ret
L115:
  test   %edx,%edx
  jle    L100
  movslq %edx,%rax
  lea    -0x1(%r8),%ecx
  sub    $0x1,%esi
  imul   %r10,%rax
  movslq %ecx,%rcx
  add    %r9,%rax
  movzbl (%rax,%rcx,1),%ecx
  cmp    %edx,%esi
  jle    L173
L307:
  mov    $0x4,%r11d
  cmp    $0x78,%cl
  je     L63
  movslq %r8d,%rsi
L294:
  lea    -0x1(%rdx),%ecx
  mov    $0x1,%r11d
  movslq %ecx,%rcx
  imul   %r10,%rcx
  add    %r9,%rcx
  movzbl (%rcx,%rsi,1),%ecx
  cmp    $0x78,%cl
  je     L63
  lea    0x1(%r8),%ecx
L44:
  movslq %ecx,%rcx
  cmpb   $0x78,(%rax,%rcx,1)
  je     L185
  add    $0x1,%edx
  xor    %r11d,%r11d
  movslq %edx,%rdx
  imul   %r10,%rdx
  add    %r9,%rdx
  cmpb   $0x78,(%rdx,%rsi,1)
  sete   %r11b
  lea    (%r11,%r11,2),%r11d
L63:
  mov    %r11d,%eax
  ret
  nop
L220:
  test   %edx,%edx
  jle    L66
  sub    $0x1,%esi
  cmp    %edx,%esi
  jle    L94
  lea    0x1(%rdx),%eax
  movslq %r8d,%rsi
  cltq
  imul   %r10,%rax
  lea    (%r9,%rax,1),%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  je     L58
  lea    (%r10,%r10,1),%rcx
  mov    $0x1,%r11d
  sub    %rcx,%rax
  lea    (%r9,%rax,1),%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  je     L63
  add    %r10,%rax
  lea    0x1(%r8),%ecx
  add    %r9,%rax
  movslq %ecx,%rcx
  cmpb   $0x78,(%rax,%rcx,1)
  je     L185
  lea    -0x1(%r8),%ecx
  movslq %ecx,%rcx
  movzbl (%rax,%rcx,1),%ecx
  jmp    L307
  nopl   0x0(%rax,%rax,1)
L126:
  lea    0x1(%rdx),%eax
  movslq %r8d,%rsi
  cltq
  imul   %r10,%rax
  lea    (%r9,%rax,1),%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  je     L58
L303:
  sub    %r10,%rax
  lea    -0x1(%r8),%ecx
  add    %r9,%rax
  movslq %ecx,%rcx
  cmpb   $0x78,(%rax,%rcx,1)
  je     L53
  lea    0x1(%r8),%ecx
  mov    $0x2,%r11d
  movslq %ecx,%rcx
  cmpb   $0x78,(%rax,%rcx,1)
  jne    L294
  jmp    L63
  nopl   0x0(%rax)
L94:
  lea    -0x1(%rdx),%eax
  movslq %r8d,%rsi
  mov    $0x1,%r11d
  cltq
  imul   %r10,%rax
  lea    (%r9,%rax,1),%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  je     L63
  add    %r10,%rax
  lea    0x1(%r8),%ecx
  add    %r9,%rax
  movslq %ecx,%rdi
  cmpb   $0x78,(%rax,%rdi,1)
  je     L185
  sub    $0x1,%r8d
  movslq %r8d,%r8
  cmpb   $0x78,(%rax,%r8,1)
  jne    L296
  nopl   0x0(%rax)
L53:
  mov    $0x4,%r11d
  jmp    L63
  nopl   0x0(%rax,%rax,1)
L100:
  lea    0x1(%rdx),%eax
  movslq %r8d,%rsi
  mov    $0x3,%r11d
  cltq
  imul   %r10,%rax
  lea    (%r9,%rax,1),%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  jne    L303
  jmp    L63
  nopl   (%rax)
L66:
  lea    0x1(%rdx),%eax
  movslq %r8d,%rsi
  cltq
  imul   %r10,%rax
  lea    (%r9,%rax,1),%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  je     L58
  sub    %r10,%rax
  lea    0x1(%r8),%ecx
  add    %r9,%rax
  movslq %ecx,%rcx
  cmpb   $0x78,(%rax,%rcx,1)
  je     L185
L20:
  lea    -0x1(%r8),%ecx
  movslq %ecx,%rcx
  cmpb   $0x78,(%rax,%rcx,1)
  jne    L294
  jmp    L53
  nopl   0x0(%rax)
L173:
  cmp    $0x78,%cl
  je     L53
  movslq %r8d,%rsi
  lea    -0x1(%rdx),%ecx
  jmp    L286
  nopl   0x0(%rax)
L210:
  lea    0x1(%rdx),%eax
  movslq %r8d,%rsi
  cltq
  imul   %r10,%rax
  lea    (%r9,%rax,1),%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  je     L58
  lea    (%r10,%r10,1),%rcx
  mov    $0x1,%r11d
  sub    %rcx,%rax
  lea    (%r9,%rax,1),%rcx
  cmpb   $0x78,(%rcx,%rsi,1)
  je     L63
  add    %r10,%rax
  add    %r9,%rax
  jmp    L20
  nopl   0x0(%rax)
L58:
  mov    $0x3,%r11d
  jmp    L63
```

assistant: ```c
int checkers(int w, int h, char board[h][w], int stack[w * h], int tail, int done[h][w]) {
  int x = stack[tail] % w;
  int y = (stack[tail] - x) / w % h;
  if (x <= 0) {
    if (y <= 0) {
      if (board[y + 1][x] == 'x')
        return 3;
      else if (board[y][x + 1] == 'x')
        return 2;
    } else if (y >= h - 1) {
      if (board[y - 1][x] == 'x')
        return 1;
      else if (board[y][x + 1] == 'x')
        return 2;
    } else {
      if (board[y + 1][x] == 'x')
        return 3;
      else if (board[y - 1][x] == 'x')
        return 1;
      else if (board[y][x + 1] == 'x')
        return 2;
    }
  } else if (x >= w - 1) {
    if (y <= 0) {
      if (board[y + 1][x] == 'x')
        return 3;
      else if (board[y][x - 1] == 'x')
        return 4;
    } else if (y >= h - 1) {
      if (board[y - 1][x] == 'x')
        return 1;
      else if (board[y][x - 1] == 'x')
        return 4;
    } else {
      if (board[y + 1][x] == 'x')
        return 3;
      else if (board[y - 1][x] == 'x')
        return 1;
      else if (board[y][x - 1] == 'x')
        return 4;
    }
  }
  if (y <= 0) {
    if (board[y + 1][x] == 'x')
      return 3;
    else if (board[y][x - 1] == 'x')
      return 4;
    else if (board[y][x + 1] == 'x')
      return 2;
  } else if (y >= h - 1) {
    if (board[y][x - 1] == 'x')
      return 4;
    else if (board[y - 1][x] == 'x')
      return 1;
    else if (board[y][x + 1] == 'x')
      return 2;
  }
  if (board[y][x - 1] == 'x')
    return 4;
  else if (board[y - 1][x] == 'x')
    return 1;
  else if (board[y][x + 1] == 'x')
    return 2;
  else if (board[y + 1][x] == 'x')
    return 3;
  return 0;
}
```