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

```asm
<findMaxSub>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x4c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jne    L14
  mov    -0x58(%rbp),%rax
  mov    -0x4c(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x58(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x50(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    -0x58(%rbp),%rdx
  add    $0x8,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  jmp    L2
L14:
  mov    -0x50(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edi
  call   <floor@plt>
  mov    %eax,-0x34(%rbp)
  lea    -0x30(%rbp),%rcx
  mov    -0x34(%rbp),%edx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <findMaxSub>
  mov    -0x34(%rbp),%eax
  lea    0x1(%rax),%esi
  lea    -0x30(%rbp),%rax
  lea    0xc(%rax),%rcx
  mov    -0x50(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <findMaxSub>
  lea    -0x30(%rbp),%rax
  lea    0x18(%rax),%rdi
  mov    -0x50(%rbp),%ecx
  mov    -0x34(%rbp),%edx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <findMaxCrossMid@plt>
  movl   $0x0,-0x38(%rbp)
  mov    -0x1c(%rbp),%ecx
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rbp,%rax
  sub    $0x28,%rax
  mov    (%rax),%eax
  cmp    %eax,%ecx
  jle    L37
  movl   $0x1,-0x38(%rbp)
L37:
  mov    -0x10(%rbp),%ecx
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rbp,%rax
  sub    $0x28,%rax
  mov    (%rax),%eax
  cmp    %eax,%ecx
  jle    L5
  movl   $0x2,-0x38(%rbp)
L5:
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rbp,%rax
  sub    $0x30,%rax
  mov    (%rax),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x58(%rbp),%rax
  lea    0x4(%rax),%rcx
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rbp,%rax
  sub    $0x2c,%rax
  mov    (%rax),%eax
  mov    %eax,(%rcx)
  mov    -0x58(%rbp),%rax
  lea    0x8(%rax),%rcx
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rbp,%rax
  sub    $0x28,%rax
  mov    (%rax),%eax
  mov    %eax,(%rcx)
L2:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L15
  call   <__stack_chk_fail@plt>
L15:
  leave
  ret
```

assistant: ```c
void findMaxSub(int *A, int p, int q, int *rret) {
  if (p == q) {
    rret[0] = p;
    rret[1] = q;
    rret[2] = A[p];
    return;
  }
  int ret[3][3];
  int mid = floor(p + (q - p) / 2);
  findMaxSub(A, p, mid, ret[0]);
  findMaxSub(A, mid + 1, q, ret[1]);
  findMaxCrossMid(A, p, mid, q, ret[2]);
  int flag = 0;
  if (ret[1][2] > ret[flag][2]) {
    flag = 1;
  }
  if (ret[2][2] > ret[flag][2]) {
    flag = 2;
  }
  rret[0] = ret[flag][0];
  rret[1] = ret[flag][1];
  rret[2] = ret[flag][2];
}
```