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

```asm
<rgrep_matches>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    %rsi,%rdi
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <strleng@plt>
  mov    %r12,%rdi
  movslq %eax,%rbx
  call   <strleng@plt>
  mov    %rbp,%rdi
  mov    %eax,%r13d
  call   <checkSpecial@plt>
  cmp    $0x1388,%rax
  je     L213
  mov    %rbp,%rdi
  call   <checkSpecial@plt>
  movzbl 0x0(%rbp,%rax,1),%eax
  cmp    $0x2e,%al
  je     L86
  cmp    $0x3f,%al
  je     L128
  cmp    $0x2b,%al
  je     L136
L124:
  xor    %eax,%eax
L71:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L213:
  movsbl 0x0(%rbp),%esi
  mov    %r12,%rdi
  call   <firstOccur@plt>
  movslq %eax,%r13
  test   %ebx,%ebx
  je     L73
  cmp    $0x1388,%r13d
  setne  %al
  cmp    $0x1,%ebx
  je     L99
  jle    L124
  test   %al,%al
  je     L124
  mov    %r12,%rdi
  add    %r13,%r12
  call   <strleng@plt>
  mov    $0x1,%edx
  jmp    L8
  xchg   %ax,%ax
L191:
  movzbl (%r12,%rdx,1),%ecx
  cmp    %cl,0x0(%rbp,%rdx,1)
  jne    L124
  add    $0x1,%rdx
  cmp    %rbx,%rdx
  je     L73
L8:
  cmp    %edx,%eax
  jg     L191
  jmp    L124
  nopw   0x0(%rax,%rax,1)
L136:
  cmp    $0x1,%ebx
  je     L73
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <morePlus@plt>
  test   %eax,%eax
  je     L125
L73:
  add    $0x8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L128:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <questionMark@plt>
  test   %eax,%eax
  setne  %al
  add    $0x8,%rsp
  pop    %rbx
  movzbl %al,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L99:
  movzbl %al,%eax
  jmp    L71
  nopl   0x0(%rax,%rax,1)
L86:
  mov    %rbp,%rdi
  call   <sameChar@plt>
  test   %eax,%eax
  je     L135
  xor    %eax,%eax
  cmp    %r13d,%ebx
  sete   %al
  jmp    L71
  nopl   0x0(%rax)
L125:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <patternPlus@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  jmp    L71
  nopl   0x0(%rax,%rax,1)
L135:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <matchPatternDots@plt>
  test   %eax,%eax
  jne    L73
  mov    $0x2b,%esi
  mov    %rbp,%rdi
  call   <firstOccur@plt>
  cmp    $0x1388,%eax
  je     L124
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <afterPlus@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  jmp    L71
```

assistant: ```c
int rgrep_matches(char *line, char *pattern) {
  int n = strleng(pattern);
  int m = strleng(line);
  if (checkSpecial(pattern) != 5000) {
    switch (pattern[checkSpecial(pattern)]) {
    case '.':
      if (sameChar(pattern)) {
        if (m == n)
          return 1;
        else
          return 0;
      } else if (matchPatternDots(pattern, line)) {
        return 1;
      } else if (firstOccur(pattern, '+') != 5000) {
        if (afterPlus(pattern, line))
          return 1;
      } else
        return 0;
    case '\\':
      return 0;
    case '+':
      if (n == 1)
        return 1;
      if (morePlus(pattern, line))
        return 1;
      if (patternPlus(pattern, line))
        return 1;
      return 0;
    case '?':
      if (questionMark(pattern, line))
        return 1;
      return 0;
    default:
      return 0;
    }
  } else {
    int matches = 0;
    int index = firstOccur(line, pattern[0]);
    if (n == 0) {
      return 1;
    } else if (n == 1) {
      if (index != 5000) {
        return 1;
      }
    } else if (n > 1) {
      if (index != 5000) {
        matches++;
        for (int i = 1, l = strleng(line); i < l; i++) {
          if (pattern[i] == line[index + i]) {
            matches++;
            if (matches == n) {
              return 1;
            }
          } else
            return 0;
        }
      } else
        return 0;
    }
    return 0;
  }
  return 0;
}
```