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
  mov    %rdi,0x18(%rsp)
  call   <memset@plt>
  mov    $0x90,%edx
  mov    $0x2e,%esi
  lea    0xc0(%rsp),%rax
  mov    %rax,%rdi
  mov    %rax,0x20(%rsp)
  call   <memset@plt>
  lea    0x4a(%rsp),%rax
  movl   $0x0,0x14(%rsp)
  mov    %rax,0x28(%rsp)
  lea    0xaa(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x150(%rsp),%rax
  mov    %rax,(%rsp)
  nopl   0x0(%rax,%rax,1)
L182:
  mov    %r14d,%eax
  addl   $0x1,0x14(%rsp)
  mov    %r13d,%r14d
  mov    0x28(%rsp),%rbx
  mov    $0x2,%ebp
  mov    %eax,%r13d
  jmp    L49
  nopl   (%rax)
L57:
  cmp    $0x4b,%al
  mov    $0x2,%eax
  cmove  %eax,%r15d
  movzbl 0x151(%rsp),%eax
  cmove  %ebp,%r12d
  mov    %al,0x1(%rbx)
  cmp    $0x6b,%al
  je     L229
L38:
  cmp    $0x4b,%al
  mov    $0x3,%eax
  cmove  %eax,%r15d
  movzbl 0x152(%rsp),%eax
  cmove  %ebp,%r12d
  mov    %al,0x2(%rbx)
  cmp    $0x6b,%al
  je     L128
L238:
  cmp    $0x4b,%al
  mov    $0x4,%eax
  cmove  %eax,%r15d
  movzbl 0x153(%rsp),%eax
  cmove  %ebp,%r12d
  mov    %al,0x3(%rbx)
  cmp    $0x6b,%al
  je     L167
L110:
  cmp    $0x4b,%al
  mov    $0x5,%eax
  cmove  %eax,%r15d
  movzbl 0x154(%rsp),%eax
  cmove  %ebp,%r12d
  mov    %al,0x4(%rbx)
  cmp    $0x6b,%al
  je     L39
L207:
  cmp    $0x4b,%al
  mov    $0x6,%eax
  cmove  %eax,%r15d
  movzbl 0x155(%rsp),%eax
  cmove  %ebp,%r12d
  mov    %al,0x5(%rbx)
  cmp    $0x6b,%al
  je     L179
L132:
  cmp    $0x4b,%al
  mov    $0x7,%eax
  cmove  %eax,%r15d
  movzbl 0x156(%rsp),%eax
  cmove  %ebp,%r12d
  mov    %al,0x6(%rbx)
  cmp    $0x6b,%al
  je     L152
L234:
  cmp    $0x4b,%al
  mov    $0x8,%eax
  cmove  %eax,%r15d
  movzbl 0x157(%rsp),%eax
  cmove  %ebp,%r12d
  mov    %al,0x7(%rbx)
  cmp    $0x6b,%al
  je     L138
L195:
  cmp    $0x4b,%al
  mov    $0x9,%eax
  cmove  %ebp,%r12d
  cmove  %eax,%r15d
  add    $0xc,%rbx
  add    $0x1,%ebp
  cmp    0x8(%rsp),%rbx
  je     L40
L49:
  mov    (%rsp),%rdi
  call   <gets@plt>
  movzbl 0x150(%rsp),%eax
  mov    %al,(%rbx)
  cmp    $0x6b,%al
  jne    L57
  movzbl 0x151(%rsp),%eax
  mov    %ebp,%r13d
  mov    $0x2,%r14d
  mov    %al,0x1(%rbx)
  cmp    $0x6b,%al
  jne    L38
L229:
  movzbl 0x152(%rsp),%eax
  mov    %ebp,%r13d
  mov    $0x3,%r14d
  mov    %al,0x2(%rbx)
  cmp    $0x6b,%al
  jne    L238
L128:
  movzbl 0x153(%rsp),%eax
  mov    %ebp,%r13d
  mov    $0x4,%r14d
  mov    %al,0x3(%rbx)
  cmp    $0x6b,%al
  jne    L110
L167:
  movzbl 0x154(%rsp),%eax
  mov    %ebp,%r13d
  mov    $0x5,%r14d
  mov    %al,0x4(%rbx)
  cmp    $0x6b,%al
  jne    L207
L39:
  movzbl 0x155(%rsp),%eax
  mov    %ebp,%r13d
  mov    $0x6,%r14d
  mov    %al,0x5(%rbx)
  cmp    $0x6b,%al
  jne    L132
L179:
  movzbl 0x156(%rsp),%eax
  mov    %ebp,%r13d
  mov    $0x7,%r14d
  mov    %al,0x6(%rbx)
  cmp    $0x6b,%al
  jne    L234
L152:
  movzbl 0x157(%rsp),%eax
  mov    %ebp,%r13d
  mov    $0x8,%r14d
  mov    %al,0x7(%rbx)
  cmp    $0x6b,%al
  jne    L195
L138:
  mov    %ebp,%r13d
  mov    $0x9,%r14d
  add    $0xc,%rbx
  add    $0x1,%ebp
  cmp    0x8(%rsp),%rbx
  jne    L49
L40:
  mov    (%rsp),%rdi
  mov    %r13d,%eax
  mov    %r14d,%r13d
  mov    %eax,%r14d
  call   <gets@plt>
  mov    0x18(%rsp),%rbx
  mov    0x20(%rsp),%rsi
  mov    $0x90,%edx
  mov    %rbx,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  je     L176
  mov    %r13d,%edx
  mov    %r14d,%esi
  mov    %rbx,%rdi
  call   <check_the_check@plt>
  test   %rax,%rax
  je     L24
  mov    0x14(%rsp),%esi
  lea    D5(%rip),%rdi
  call   <printf@plt>
  jmp    L182
L24:
  mov    0x18(%rsp),%rdi
  mov    %r12d,%esi
  mov    %r15d,%edx
  call   <check_the_check@plt>
  mov    0x14(%rsp),%esi
  test   %rax,%rax
  je     L15
  lea    D1(%rip),%rdi
  call   <printf@plt>
  jmp    L182
L15:
  lea    D12(%rip),%rdi
  call   <printf@plt>
  jmp    L182
L176:
  mov    0x168(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L52
  add    $0x178,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L52:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D5
type: string
name: disassemble_data
arguments: label: D1
type: string
name: disassemble_data
arguments: label: D12
type: string

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


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


tool: D12: 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;
}
```