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    $0x68,%rsp
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdi
  mov    %rdi,-0x80(%rbp)
  imul   %rax,%rax
  lea    0xf(,%rax,4),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L133:
  cmp    %rcx,%rsp
  je     L107
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L133
L107:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L145
  orq    $0x0,-0x8(%rsp,%rdx,1)
L145:
  mov    %rsp,%r15
  mov    -0x88(%rbp),%eax
  test   %eax,%eax
  jle    L33
  mov    -0x80(%rbp),%rsi
  shr    $0x2,%rsi
  mov    %eax,%edi
  mov    $0x0,%eax
  add    $0x1,%rsi
  mov    -0x50(%rbp),%r8
L113:
  movslq %eax,%rdx
  imul   %rsi,%rdx
  mov    (%r8,%rax,4),%ecx
  mov    %ecx,(%r15,%rdx,4)
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L113
L33:
  mov    -0x88(%rbp),%eax
  cmp    $0x1,%eax
  jle    L11
  mov    -0x80(%rbp),%rcx
  shr    $0x2,%rcx
  mov    %rcx,-0x60(%rbp)
  sub    $0x2,%eax
  mov    %eax,-0x78(%rbp)
  movl   $0x2,-0x84(%rbp)
  jmp    L2
L128:
  cmp    %r12d,%r13d
  jl     L156
  mov    $0x0,%ebx
  cmp    -0x48(%rbp),%r12d
  jle    L173
  mov    -0x58(%rbp),%rax
  mov    -0x4(%rax,%r12,4),%ebx
L173:
  add    $0x1,%r12
L158:
  lea    -0x1(%r12),%edx
  mov    $0x0,%eax
  cmp    %edx,%r13d
  jle    L102
  movslq %r12d,%rax
  imul   -0x60(%rbp),%rax
  add    -0x68(%rbp),%rax
  mov    (%r15,%rax,4),%eax
L102:
  add    %eax,%ebx
  mov    %r13d,%edx
  mov    -0x44(%rbp),%esi
  mov    -0x50(%rbp),%rdi
  call   <sum@plt>
  add    %eax,%ebx
  cmp    %ebx,(%r15,%r14,4)
  jle    L128
  mov    %ebx,(%r15,%r14,4)
  jmp    L128
L156:
  addq   $0x1,-0x70(%rbp)
  mov    -0x70(%rbp),%rax
  addl   $0x1,-0x74(%rbp)
  mov    -0x80(%rbp),%rdi
  add    %rdi,-0x58(%rbp)
  sub    $0x1,%eax
  cmp    -0x78(%rbp),%eax
  jg     L127
L63:
  mov    -0x70(%rbp),%rdi
  mov    %edi,-0x44(%rbp)
  mov    -0x74(%rbp),%esi
  mov    %esi,%r13d
  movslq %esi,%rax
  movslq %edi,%rdx
  mov    -0x60(%rbp),%rbx
  imul   %rbx,%rdx
  add    %rdx,%rax
  mov    D5(%rip),%rdx
  mov    (%rdx),%edx
  mov    %edx,(%r15,%rax,4)
  mov    %edi,-0x48(%rbp)
  cmp    %edi,%esi
  jl     L156
  lea    0x1(%rdi),%r12
  mov    $0x0,%eax
  movslq %esi,%rsi
  mov    %rsi,-0x68(%rbp)
  movslq %edi,%r14
  imul   %rbx,%r14
  add    %rsi,%r14
  mov    %eax,%ebx
  jmp    L158
L127:
  addl   $0x1,-0x84(%rbp)
  mov    -0x84(%rbp),%eax
  subl   $0x1,-0x78(%rbp)
  cmp    %eax,-0x88(%rbp)
  jl     L11
L2:
  mov    -0x84(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x74(%rbp)
  mov    %r15,-0x58(%rbp)
  movq   $0x0,-0x70(%rbp)
  mov    -0x78(%rbp),%eax
  add    $0x1,%eax
  jns    L63
  jmp    L127
L11:
  mov    -0x88(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    (%r15,%rax,4),%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L125
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L125:
  call   <__stack_chk_fail@plt>
```

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];
}
```