user: Translate the below assembly code into C programming language:

```asm
<minCostBST>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %edx,-0x84(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,-0x90(%rbp)
  mov    -0x84(%rbp),%ecx
  mov    -0x84(%rbp),%esi
  movslq %ecx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x50(%rbp)
  movslq %ecx,%rax
  mov    %rax,-0xa0(%rbp)
  movq   $0x0,-0x98(%rbp)
  movslq %ecx,%rax
  lea    0x0(,%rax,4),%rbx
  movslq %esi,%rax
  sub    $0x1,%rax
  mov    %rax,-0x48(%rbp)
  movslq %ecx,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  movslq %esi,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    %r15,%rdx
  imul   %r12,%rdx
  mov    %r13,%rax
  imul   %r14,%rax
  lea    (%rdx,%rax,1),%rdi
  mov    %r14,%rax
  mul    %r12
  add    %rdx,%rdi
  mov    %rdi,%rdx
  movslq %ecx,%rax
  mov    %rax,%r10
  mov    $0x0,%r11d
  movslq %esi,%rax
  mov    %rax,%r8
  mov    $0x0,%r9d
  mov    %r11,%rdx
  imul   %r8,%rdx
  mov    %r9,%rax
  imul   %r10,%rax
  lea    (%rdx,%rax,1),%rdi
  mov    %r10,%rax
  mul    %r8
  add    %rdx,%rdi
  mov    %rdi,%rdx
  movslq %ecx,%rdx
  movslq %esi,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L66:
  cmp    %rdx,%rsp
  je     L80
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L66
L80:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L143
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L143:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L55
L42:
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    %rbx,%rdx
  shr    $0x2,%rdx
  mov    (%rax),%ecx
  mov    -0x40(%rbp),%rax
  lea    0x1(%rdx),%rsi
  mov    -0x68(%rbp),%edx
  movslq %edx,%rdx
  imul   %rsi,%rdx
  mov    %ecx,(%rax,%rdx,4)
  addl   $0x1,-0x68(%rbp)
L55:
  mov    -0x68(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L42
  movl   $0x2,-0x64(%rbp)
  jmp    L122
L19:
  movl   $0x0,-0x60(%rbp)
  jmp    L140
L156:
  mov    -0x60(%rbp),%edx
  mov    -0x64(%rbp),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  mov    %rbx,%rsi
  shr    $0x2,%rsi
  mov    D7(%rip),%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    -0x58(%rbp),%ecx
  movslq %ecx,%rdi
  mov    -0x60(%rbp),%ecx
  movslq %ecx,%rcx
  imul   %rsi,%rcx
  add    %rdi,%rcx
  mov    %edx,(%rax,%rcx,4)
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L15
L160:
  mov    -0x5c(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jle    L68
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x5c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rsi
  mov    -0x60(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  mov    (%rax,%rdx,4),%edi
  jmp    L53
L68:
  mov    $0x0,%edi
L53:
  mov    -0x5c(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  jge    L95
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x5c(%rbp),%eax
  lea    0x1(%rax),%esi
  mov    -0x40(%rbp),%rax
  mov    -0x58(%rbp),%edx
  movslq %edx,%r8
  movslq %esi,%rdx
  imul   %rcx,%rdx
  add    %r8,%rdx
  mov    (%rax,%rdx,4),%eax
  jmp    L142
L95:
  mov    $0x0,%eax
L142:
  lea    (%rdi,%rax,1),%r12d
  mov    -0x58(%rbp),%edx
  mov    -0x60(%rbp),%ecx
  mov    -0x80(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <sum@plt>
  add    %r12d,%eax
  mov    %eax,-0x54(%rbp)
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x40(%rbp),%rax
  mov    -0x58(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x60(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  mov    (%rax,%rdx,4),%eax
  cmp    %eax,-0x54(%rbp)
  jge    L87
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x40(%rbp),%rax
  mov    -0x58(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x60(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  lea    (%rsi,%rdx,1),%rcx
  mov    -0x54(%rbp),%edx
  mov    %edx,(%rax,%rcx,4)
L87:
  addl   $0x1,-0x5c(%rbp)
L15:
  mov    -0x5c(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  jle    L160
  addl   $0x1,-0x60(%rbp)
L140:
  mov    -0x84(%rbp),%eax
  sub    -0x64(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x60(%rbp)
  jle    L156
  addl   $0x1,-0x64(%rbp)
L122:
  mov    -0x64(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jle    L19
  mov    -0x84(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    -0x90(%rbp),%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L41
  call   <__stack_chk_fail@plt>
L41:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
int minCostBST(int keys[], int freq[], int size) {
  int cost[size][size];
  for (int i = 0; i < size; i++)
    cost[i][i] = freq[i];
  for (int leng = 2; leng <= size; leng++) {
    for (int i = 0; i <= size - leng + 1; i++) {
      int j = i + leng - 1;
      cost[i][j] = INT_MAX;
      for (int r = i; r <= j; r++) {
        int c = ((r > i) ? cost[i][r - 1] : 0) + ((r < j) ? cost[r + 1][j] : 0) + sum(freq, i, j);
        if (c < cost[i][j])
          cost[i][j] = c;
      }
    }
  }
  return cost[0][size - 1];
}
```