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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x90,%edx
  mov    $0x2e,%esi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x178,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x168(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rdi
  lea    0x150(%rsp),%r14
  mov    %rdi,0x18(%rsp)
  call   <memset@plt>
  mov    $0x90,%edx
  mov    $0x2e,%esi
  lea    0xc0(%rsp),%rax
  mov    %rax,%rdi
  mov    %rax,0x28(%rsp)
  call   <memset@plt>
  lea    0x48(%rsp),%rax
  movl   $0x0,0x14(%rsp)
  mov    %rax,0x20(%rsp)
  lea    0xa8(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    %r14,%rax
  mov    %r12d,%r14d
  mov    %rax,%r12
L118:
  addl   $0x1,0x14(%rsp)
  mov    0x20(%rsp),%rsi
  mov    $0x2,%ebx
  mov    %ebp,%r8d
  mov    %r13d,%ebp
  mov    %r12,%r13
  mov    %ebx,%r12d
  mov    %rsi,%rbx
  xchg   %ax,%ax
L102:
  mov    %r13,%rdi
  mov    %r8d,0x10(%rsp)
  call   <gets@plt>
  mov    0x10(%rsp),%r8d
  xor    %eax,%eax
  jmp    L15
  cs nopw 0x0(%rax,%rax,1)
L112:
  cmp    $0x4b,%dl
  cmove  %ecx,%r14d
  cmove  %r12d,%r15d
  add    $0x1,%rax
  cmp    $0x8,%rax
  je     L106
L15:
  movzbl 0x0(%r13,%rax,1),%edx
  lea    0x2(%rax),%ecx
  mov    %dl,0x2(%rbx,%rax,1)
  cmp    $0x6b,%dl
  jne    L112
  add    $0x1,%rax
  mov    %ecx,%r8d
  mov    %r12d,%ebp
  cmp    $0x8,%rax
  jne    L15
L106:
  add    $0x1,%r12d
  add    $0xc,%rbx
  cmp    %rbx,0x8(%rsp)
  jne    L102
  mov    %r13,%r12
  mov    %ebp,%r13d
  mov    %r8d,%ebp
  mov    %r12,%rdi
  call   <gets@plt>
  mov    0x18(%rsp),%rbx
  mov    0x28(%rsp),%rsi
  mov    $0x90,%edx
  mov    %rbx,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  je     L73
  mov    %ebp,%edx
  mov    %r13d,%esi
  mov    %rbx,%rdi
  call   <check_the_check@plt>
  test   %rax,%rax
  je     L52
  mov    0x14(%rsp),%esi
  lea    D0(%rip),%rdi
  call   <printf@plt>
  jmp    L118
L52:
  mov    0x18(%rsp),%rdi
  mov    %r15d,%esi
  mov    %r14d,%edx
  call   <check_the_check@plt>
  mov    0x14(%rsp),%esi
  test   %rax,%rax
  je     L85
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L118
L85:
  lea    D5(%rip),%rdi
  call   <printf@plt>
  jmp    L118
L73:
  mov    0x168(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L43
  add    $0x178,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L43:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D0
type: string
name: retrieve_data
arguments: tag: D9
type: string
name: retrieve_data
arguments: tag: D5
type: string

tool: D0: Game #%d: black king is in check.


tool: D9: Game #%d: white king is in check.


tool: D5: Game #%d: no king is in check.


assistant: ```c
int main() {
  char chess_board[12][12];
  char empty_board[12][12];
  char line[16], piece;
  int count, i, j;
  int i_black_king, j_black_king, i_white_king, j_white_king;
  memset(chess_board, '.', 12 * 12 * sizeof(char));
  memset(empty_board, '.', 12 * 12 * sizeof(char));
  count = 0;
  while (1) {
    ++count;
    for (i = 0; i < 8; i++) {
      gets(line);
      for (j = 0; j < 8; j++) {
        piece = chess_board[i + 2][j + 2] = line[j];
        if (piece == 'k')
          i_black_king = i + 2, j_black_king = j + 2;
        else if (piece == 'K')
          i_white_king = i + 2, j_white_king = j + 2;
      }
    }
    gets(line);
    if (memcmp(chess_board, empty_board, 12 * 12 * sizeof(char)) == 0)
      break;
    if (check_the_check(chess_board, i_black_king, j_black_king))
      printf("Game #%d: black king is in check.\n", count);
    else if (check_the_check(chess_board, i_white_king, j_white_king))
      printf("Game #%d: white king is in check.\n", count);
    else
      printf("Game #%d: no king is in check.\n", count);
  }
  return 0;
}
```