user: Translate the below assembly code into C programming language:

```asm
<check_the_check>:
  endbr64
  movslq %esi,%rax
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    (%rax,%rax,2),%r12
  movslq %edx,%rax
  push   %rbp
  shl    $0x2,%r12
  mov    %rdi,%rbp
  push   %rbx
  lea    (%rdi,%r12,1),%r13
  mov    %edx,%ebx
  lea    -0x1(%rbx),%r14d
  movslq %r14d,%r15
  sub    $0x58,%rsp
  movsbl 0x0(%r13,%rax,1),%edi
  mov    %esi,0x48(%rsp)
  mov    %rax,0x18(%rsp)
  call   <islower@plt>
  lea    -0x18(%rbp,%r12,1),%r10
  mov    %r14d,0x14(%rsp)
  cmp    $0x1,%eax
  mov    %eax,%edx
  movl   $0x1,0x10(%rsp)
  sbb    %r8d,%r8d
  and    $0x20,%r8d
  add    $0x42,%r8d
  cmp    $0x1,%eax
  sbb    %edi,%edi
  and    $0x20,%edi
  add    $0x52,%edi
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0x20,%eax
  add    $0x4e,%eax
  cmp    $0x1,%edx
  sbb    %esi,%esi
  and    $0x20,%esi
  add    $0x51,%esi
  cmp    $0x1,%edx
  sbb    %ecx,%ecx
  and    $0x20,%ecx
  add    $0x50,%ecx
  cmp    %al,(%r10,%r15,1)
  je     L628
  lea    -0x2(%rbx),%r9d
  lea    -0xc(%rbp,%r12,1),%r11
  movslq %r9d,%r14
  mov    %r11,0x8(%rsp)
  mov    %r14,0x20(%rsp)
  cmp    %al,(%r11,%r14,1)
  je     L628
  lea    0x18(%rbp,%r12,1),%r11
  mov    %r11,0x28(%rsp)
  cmp    %al,(%r11,%r15,1)
  je     L628
  lea    0xc(%rbp,%r12,1),%r11
  mov    %r11,0x38(%rsp)
  cmp    %al,(%r11,%r14,1)
  je     L628
  lea    0x1(%rbx),%r14d
  movslq %r14d,%r11
  mov    %r14d,0x4c(%rsp)
  mov    %r11,0x30(%rsp)
  cmp    %al,(%r10,%r11,1)
  je     L628
  lea    0x2(%rbx),%r10d
  mov    0x8(%rsp),%r11
  movslq %r10d,%r14
  mov    %r14,0x40(%rsp)
  cmp    %al,(%r11,%r14,1)
  je     L628
  mov    0x28(%rsp),%r11
  mov    0x30(%rsp),%r14
  cmp    %al,(%r11,%r14,1)
  je     L628
  mov    0x38(%rsp),%r11
  mov    0x40(%rsp),%r14
  cmp    %al,(%r11,%r14,1)
  je     L628
  test   %edx,%edx
  je     L58
  cmp    %cl,(%r11,%r15,1)
  je     L628
  mov    0x30(%rsp),%r14
  cmp    %cl,(%r11,%r14,1)
  je     L628
L555:
  cmpl   $0x2,0x14(%rsp)
  movzbl 0x0(%r13,%r15,1),%eax
  jle    L841
  cmp    $0x2e,%al
  jne    L841
  cmp    $0x2,%r9d
  jle    L1127
  mov    0x20(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0x3(%rbx),%r9d
  cmp    $0x5,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0x4(%rbx),%r9d
  cmp    $0x6,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0x5(%rbx),%r9d
  cmp    $0x7,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0x6(%rbx),%r9d
  cmp    $0x8,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0x7(%rbx),%r9d
  cmp    $0x9,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0x8(%rbx),%r9d
  cmp    $0xa,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0x9(%rbx),%r9d
  cmp    $0xb,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0xa(%rbx),%r9d
  cmp    $0xc,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0xb(%rbx),%r9d
  cmp    $0xd,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0xc(%rbx),%r9d
  cmp    $0xe,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  lea    -0xd(%rbx),%r9d
  cmp    $0xf,%ebx
  je     L1065
  movslq %r9d,%r9
  movzbl 0x0(%r13,%r9,1),%eax
  cmp    $0x2e,%al
  jne    L841
  cmp    $0x10,%ebx
  je     L1065
  lea    -0xe(%rbx),%edx
  movslq %edx,%rdx
  jmp    L1081
  nopl   0x0(%rax,%rax,1)
L419:
  lea    -0x1(%rdx),%r9d
  sub    $0x1,%rdx
  cmp    $0x2,%edx
  jle    L421
L1081:
  movzbl 0x0(%r13,%rdx,1),%eax
  cmp    $0x2e,%al
  je     L419
  nopl   0x0(%rax,%rax,1)
L841:
  cmp    %al,%sil
  je     L615
  cmp    %al,%dil
  je     L615
  mov    0x30(%rsp),%rax
  cmpl   $0x8,0x4c(%rsp)
  movzbl 0x0(%r13,%rax,1),%eax
  jg     L1050
  cmp    $0x2e,%al
  jne    L1050
  cmp    $0x8,%r10d
  jg     L1187
  mov    0x40(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0x3(%rbx),%r10d
  cmp    $0x6,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0x4(%rbx),%r10d
  cmp    $0x5,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0x5(%rbx),%r10d
  cmp    $0x4,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0x6(%rbx),%r10d
  cmp    $0x3,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0x7(%rbx),%r10d
  cmp    $0x2,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0x8(%rbx),%r10d
  cmp    $0x1,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0x9(%rbx),%r10d
  test   %ebx,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0xa(%rbx),%r10d
  cmp    $0xffffffff,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0xb(%rbx),%r10d
  cmp    $0xfffffffe,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0xc(%rbx),%r10d
  cmp    $0xfffffffd,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  lea    0xd(%rbx),%r10d
  cmp    $0xfffffffc,%ebx
  je     L102
  movslq %r10d,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L1050
  cmp    $0xfffffffb,%ebx
  je     L102
  lea    0xe(%rbx),%edx
  movslq %edx,%rdx
  jmp    L403
  nopl   0x0(%rax,%rax,1)
L719:
  lea    0x1(%rdx),%r10d
  add    $0x1,%rdx
  cmp    $0x8,%edx
  jg     L242
L403:
  movzbl 0x0(%r13,%rdx,1),%eax
  cmp    $0x2e,%al
  je     L719
  nopl   0x0(%rax,%rax,1)
L1050:
  cmp    %al,%dil
  je     L615
  cmp    %al,%sil
  je     L615
  mov    0x48(%rsp),%eax
  lea    -0x1(%rax),%r9d
  mov    0x18(%rsp),%rax
  mov    %r9d,%edx
  add    %r12,%rax
  add    %rbp,%rax
  cmp    $0x2,%r9d
  jg     L599
  jmp    L1196
  nopl   0x0(%rax,%rax,1)
L1135:
  sub    $0x1,%edx
  sub    $0xc,%rax
  cmp    $0x2,%edx
  je     L831
L599:
  movzbl -0xc(%rax),%ecx
  cmp    $0x2e,%cl
  je     L1135
L893:
  cmp    %cl,%sil
  je     L615
  cmp    %cl,%dil
  je     L615
  mov    0x48(%rsp),%r10d
  mov    0x18(%rsp),%rax
  add    $0x1,%r10d
  add    %r12,%rax
  add    %rbp,%rax
  mov    %r10d,%edx
  cmp    $0x8,%r10d
  jle    L450
  jmp    L133
  nopl   (%rax)
L307:
  add    $0x1,%edx
  add    $0xc,%rax
  cmp    $0x9,%edx
  je     L359
L450:
  movzbl 0xc(%rax),%ecx
  cmp    $0x2e,%cl
  je     L307
L1049:
  cmp    %cl,%sil
  je     L615
  cmp    %cl,%dil
  je     L615
  cmp    $0x2,%r9d
  setg   %r11b
  cmpl   $0x2,0x14(%rsp)
  setg   %bl
  test   %r11b,%r11b
  je     L1273
  test   %bl,%bl
  je     L1273
  mov    0x18(%rsp),%rax
  mov    0x14(%rsp),%ecx
  mov    %r9d,%edx
  add    %r12,%rax
  add    %rbp,%rax
  jmp    L385
  nopl   0x0(%rax,%rax,1)
L284:
  sub    $0x1,%edx
  sub    $0x1,%ecx
  sub    $0xd,%rax
  cmp    $0x2,%edx
  jle    L392
  cmp    $0x2,%ecx
  jle    L392
L385:
  movzbl -0xd(%rax),%edi
  cmp    $0x2e,%dil
  je     L284
L65:
  cmp    %dil,%r8b
  je     L615
  cmp    %dil,%sil
  je     L615
  mov    0x4c(%rsp),%edx
  cmp    $0x8,%edx
  setle  %dil
  test   %r11b,%r11b
  je     L393
  mov    0x18(%rsp),%rax
  add    %r12,%rax
  add    %rbp,%rax
  test   %dil,%dil
  jne    L624
  jmp    L393
  nopl   0x0(%rax)
L287:
  sub    $0x1,%r9d
  add    $0x1,%edx
  sub    $0xb,%rax
  cmp    $0x2,%r9d
  jle    L1338
  cmp    $0x8,%edx
  jg     L1338
L624:
  movzbl -0xb(%rax),%ecx
  cmp    $0x2e,%cl
  je     L287
L964:
  cmp    %cl,%r8b
  je     L615
  cmp    %cl,%sil
  je     L615
  cmp    $0x8,%r10d
  setle  %dl
  test   %bl,%bl
  je     L161
  mov    0x18(%rsp),%rax
  mov    0x14(%rsp),%r11d
  mov    %r10d,%ecx
  add    %r12,%rax
  add    %rbp,%rax
  test   %dl,%dl
  jne    L139
  jmp    L161
  nopl   0x0(%rax)
L824:
  add    $0x1,%ecx
  sub    $0x1,%r11d
  add    $0xb,%rax
  cmp    $0x8,%ecx
  jg     L201
  cmp    $0x2,%r11d
  jle    L201
L139:
  movzbl 0xb(%rax),%r9d
  cmp    $0x2e,%r9b
  je     L824
L93:
  cmp    %r9b,%sil
  je     L615
  cmp    %r9b,%r8b
  je     L615
  test   %dil,%dil
  je     L348
  mov    0x18(%rsp),%rax
  mov    0x4c(%rsp),%ecx
  add    %r12,%rax
  add    %rbp,%rax
  test   %dl,%dl
  jne    L1156
  jmp    L348
  nopl   0x0(%rax)
L990:
  add    $0x1,%r10d
  add    $0x1,%ecx
  add    $0xd,%rax
  cmp    $0x8,%r10d
  jg     L1308
  cmp    $0x8,%ecx
  jg     L1308
L1156:
  movzbl 0xd(%rax),%edx
  cmp    $0x2e,%dl
  je     L990
L447:
  cmp    %dl,%r8b
  sete   %r11b
  cmp    %dl,%sil
  sete   %al
  or     %eax,%r11d
  movzbl %r11b,%eax
  mov    %eax,0x10(%rsp)
L628:
  mov    0x10(%rsp),%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L615:
  movl   $0x1,0x10(%rsp)
  jmp    L628
  nopw   0x0(%rax,%rax,1)
L58:
  mov    0x8(%rsp),%rax
  cmp    %cl,(%rax,%r15,1)
  je     L628
  mov    0x30(%rsp),%rdx
  movl   $0x1,0x10(%rsp)
  cmp    %cl,(%rax,%rdx,1)
  jne    L555
  jmp    L628
  nopl   0x0(%rax,%rax,1)
L1065:
  movq   $0x2,0x20(%rsp)
L1127:
  mov    0x20(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%eax
  jmp    L841
  nopl   0x0(%rax)
L102:
  movq   $0x9,0x40(%rsp)
L1187:
  mov    0x40(%rsp),%rax
  movzbl 0x0(%r13,%rax,1),%eax
  jmp    L1050
  nopl   0x0(%rax)
L831:
  mov    0x18(%rsp),%rax
  movzbl 0x18(%rbp,%rax,1),%ecx
  jmp    L893
  nop
L359:
  mov    0x18(%rsp),%rax
  movzbl 0x6c(%rbp,%rax,1),%ecx
  jmp    L1049
L392:
  movslq %edx,%rdx
  movslq %ecx,%rcx
  lea    (%rdx,%rdx,2),%rax
  lea    0x0(%rbp,%rax,4),%rax
  movzbl (%rax,%rcx,1),%edi
  jmp    L65
L1338:
  movslq %r9d,%r9
  movslq %edx,%rdx
  lea    (%r9,%r9,2),%rax
  lea    0x0(%rbp,%rax,4),%rax
  movzbl (%rax,%rdx,1),%ecx
  jmp    L964
L201:
  movslq %ecx,%rcx
  lea    (%rcx,%rcx,2),%rax
  lea    0x0(%rbp,%rax,4),%rcx
  movslq %r11d,%rax
  movzbl (%rcx,%rax,1),%r9d
  jmp    L93
L1196:
  mov    0x8(%rsp),%rax
  mov    0x18(%rsp),%rcx
  movzbl (%rax,%rcx,1),%ecx
  jmp    L893
L1308:
  movslq %r10d,%r10
  lea    (%r10,%r10,2),%rax
  lea    0x0(%rbp,%rax,4),%rdx
  movslq %ecx,%rax
  movzbl (%rdx,%rax,1),%edx
  jmp    L447
L133:
  mov    0x38(%rsp),%rax
  mov    0x18(%rsp),%rcx
  movzbl (%rax,%rcx,1),%ecx
  jmp    L1049
L421:
  movslq %r9d,%rax
  mov    %rax,0x20(%rsp)
  jmp    L1127
L1273:
  mov    0x8(%rsp),%rax
  movzbl (%rax,%r15,1),%edi
  jmp    L65
L242:
  movslq %r10d,%rax
  mov    %rax,0x40(%rsp)
  jmp    L1187
L393:
  mov    0x8(%rsp),%rax
  mov    0x30(%rsp),%rcx
  movzbl (%rax,%rcx,1),%ecx
  jmp    L964
L161:
  mov    0x38(%rsp),%rax
  movzbl (%rax,%r15,1),%r9d
  jmp    L93
L348:
  mov    0x38(%rsp),%rax
  mov    0x30(%rsp),%rcx
  movzbl (%rax,%rcx,1),%edx
  jmp    L447
```

assistant: ```c
int check_the_check(char chess_board[12][12], int i, int j) {
  int is_black_king;
  char king;
  char opp_king, opp_queen, opp_knight, opp_rook, opp_bishop, opp_pawn;
  int next_i, next_j;
  is_black_king = islower(chess_board[i][j]);
  opp_king = is_black_king ? 'K' : 'k';
  opp_queen = is_black_king ? 'Q' : 'q';
  opp_knight = is_black_king ? 'N' : 'n';
  opp_rook = is_black_king ? 'R' : 'r';
  opp_bishop = is_black_king ? 'B' : 'b';
  opp_pawn = is_black_king ? 'P' : 'p';
  if (chess_board[i - 2][j - 1] == opp_knight || chess_board[i - 1][j - 2] == opp_knight || chess_board[i + 2][j - 1] == opp_knight || chess_board[i + 1][j - 2] == opp_knight || chess_board[i - 2][j + 1] == opp_knight || chess_board[i - 1][j + 2] == opp_knight || chess_board[i + 2][j + 1] == opp_knight || chess_board[i + 1][j + 2] == opp_knight) {
    return 1;
  }
  if (is_black_king) {
    if (chess_board[i + 1][j - 1] == opp_pawn || chess_board[i + 1][j + 1] == opp_pawn)
      return 1;
  } else {
    if (chess_board[i - 1][j - 1] == opp_pawn || chess_board[i - 1][j + 1] == opp_pawn)
      return 1;
  }
  for (next_i = i, next_j = j - 1; next_j > 2; --next_j) {
    if (chess_board[next_i][next_j] != '.')
      break;
  }
  if (chess_board[next_i][next_j] == opp_rook || chess_board[next_i][next_j] == opp_queen) {
    return 1;
  };
  for (next_i = i, next_j = j + 1; next_j < 9; ++next_j) {
    if (chess_board[next_i][next_j] != '.')
      break;
  }
  if (chess_board[next_i][next_j] == opp_rook || chess_board[next_i][next_j] == opp_queen) {
    return 1;
  };
  for (next_i = i - 1, next_j = j; next_i > 2; --next_i) {
    if (chess_board[next_i][next_j] != '.')
      break;
  }
  if (chess_board[next_i][next_j] == opp_rook || chess_board[next_i][next_j] == opp_queen) {
    return 1;
  };
  for (next_i = i + 1, next_j = j; next_i < 9; ++next_i) {
    if (chess_board[next_i][next_j] != '.')
      break;
  }
  if (chess_board[next_i][next_j] == opp_rook || chess_board[next_i][next_j] == opp_queen) {
    return 1;
  };
  for (next_i = i - 1, next_j = j - 1; next_i > 2 && next_j > 2; --next_i, --next_j) {
    if (chess_board[next_i][next_j] != '.')
      break;
  }
  if (chess_board[next_i][next_j] == opp_bishop || chess_board[next_i][next_j] == opp_queen) {
    return 1;
  };
  for (next_i = i - 1, next_j = j + 1; next_i > 2 && next_j < 9; --next_i, ++next_j) {
    if (chess_board[next_i][next_j] != '.')
      break;
  }
  if (chess_board[next_i][next_j] == opp_bishop || chess_board[next_i][next_j] == opp_queen) {
    return 1;
  };
  for (next_i = i + 1, next_j = j - 1; next_i < 9 && next_j > 2; ++next_i, --next_j) {
    if (chess_board[next_i][next_j] != '.')
      break;
  }
  if (chess_board[next_i][next_j] == opp_bishop || chess_board[next_i][next_j] == opp_queen) {
    return 1;
  };
  for (next_i = i + 1, next_j = j + 1; next_i < 9 && next_j < 9; ++next_i, ++next_j) {
    if (chess_board[next_i][next_j] != '.')
      break;
  }
  if (chess_board[next_i][next_j] == opp_bishop || chess_board[next_i][next_j] == opp_queen) {
    return 1;
  };
  return 0;
}
```