user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<findMaxPldrmSubstr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %eax,%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x1,-0xc(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x1,-0x14(%rbp)
  mov    -0x8(%rbp),%rax
  movl   $0x1,(%rax)
  movl   $0x1,-0x28(%rbp)
  jmp    L37
L17:
  mov    -0x28(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L109
  mov    $0x3,%eax
  jmp    L77
L109:
  mov    $0x1,%eax
L77:
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  mov    -0x28(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jge    L79
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%eax
  sub    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x20(%rbp)
L79:
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x28(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L80
  mov    -0x24(%rbp),%eax
  add    $0x3,%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  add    %eax,%eax
  jmp    L92
L80:
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  add    %eax,%eax
  add    $0x1,%eax
L92:
  mov    %eax,-0x24(%rbp)
  jmp    L104
L91:
  addl   $0x2,-0x24(%rbp)
L104:
  mov    -0x28(%rbp),%eax
  sub    -0x24(%rbp),%eax
  test   %eax,%eax
  js     L10
  mov    -0x28(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L10
  mov    -0x28(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x28(%rbp),%ecx
  mov    -0x24(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  movslq %eax,%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L91
L10:
  mov    -0x24(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  sub    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jge    L47
  mov    -0x28(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
L47:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x18(%rbp)
  jge    L111
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x18(%rbp)
L111:
  addl   $0x1,-0x28(%rbp)
L37:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L17
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  leave
  ret
```

assistant: ```c
int findMaxPldrmSubstr(char *str) {
  int length = strlen(str) * 2 + 1;
  int *f = (int *)malloc(sizeof(int) * length);
  int i, k, t, position = 1, j = 0, maxIcalcedByJ = 0, maxPldrmStrLength = 1;
  f[0] = 1;
  for (i = 1; str[i / 2]; i++) {
    k = i % 2 ? 3 : 1;
    t = 0;
    if (i < maxIcalcedByJ) {
      t = ((f[2 * j - i]) < (f[j] - 2 * (i - j)) ? (f[2 * j - i]) : (f[j] - 2 * (i - j)));
    }
    k = ((k) > (t) ? (k) : (t));
    k = i % 2 ? (k + 3) / 4 * 2 : (k + 1) / 4 * 2 + 1;
    while (i - k >= 0 && str[(i + k) / 2] && str[(i - k) / 2] == str[(i + k) / 2])
      k += 2;
    f[i] = k * 2 - 1;
    if (maxPldrmStrLength < f[i]) {
      position = i;
      maxPldrmStrLength = f[i];
    }
    if (i + f[i] / 2 > maxIcalcedByJ) {
      j = i;
      maxIcalcedByJ = i + f[i] / 2;
    }
  }
  free(f);
  return (maxPldrmStrLength - 1) / 2;
}
```