user: Please show me the C implementation that matches the assembly code listed below:

```asm
<bmStrstr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x440,%rsp
  mov    %rdi,-0x428(%rbp)
  mov    %esi,-0x42c(%rbp)
  mov    %rdx,-0x438(%rbp)
  mov    %ecx,-0x430(%rbp)
  mov    %r8d,-0x43c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x42c(%rbp),%eax
  cmp    -0x430(%rbp),%eax
  jge    L35
  mov    $0xffffffff,%eax
  jmp    L71
L35:
  mov    -0x430(%rbp),%eax
  sub    %eax,-0x42c(%rbp)
  lea    -0x410(%rbp),%rdx
  mov    -0x430(%rbp),%ecx
  mov    -0x438(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <makeBMTable1@plt>
  jmp    L125
L139:
  mov    -0x430(%rbp),%eax
  mov    %eax,-0x420(%rbp)
  jmp    L81
L30:
  mov    -0x43c(%rbp),%edx
  mov    -0x420(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x428(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x420(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rcx
  mov    -0x438(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L143
  mov    -0x43c(%rbp),%edx
  mov    -0x420(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x428(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  jne    L145
L143:
  subl   $0x1,-0x420(%rbp)
L81:
  cmpl   $0x0,-0x420(%rbp)
  jg     L30
  jmp    L129
L145:
  nop
L129:
  cmpl   $0x0,-0x420(%rbp)
  jne    L75
  mov    -0x43c(%rbp),%eax
  jmp    L71
L75:
  mov    -0x43c(%rbp),%edx
  mov    -0x420(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x428(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  mov    %eax,-0x418(%rbp)
  mov    -0x420(%rbp),%eax
  mov    %eax,-0x41c(%rbp)
  cmpl   $0x0,-0x418(%rbp)
  je     L95
  mov    -0x430(%rbp),%eax
  sub    -0x420(%rbp),%eax
  mov    %eax,-0x414(%rbp)
  mov    -0x418(%rbp),%eax
  cmp    -0x414(%rbp),%eax
  jl     L29
  mov    -0x418(%rbp),%eax
  sub    -0x414(%rbp),%eax
  jmp    L47
L29:
  mov    $0x1,%eax
L47:
  mov    %eax,-0x41c(%rbp)
L95:
  mov    -0x41c(%rbp),%eax
  add    %eax,-0x43c(%rbp)
L125:
  mov    -0x43c(%rbp),%eax
  cmp    -0x42c(%rbp),%eax
  jle    L139
  mov    $0xffffffff,%eax
L71:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L109
  call   <__stack_chk_fail@plt>
L109:
  leave
  ret
```

assistant: ```c
int bmStrstr(char *text, int txtLen, char *pattern, int patLen, int txtIdx) {
  int bmTable[256];
  int patIdx, shtIdx, i1, i2;
  if (0)
    printf("txtIdx = [");
  if (txtLen < patLen) {
    if (0)
      printf("]\n");
    return -1;
  }
  txtLen -= patLen;
  makeBMTable1(pattern, patLen, bmTable);
  while (txtIdx <= txtLen) {
    patIdx = patLen;
    if (0)
      printf("%d, ", txtIdx);
    for (; patIdx > 0; --patIdx)
      if (text[txtIdx + patIdx - 1] != pattern[patIdx - 1] && text[txtIdx + patIdx - 1] != 'x')
        break;
    if (patIdx == 0) {
      if (0)
        printf("]\n");
      return txtIdx;
    }
    i1 = bmTable[text[txtIdx + patIdx - 1]];
    shtIdx = patIdx;
    if (i1) {
      i2 = patLen - patIdx;
      shtIdx = (i1 < i2) ? 1 : i1 - i2;
    }
    txtIdx += shtIdx;
  }
  if (0)
    printf("]\n");
  return -1;
}
```