user: 请从给定的汇编指令推导出C源代码:

```asm
<check_pos>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%r8d
  mov    %ecx,%r9d
  test   %ecx,%ecx
  jle    L112
  movslq %edx,%r10
  shl    $0x2,%r10
  mov    %rdi,%rdx
  lea    -0x1(%rcx),%ebp
  lea    0x8(%rdi,%rbp,8),%rbx
  mov    $0x0,%eax
  mov    $0xa,%r11d
L25:
  mov    (%rdx),%rcx
  cmpl   $0x14,(%rcx,%r10,1)
  cmove  %r11d,%eax
  add    $0x8,%rdx
  cmp    %rbx,%rdx
  jne    L25
  movslq %esi,%rdx
  mov    (%rdi,%rdx,8),%rdx
  lea    (%rdx,%rbp,4),%r11
  mov    $0xa,%r10d
  jmp    L133
L69:
  mov    %rcx,%rdx
L133:
  cmpl   $0x14,(%rdx)
  cmove  %r10d,%eax
  lea    0x4(%rdx),%rcx
  cmp    %r11,%rdx
  jne    L69
L128:
  cmp    %r8d,%esi
  mov    %r8d,%edx
  cmovge %esi,%edx
  cmp    %edx,%r9d
  jle    L104
  lea    0x1(%rsi),%edx
  movslq %edx,%rdx
  movslq %r8d,%r10
  shl    $0x2,%r10
  mov    $0xa,%ebp
  mov    %r8d,%ebx
  sub    %esi,%ebx
L99:
  mov    -0x8(%rdi,%rdx,8),%rcx
  cmpl   $0x14,(%rcx,%r10,1)
  cmove  %ebp,%eax
  lea    (%rbx,%rdx,1),%ecx
  cmp    %edx,%ecx
  cmovl  %edx,%ecx
  add    $0x1,%rdx
  add    $0x4,%r10
  cmp    %r9d,%ecx
  jl     L99
L104:
  mov    %esi,%r11d
  not    %r11d
  shr    $0x1f,%r11d
  mov    %r8d,%r13d
  not    %r13d
  shr    $0x1f,%r13d
  mov    %esi,%ebx
  or     %r8d,%ebx
  js     L27
  lea    -0x1(%rsi),%ecx
  movslq %ecx,%rcx
  movslq %r8d,%rbx
  shl    $0x2,%rbx
  mov    $0xa,%r12d
  mov    %r8d,%ebp
  sub    %esi,%ebp
L15:
  mov    0x8(%rdi,%rcx,8),%rdx
  cmpl   $0x14,(%rdx,%rbx,1)
  cmove  %r12d,%eax
  lea    0x0(%rbp,%rcx,1),%edx
  not    %edx
  shr    $0x1f,%edx
  mov    %ecx,%r10d
  not    %r10d
  shr    $0x1f,%r10d
  sub    $0x1,%rcx
  sub    $0x4,%rbx
  test   %r10b,%dl
  jne    L15
L27:
  cmp    %esi,%r9d
  jle    L134
  test   %r13b,%r13b
  je     L134
  lea    0x1(%rsi),%ecx
  movslq %ecx,%rcx
  movslq %r8d,%r10
  shl    $0x2,%r10
  mov    $0xa,%r12d
  lea    (%rsi,%r8,1),%ebp
L61:
  mov    -0x8(%rdi,%rcx,8),%rdx
  cmpl   $0x14,(%rdx,%r10,1)
  cmove  %r12d,%eax
  mov    %ebp,%edx
  sub    %ecx,%edx
  not    %edx
  shr    $0x1f,%edx
  cmp    %ecx,%r9d
  setg   %bl
  add    $0x1,%rcx
  sub    $0x4,%r10
  test   %dl,%bl
  jne    L61
L134:
  cmp    %r8d,%r9d
  jle    L140
  test   %r11b,%r11b
  je     L140
  lea    -0x1(%rsi),%edx
  movslq %edx,%rdx
  movslq %r8d,%r10
  shl    $0x2,%r10
  mov    $0xa,%r11d
  add    %r8d,%esi
L149:
  mov    0x8(%rdi,%rdx,8),%rcx
  cmpl   $0x14,(%rcx,%r10,1)
  cmove  %r11d,%eax
  mov    %esi,%ecx
  sub    %edx,%ecx
  cmp    %r9d,%ecx
  setl   %r8b
  mov    %edx,%ecx
  not    %ecx
  shr    $0x1f,%ecx
  sub    $0x1,%rdx
  add    $0x4,%r10
  test   %cl,%r8b
  jne    L149
L140:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L112:
  mov    $0x0,%eax
  jmp    L128
```

assistant: ```c
int check_pos(int **board, int x, int y, int q) {
  int i = 0, j = 0;
  int flag = 0;
  for (i = 0; i < q; i++) {
    j = y;
    if (board[i][j] == 20) {
      flag = 10;
    }
  }
  for (j = 0; j < q; j++) {
    i = x;
    if (board[i][j] == 20) {
      flag = 10;
    }
  }
  for (i = x, j = y; i < q && j < q; i++, j++) {
    if (board[i][j] == 20) {
      flag = 10;
    }
  }
  for (i = x, j = y; i >= 0 && j >= 0; i--, j--) {
    if (board[i][j] == 20) {
      flag = 10;
    }
  }
  for (i = x, j = y; i < q && j >= 0; i++, j--) {
    if (board[i][j] == 20) {
      flag = 10;
    }
  }
  for (i = x, j = y; i >= 0 && j < q; i--, j++) {
    if (board[i][j] == 20) {
      flag = 10;
    }
  }
  return flag;
}
```