user: 请将以下的汇编代码转换成C语言代码：

```asm
<find_nw2se>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %edx,%r15d
  mov    %ecx,%r14d
  movl   $0x0,0x18(%rsp)
  test   %edx,%edx
  jg     L175
L23:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L6:
  movslq %r13d,%rax
  lea    (%rax,%rax,4),%rax
  mov    0x8(%rsp),%rcx
  lea    (%rcx,%rax,8),%rdx
  movslq %r12d,%rax
  movzbl (%rdx,%rax,1),%eax
  cmp    %al,(%rbx)
  je     L122
  movslq %ebp,%rbp
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax,%rbp,1)
  jne    L10
L56:
  mov    (%rsp),%rax
  movzbl (%rax),%edi
  test   %dil,%dil
  je     L10
  mov    0x18(%rsp),%eax
  mov    %eax,0x1c(%rsp)
  mov    0x14(%rsp),%r13d
  mov    (%rsp),%rbx
  mov    $0x0,%ebp
  jmp    L65
L122:
  add    $0x1,%ebp
  add    $0x1,%r13d
  add    $0x1,%r12d
L154:
  movslq %ebp,%rbx
  add    (%rsp),%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L56
  cmp    %r15d,%r13d
  jge    L10
  cmp    %r14d,%r12d
  jge    L10
L205:
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L6
  add    $0x1,%ebp
  jmp    L154
L133:
  movslq 0x1c(%rsp),%rax
  lea    (%rax,%rax,4),%rax
  mov    0x8(%rsp),%rsi
  lea    (%rsi,%rax,8),%r12
  movslq %r13d,%rax
  movzbl (%r12,%rax,1),%edi
  cmp    %dil,(%rbx)
  je     L197
L216:
  movslq %ebp,%rbx
  add    (%rsp),%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L10
L65:
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L133
  add    $0x1,%ebp
  jmp    L216
L197:
  movsbl %dil,%edi
  call   <toupper@plt>
  mov    %eax,%edx
  movslq %r13d,%rax
  mov    %dl,(%r12,%rax,1)
  add    $0x1,%ebp
  addl   $0x1,0x1c(%rsp)
  add    $0x1,%r13d
  jmp    L216
L10:
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  cmp    %eax,%r14d
  je     L194
L211:
  mov    (%rsp),%rax
  movzbl (%rax),%edi
  test   %dil,%dil
  je     L10
  cmp    0x18(%rsp),%r15d
  jle    L10
  cmp    0x14(%rsp),%r14d
  jle    L10
  mov    0x18(%rsp),%r13d
  mov    0x14(%rsp),%r12d
  mov    (%rsp),%rbx
  mov    $0x0,%ebp
  jmp    L205
L194:
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  cmp    %eax,%r15d
  je     L23
L175:
  movl   $0x0,0x14(%rsp)
  test   %r14d,%r14d
  jg     L211
  jmp    L194
```

assistant: ```c
void find_nw2se(char word[], char board[40][40], int nrows, int ncols) {
  int i, j;
  for (i = 0; i < nrows; i++) {
    for (j = 0; j < ncols; j++) {
      int k = 0;
      int match = 1;
      int h = j, m = i;
      ;
      while (word[k] != '\0' && m < nrows && h < ncols && match) {
        if (isspace(word[k])) {
          k++;
        } else if (word[k] == board[m][h]) {
          k++;
          m++;
          h++;
        } else {
          match = 0;
        }
      }
      if (word[k] == '\0') {
        k = 0;
        h = j;
        m = i;
        while (word[k] != '\0') {
          if (isspace(word[k])) {
            k++;
          } else if (word[k] == board[m][h]) {
            board[m][h] = toupper(board[m][h]);
            k++;
            m++;
            h++;
          }
        }
      }
    }
  }
}
```