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

```asm
<threeSum>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x48,%rsp
  mov    %esi,0x30(%rsp)
  mov    %rdi,0x28(%rsp)
  mov    %rdx,0x38(%rsp)
  call   <bubblesort@plt>
  mov    (%rbx),%esi
  test   %esi,%esi
  jg     L4
  mov    %rbx,%rax
  mov    %rbx,%r12
  lea    -0x2(%rbp),%ebx
  xor    %r15d,%r15d
  add    $0x8,%rax
  movl   $0x0,0x24(%rsp)
  xor    %r14d,%r14d
  mov    %ebx,0x34(%rsp)
  mov    %rax,0x18(%rsp)
  mov    %r15,%rax
  mov    %r14d,%r15d
  mov    %rax,%r14
  nopl   0x0(%rax)
L61:
  addl   $0x1,0x24(%rsp)
  mov    0x24(%rsp),%eax
  cmp    $0x1,%eax
  je     L63
  cmp    %esi,-0x4(%r12)
  je     L66
L63:
  mov    0x24(%rsp),%eax
  cmp    %eax,0x30(%rsp)
  jle    L66
  mov    0x28(%rsp),%rdi
  movslq %eax,%rbx
  mov    %rbx,0x10(%rsp)
  lea    0x4(%rdi,%rbx,4),%rbx
  mov    0x34(%rsp),%edi
  sub    %eax,%edi
  mov    %r14,%rax
  mov    %r15d,%r14d
  mov    %edi,0x20(%rsp)
  mov    -0x4(%rbx),%edi
  mov    %rax,%r15
  lea    (%rdi,%rsi,1),%eax
  test   %eax,%eax
  jg     L138
  nopw   0x0(%rax,%rax,1)
L136:
  mov    0x20(%rsp),%ecx
  cmp    $0xffffffff,%ecx
  je     L138
  mov    %ecx,%edx
  mov    0x18(%rsp),%rcx
  add    0x10(%rsp),%rdx
  mov    %rbx,%r13
  lea    (%rcx,%rdx,4),%rcx
  mov    %rcx,0x8(%rsp)
  mov    %r15,%rcx
  mov    %r14d,%r15d
  mov    %rcx,%r14
  jmp    L167
  nopl   0x0(%rax,%rax,1)
L159:
  mov    $0x3,%edi
  add    $0x1,%r15d
  call   <malloc@plt>
  mov    %r14,%rdi
  lea    0x0(,%r15,8),%esi
  mov    %rax,%rbp
  mov    (%r12),%eax
  mov    %eax,0x0(%rbp)
  mov    -0x4(%rbx),%eax
  mov    %eax,0x4(%rbp)
  mov    0x0(%r13),%eax
  mov    %eax,0x8(%rbp)
  call   <realloc@plt>
  mov    (%r12),%esi
  mov    -0x4(%rbx),%edi
  mov    %rax,%r14
  mov    0x0(%r13),%edx
  movslq %r15d,%rax
  mov    %rbp,-0x8(%r14,%rax,8)
  lea    (%rsi,%rdi,1),%eax
  add    %eax,%edx
L58:
  test   %edx,%edx
  jg     L75
  add    $0x4,%r13
  cmp    %r13,0x8(%rsp)
  je     L75
L167:
  mov    %eax,%edx
  add    0x0(%r13),%edx
  jne    L58
  test   %r15d,%r15d
  je     L159
  movslq %r15d,%rdx
  mov    -0x8(%r14,%rdx,8),%rdx
  cmp    %esi,(%rdx)
  jne    L159
  cmp    %edi,0x4(%rdx)
  jne    L159
  add    $0x4,%r13
  cmp    %r13,0x8(%rsp)
  jne    L167
  nopl   0x0(%rax,%rax,1)
L75:
  mov    (%rbx),%edi
  mov    %r14,%rax
  mov    %r15d,%r14d
  add    $0x4,%rbx
  mov    %rax,%r15
  addq   $0x1,0x10(%rsp)
  lea    (%rdi,%rsi,1),%eax
  subl   $0x1,0x20(%rsp)
  test   %eax,%eax
  jle    L136
L138:
  mov    %r15,%rax
  mov    %r14d,%r15d
  mov    %rax,%r14
L66:
  mov    0x4(%r12),%esi
  add    $0x4,%r12
  test   %esi,%esi
  jle    L61
  mov    %r14,%rax
  mov    %r15d,%r14d
  mov    %rax,%r15
L60:
  mov    0x38(%rsp),%rax
  mov    %r14d,(%rax)
  add    $0x48,%rsp
  mov    %r15,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  xor    %r14d,%r14d
  xor    %r15d,%r15d
  jmp    L60
```

assistant: ```c
int **threeSum(int *A, int n, int *returnSize) {
  int i = 0, j = 0, k = 0;
  bubblesort(A, n);
  int **result = NULL;
  int num = 0;
  for (i = 0; A[i] <= 0; i++) {
    if (i > 0 && A[i] == A[i - 1])
      continue;
    for (j = i + 1; j < n; j++) {
      if (A[i] + A[j] > 0)
        break;
      for (k = j + 1; k < n; k++) {
        if (A[i] + A[j] + A[k] == 0) {
          if (num > 0 && A[i] == result[num - 1][0] && A[j] == result[num - 1][1])
            continue;
          int *tmp = malloc(3);
          tmp[0] = A[i];
          tmp[1] = A[j];
          tmp[2] = A[k];
          num++;
          result = realloc(result, num * sizeof(int *));
          result[num - 1] = tmp;
        }
        if (A[i] + A[j] + A[k] > 0)
          break;
      }
    }
  }
  *returnSize = num;
  return result;
}
```