user: 这段汇编代码用C语言表示是什么样的?

```asm
<formalBMStrstr>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x3c8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x13b8(%rsp)
  xor    %eax,%eax
  cmp    %ecx,%esi
  jl     L73
  mov    %rdi,%r13
  mov    %esi,%r14d
  mov    %rdx,%rbx
  mov    %ecx,%r12d
  mov    %r8d,%ebp
  sub    %ecx,%r14d
  lea    0x10(%rsp),%rdx
  mov    %ecx,%esi
  mov    %rbx,%rdi
  call   <makeBMTable1@plt>
  lea    0x410(%rsp),%rdx
  mov    %r12d,%esi
  mov    %rbx,%rdi
  call   <makeBMTable2@plt>
  movl   $0xffffffff,0xc(%rsp)
  mov    $0x0,%r15d
  mov    $0x0,%r11d
  mov    $0x1,%r10d
  cmp    %ebp,%r14d
  jge    L105
L94:
  mov    0x13b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L147
  mov    0xc(%rsp),%eax
  add    $0x13c8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L120:
  cmp    $0x78,%dl
  je     L50
  add    $0x1,%edi
L55:
  lea    -0x1(%rsi),%ecx
  sub    $0x1,%rax
  test   %eax,%eax
  jle    L167
L77:
  mov    %eax,%esi
  mov    %eax,%ecx
  movzbl -0x1(%r8,%rax,1),%edx
  cmp    %dl,-0x1(%rbx,%rax,1)
  je     L120
  cmp    $0x78,%dl
  je     L120
L167:
  test   %ecx,%ecx
  je     L33
  lea    0x0(%rbp,%rcx,1),%eax
  cltq
  movsbq -0x1(%r13,%rax,1),%rax
  mov    0x10(%rsp,%rax,4),%edx
  mov    %ecx,%eax
  test   %edx,%edx
  jle    L84
  mov    %r12d,%esi
  sub    %ecx,%esi
  mov    %edx,%eax
  sub    %esi,%eax
  cmp    %esi,%edx
  cmovl  %r10d,%eax
L84:
  test   %r9d,%r9d
  jne    L20
  sub    $0x1,%ecx
  movslq %ecx,%rcx
  mov    0x410(%rsp,%rcx,4),%r9d
L20:
  cmp    %r9d,%eax
  cmovl  %r9d,%eax
  add    %eax,%ebp
L144:
  cmp    %r14d,%ebp
  jg     L94
L105:
  movslq %r12d,%rax
  mov    $0x0,%edi
  mov    %r11d,%r9d
  movslq %ebp,%r8
  add    %r13,%r8
  mov    %r12d,%ecx
  test   %r12d,%r12d
  jg     L77
  jmp    L167
L50:
  mov    %r10d,%r9d
  jmp    L55
L33:
  cmp    %edi,%r15d
  jge    L154
  mov    %ebp,0xc(%rsp)
  mov    %edi,%r15d
L154:
  add    $0x1,%ebp
  jmp    L144
L73:
  movl   $0xffffffff,0xc(%rsp)
  jmp    L94
L147:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int formalBMStrstr(char *text, int txtLen, char *pattern, int patLen, int txtIdx) {
  int bmTable1[256], bmTable2[1000], patIdx, shtIdx, shtIdx1, shtIdx2, i1, i2, includeX, maxMatch, match, maxIdx;
  if (txtLen < patLen)
    return -1;
  txtLen -= patLen;
  makeBMTable1(pattern, patLen, bmTable1);
  makeBMTable2(pattern, patLen, bmTable2);
  maxMatch = 0;
  maxIdx = -1;
  while (txtIdx <= txtLen) {
    match = 0;
    includeX = 0;
    patIdx = patLen;
    for (; patIdx > 0; --patIdx) {
      if (text[txtIdx + patIdx - 1] != pattern[patIdx - 1] && text[txtIdx + patIdx - 1] != 'x')
        break;
      if (text[txtIdx + patIdx - 1] == 'x')
        includeX = 1;
      else
        ++match;
    }
    if (patIdx == 0) {
      if (maxMatch < match) {
        maxMatch = match;
        maxIdx = txtIdx;
      }
      ++txtIdx;
      continue;
    }
    i1 = bmTable1[(int)text[txtIdx + patIdx - 1]];
    shtIdx1 = patIdx;
    if (i1 > 0) {
      i2 = patLen - patIdx;
      shtIdx1 = (i1 < i2) ? 1 : i1 - i2;
    }
    shtIdx2 = (includeX == 0) ? bmTable2[patIdx - 1] : 1;
    shtIdx = (shtIdx1 > shtIdx2) ? shtIdx1 : shtIdx2;
    txtIdx += shtIdx;
  }
  return maxIdx;
}
```