user: Converte this assembly snippet into its equivalent C code:

```asm
<FindMaxSubarray>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    %r9,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  mov    -0x50(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jge    L54
  mov    $0x1,%eax
  jmp    L93
L54:
  mov    -0x50(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jne    L51
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x58(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  mov    -0x4c(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x68(%rbp),%rax
  mov    -0x4c(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L100
L51:
  mov    -0x4c(%rbp),%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x28(%rbp)
  lea    -0x3c(%rbp),%r8
  lea    -0x40(%rbp),%rdi
  lea    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%edx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%rax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <FindMaxSubarray>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L89
  mov    -0x24(%rbp),%eax
  jmp    L93
L89:
  mov    -0x28(%rbp),%eax
  lea    0x1(%rax),%esi
  lea    -0x34(%rbp),%r8
  lea    -0x38(%rbp),%rdi
  lea    -0x18(%rbp),%rcx
  mov    -0x50(%rbp),%edx
  mov    -0x48(%rbp),%rax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <FindMaxSubarray>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L72
  mov    -0x24(%rbp),%eax
  jmp    L93
L72:
  lea    -0x30(%rbp),%r9
  lea    -0x10(%rbp),%r8
  mov    -0x50(%rbp),%ecx
  mov    -0x28(%rbp),%edx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x2c(%rbp),%rdi
  push   %rdi
  mov    %rax,%rdi
  call   <FindMaxCrossingSubarray@plt>
  add    $0x10,%rsp
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L8
  mov    -0x24(%rbp),%eax
  jmp    L93
L8:
  movsd  -0x20(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm1
  comisd %xmm1,%xmm0
  jb     L65
  movsd  -0x20(%rbp),%xmm0
  movsd  -0x10(%rbp),%xmm1
  comisd %xmm1,%xmm0
  jb     L65
  movsd  -0x20(%rbp),%xmm0
  mov    -0x58(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x40(%rbp),%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x3c(%rbp),%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L100
L65:
  movsd  -0x18(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm1
  comisd %xmm1,%xmm0
  jb     L104
  movsd  -0x18(%rbp),%xmm0
  movsd  -0x10(%rbp),%xmm1
  comisd %xmm1,%xmm0
  jb     L104
  movsd  -0x18(%rbp),%xmm0
  mov    -0x58(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x34(%rbp),%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L100
L104:
  movsd  -0x10(%rbp),%xmm0
  mov    -0x58(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x2c(%rbp),%edx
  mov    -0x68(%rbp),%rax
  mov    %edx,(%rax)
L100:
  mov    $0x0,%eax
L93:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L157
  call   <__stack_chk_fail@plt>
L157:
  leave
  ret
```

assistant: ```c
int FindMaxSubarray(double *A, int low, int high, double *MaxSum, int *SubLow, int *SubHigh) {
  int mid = 0;
  int LeftLow;
  int LeftHigh;
  int RightLow;
  int RightHigh;
  int CrossLow;
  int CrossHigh;
  double LeftSum;
  double RightSum;
  double CrossSum;
  int ret = 0;
  if (high < low) {
    return 1;
  }
  if (high == low) {
    *MaxSum = A[low];
    *SubLow = low;
    *SubHigh = low;
  } else {
    mid = (int)((low + high) / 2);
    ret = FindMaxSubarray(A, low, mid, &LeftSum, &LeftLow, &LeftHigh);
    if (ret) {
      return ret;
    }
    ret = FindMaxSubarray(A, mid + 1, high, &RightSum, &RightLow, &RightHigh);
    if (ret) {
      return ret;
    }
    ret = FindMaxCrossingSubarray(A, low, mid, high, &CrossSum, &CrossLow, &CrossHigh);
    if (ret) {
      return ret;
    }
    if (LeftSum >= RightSum && LeftSum >= CrossSum) {
      *MaxSum = LeftSum;
      *SubLow = LeftLow;
      *SubHigh = LeftHigh;
    } else if (RightSum >= LeftSum && RightSum >= CrossSum) {
      *MaxSum = RightSum;
      *SubLow = RightLow;
      *SubHigh = RightHigh;
    } else {
      *MaxSum = CrossSum;
      *SubLow = CrossLow;
      *SubHigh = CrossHigh;
    }
  }
  return 0;
}
```