user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<isMatched>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  sub    $0x50,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    %r8d,-0x5c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rsi
  movl   $0x0,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L19:
  cmp    %rdx,%rsp
  je     L81
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L19
L81:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L150
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L150:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x20(%rbp)
  movl   $0x1,-0x2c(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L177
L97:
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x34(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L72
  addl   $0x1,-0x3c(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  movb   $0x62,(%rdx,%rax,1)
  jmp    L178
L72:
  mov    -0x20(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  movb   $0x2e,(%rdx,%rax,1)
L178:
  addl   $0x1,-0x34(%rbp)
L177:
  mov    -0x34(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L97
  mov    -0x3c(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  je     L76
  mov    $0x0,%eax
  jmp    L129
L76:
  movl   $0x0,-0x34(%rbp)
  jmp    L50
L173:
  mov    -0x20(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x62,%al
  je     L65
  movl   $0x0,-0x2c(%rbp)
  jmp    L215
L65:
  movl   $0x1,-0x2c(%rbp)
L215:
  movl   $0x0,-0x30(%rbp)
  jmp    L191
L43:
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x34(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L112
  mov    -0x20(%rbp),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L112
  addl   $0x1,-0x38(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  movb   $0x77,(%rdx,%rax,1)
  movl   $0x1,-0x2c(%rbp)
L112:
  addl   $0x1,-0x30(%rbp)
L191:
  mov    -0x30(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jge    L179
  cmpl   $0x0,-0x2c(%rbp)
  je     L43
L179:
  addl   $0x1,-0x34(%rbp)
L50:
  mov    -0x34(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L173
  mov    -0x3c(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jne    L159
  mov    -0x38(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jne    L159
  mov    $0x1,%eax
  jmp    L129
L159:
  mov    $0x0,%eax
L129:
  mov    %rsi,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L139
  call   <__stack_chk_fail@plt>
L139:
  lea    -0x10(%rbp),%rsp
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
int isMatched(int n, char *key, char *guess, int wpeg, int bpeg) {
  int bctr = 0, wctr = 0;
  int i;
  char result[n];
  int m;
  bool check = true;
  for (i = 0; i < n; i++) {
    if (key[i] == guess[i]) {
      bctr++;
      result[i] = 'b';
    } else {
      result[i] = '.';
    }
  }
  if (bctr != bpeg)
    return 0;
  for (i = 0; i < n; i++) {
    if (result[i] != 'b') {
      check = false;
    } else {
      check = true;
    }
    for (m = 0; m < n && check == false; m++) {
      if (key[m] == guess[i] && result[m] == '.') {
        wctr++;
        result[m] = 'w';
        check = true;
      }
    }
  }
  if (bctr == bpeg && wctr == wpeg)
    return 1;
  else
    return 0;
}
```